Need help with eMIOS

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Need help with eMIOS

2,642 Views
snehakalkhair
Contributor III

Hi,

I am working on MPC5676R.

Will you please help me with the following questions:

1. Can code warrior be used to run the eMIOS code?

2. What are the configuration steps for the same?

3. Will you please help with a sample code to configure eMIOS for GPIO mode?

Labels (1)
0 Kudos
Reply
8 Replies

2,062 Views
snehakalkhair
Contributor III

Hi,

This is the code warrior which was suggested to me to compile eMIOS.

CodeWarrior Dev Tools for MPC55xx/MPC56xx|NXP

If you give a sample program that will help me a lot.

0 Kudos
Reply

2,062 Views
martin_kovar
NXP Employee
NXP Employee

Hi,

1) Code warrior is IDE. It also contains compiler, linker, debugger and other parts. Code warrior cannot be used for eMIOS code running, but it can be used for compiling and "uploading" the code to the microcontroller.

2) I do not understand this question. What configuration steps you mean?

3) If you want to configure eMIOS for GPIO, you only set appropriate GPIO pin and then set mode in eMIOS unified channel. For example, if you want to use eMIOS unified channel 10 you set:

SIU.PCR[189] - set PA function to eMIOS and set OBE bit

emios.CCR[10] - set MODE bit to GPIO input/output

More information about this mode you find in MPC5676R reference manual (rev.5) chapter 18.4.1.1.1

Regards,

Martin

0 Kudos
Reply

2,062 Views
snehakalkhair
Contributor III

Where and how can we run the eMIOS code?

I want to see the OPWM coming from channel 0. But i am unable to see it on the oscilloscope,

Please help.

0 Kudos
Reply

2,062 Views
martin_kovar
NXP Employee
NXP Employee

Hi,

the code has to run directly in the microcontroller. There is not any "simulator" in the CodeWarrior. If you do not see any signal on the oscilloscope, you probably have some misconfiguration in your code.

Please look at the following app note, which shows, how to use OPWM eMIOS function. Example, in the app note is not for MPC5676R, but the module is similar. You have to configure different GPIO pins only.

http://cache.nxp.com/files/32bit/doc/app_note/AN2865.pdf?fsrch=1&sr=2&pageNum=1

MPC5500 and MPC5600 Simple Cookbook Code

Regards,

Martin

0 Kudos
Reply

2,062 Views
snehakalkhair
Contributor III

The NOTES in the OPWM code says:

/* 1. MMU not initialized; must be done by debug scripts or BAM */

/* 2. SRAM not initialized; must be done by debug scripts or in a crt0 type file */

Will you please help me with a small code sample for BAM?

I am not so good at assembly programming.

0 Kudos
Reply

2,062 Views
martin_kovar
NXP Employee
NXP Employee

Hi,

could you please tell me, which IDE and debug probe you use? If you use Lauterbach debugger, I am sending you SRAM init script in the attachment.

If you use one of PEMicro debug probe and CodeWarrior IDE, you do not have to deal with the note.

Abou BAM, MPC5676R has hard wired BAM, so it is not possible to change it.

Regards,

Martin

0 Kudos
Reply

2,062 Views
snehakalkhair
Contributor III

Thanks a lot for your help.

I am using Code warrior IDE and PEMicro USB Multilink Interface.

Will you please help with a document in which we can get the details of integrating the eMIOS with the MCU Project in Code Warrior.

eg. we have a document AN4572 for integrating eTPU with MCU.

0 Kudos
Reply

2,062 Views
martin_kovar
NXP Employee
NXP Employee

Hi,

there is no document for eMIOS. It is simple peripheral compared to eTPU.

Create new project in CodeWarrior and initialize correct GPIO pins. Emios initialization is in the app note 2865 I mentioned above.

Also you can use at the following example to see, how initialize Emios:

´Example MPC5644A EMIOS shifted PWM

If I have some time tomorrow, I will create simple OPWM example for you.

Reagrds,

Martin

PS: Please clarify me, which CodeWarrior you use.

0 Kudos
Reply