Programming the MPC5604B using CodeWarrior

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

Programming the MPC5604B using CodeWarrior

Jump to solution
3,069 Views
cedricdestin
Contributor II

Hey,

I am having trouble understanding the samples program designed for the tutorials, like, what port is being addressed, and how the PWM timing is created, is there anywhere i could find such description? Also, It would be awesome to have know the port addresses...

Thank you

0 Kudos
Reply
1 Solution
1,727 Views
StevenMcLaughli
NXP Employee
NXP Employee

Hi,

PWM is controlled via the eMIOS module within the device. Please look at this section within the reference manual (chapter 24 Timers 24.4. The eMIOS channels will have to be enabled within OPWM (output PWM ) mode. The respective timing etc, will be programmed between this module and the clock module.

Please refer to Application Note 2865: MPC5500 and MPC5600 Simple Cookbook (go to www.freescale.com and search with AN2865) Section 19 eMIOS OPWM function. There is a code snippet which will help you understand the port directions too. (The port configuration is handled by the SIU module. The port direction and alternative functions (because the port can be used for a few different modules - table 4-3 Pg 45 in Reference manual) are shown within this example.

Regards,

Steven.

View solution in original post

0 Kudos
Reply
4 Replies
1,728 Views
StevenMcLaughli
NXP Employee
NXP Employee

Hi,

PWM is controlled via the eMIOS module within the device. Please look at this section within the reference manual (chapter 24 Timers 24.4. The eMIOS channels will have to be enabled within OPWM (output PWM ) mode. The respective timing etc, will be programmed between this module and the clock module.

Please refer to Application Note 2865: MPC5500 and MPC5600 Simple Cookbook (go to www.freescale.com and search with AN2865) Section 19 eMIOS OPWM function. There is a code snippet which will help you understand the port directions too. (The port configuration is handled by the SIU module. The port direction and alternative functions (because the port can be used for a few different modules - table 4-3 Pg 45 in Reference manual) are shown within this example.

Regards,

Steven.

0 Kudos
Reply
1,727 Views
cedricdestin
Contributor II

Yes, I followed that and they do help.

0 Kudos
Reply
1,727 Views
DiegoHaro
NXP Employee
NXP Employee

Hi Cedric,

Can you share with me the sample program that you are talking about? (Or share the link where I can download it)

There are a lot of sample programs for MPC5604B, and I want to understand exactly what you are referring to, and explain it to you.

Regards,

Diego.

0 Kudos
Reply
1,727 Views
cedricdestin
Contributor II

Hey,

I was just talking about the Sample program given on the tutorials on "how to blink a LED" but I got to learn the architecture and most of it makes sense. The reference manual helped me.

Thanks though. I'll keep you in touch if I do need help.