PWM generation using MPC5744P FlexPWM - Bit numbering while debugging in S32DS

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

PWM generation using MPC5744P FlexPWM - Bit numbering while debugging in S32DS

636 Views
azeemsha_poyil
Contributor I

Hi

I am working on PWM generation using MPC5744P FlexPWM. As seen in the datasheet (see the image 2 attached) the INDEP bit comes at bit 2 of the control register 'FlexPWM_SUBn_CTRL2'.

However, when I debug using S32 Design Studio, the INDEP bit is shown at bit 13 (see image 1). This is confusing to me.

Hence I am forced to configure the register as below,

FlexPWM_0.SUB[0].CTRL2.R    = 0x2000; // independent outputs

Could anyone please help to understand this?

Regards

Az

0 Kudos
1 Reply

453 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

the S32DS only uses reversed bit numbering. The RM shows standard PowerPC bit numbering: bit 0 is the most significant bit, and bit 15 is the least significant bit. 

However position of the INDEP bit is same in the register. 

FlexPWM_0.SUB[0].CTRL2.R    = 0x2000; is correct usage.

BR, Petr

0 Kudos