Bug Report CW11.1 56F8322 PWMC1

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Bug Report CW11.1 56F8322 PWMC1

1,657件の閲覧回数
jjt
Contributor I

PWMC1_SetRatio15 calculates the set edge value using SM0 for ALL channels (including SM1, SM2 channels). Should be using SM1_INIT and _VAL1 for channels 2,3 and SM2_INIT, _VAL1 for channels 4,5.

register word SetEdgeReg = (word)((((Int32)getReg16(PWM_SM0_VAL1) - (Int16)getReg16(PWM_SM0_INIT) + 0x01) * (Int32)Ratio) / 0x7FFFU); /* Store value to the set duty register */

0 件の賞賛
返信
2 返答(返信)

1,645件の閲覧回数
jjt
Contributor I

Digging further it appears SM1 is initialized by eFlexPWM to share SM0's clock.

Where's the best source of direction for the eFlexPWM and PWMC1 for Processor Expert for DSC 56F8256? 

0 件の賞賛
返信

1,631件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Each eFlexPWM sub-module has PWM_SMnCTRL2, in the register, the CLK_SEL bits select the clock source. For the SM0 module, the CLK_SEL can select the IPBUS clock or EXT_CLK clock, the clock can be divided by the PRSC bits in PWM_SM0CTRL register and get the clock of the SM0.

For the other sub-module except SM0,they can select the Submodule 0’s clock (AUX_CLK) with CLK_SEL bits as 2b'10, in this way, all the other sub-module will use the SM0 clock which has been divided by the the PRSC bits in PWM_SM0CTRL register, so all the sub-module of eFlexPWM will be driven by the same clock.

 

xiangjun_rong_0-1677477930898.png

Hope it can help you

BR

XiangJun Rong

0 件の賞賛
返信