MCF5328 PWM GPIO bits

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

MCF5328 PWM GPIO bits

768 Views
powie_freescale
Contributor I

I'm confused by the MCF5328 family documentation and header files regarding the PWM1/3/5/7 pins used as GPIO.  The MCF5329 reference manual (rev 3) shows only bits 2,3,4 and 5 being used in the PODR_PWM, PDDR_PWM and PPDSDR_PWM registers, which does match the PWM "bits" 1/3/5/7 (which are shown as GPIO signals PWM1/3/5/7 in table 2-1).  For the PPDSDR_PWM register it specifically states that these are the controls for signals PWM2/3/4/5 - which does not match the actual PWM numbers.  Looking in the header files from Freescale - it also uses the 2/3/4/5 bit numbers for these registers - not matching the PWM1/3/5/7 numbers.

 

Can anybody tell me the correct meanings of the bits in the PODR_PWM, PDDR_PWM and PPDSDR_PWM registers for the MCF5328?

 

Thanks,

 

Paul Withers

Labels (1)
0 Kudos
Reply
1 Reply

614 Views
TomE
Specialist II

That looks like a cut-and-paste bug when those manuals were being assembled.

 

Searching shows those register and bit names only exist in the MCF5329 and MCF5373 manuals, so it doesn't immediately look like a chapter got pasted from an MCF52xx chip as I've seen before.

 

"bits 2,3,4 and 5 being used in the PODR_PWM, PDDR_PWM and PPDSDR_PWM" have been named as per the bits in that register, which is consistent for that chapter.

 

The PWM signals are named for their function.

 

I think the "proper fix" would be to change only the second column in "Table 2-1. MCF5327/8/9 Signal Information and Muxing" and  "Table 13-1. MCF5327/8/9 Signal Information and Muxing" to something like:

 

Signal Name   GPIO

--------------------

PWM7          PPWM5

PWM5          PPWM4

PWM3          PPWM3

PWM1          PPWM2

 

Please write some code totest this out and then report back.


Tom

 

0 Kudos
Reply