PWM not generating for s32k324

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

PWM not generating for s32k324

ソリューションへジャンプ
4,538件の閲覧回数
HBH
Contributor II

PWM not generating for s32k324 emios_0 channel 4 and emios_0 channel 5. given settings as below EmiosChMode as EMIOS_PWM_IP_MODE_OPWFMB since we have to get variable period and variable duty and EmiosChCounterBus as EMIOS_PWM_IP_BUS_INTERNAL. in mcl EmiosMclClkDivVal is configured as 2, Channel class as variable.

Registers for emios_0 A4, B4 and A5, B5 are being set as per the configuration, but PWM wave form is not generating

0 件の賞賛
返信
1 解決策
4,489件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

well, UCOUT is toggling, so OPWFMB works normal.
Then check pin setting and be sure you measure right pin.
Picture names point to 48, is that GPIO48 (PTB16) pin and so controlled by MSCR48?
Because in port setting you have PCR value 36 that is PTB4 pin, also configurable for eMIOS_0 ch4.

BR, Petr

元の投稿で解決策を見る

0 件の賞賛
返信
6 返答(返信)
4,514件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

try to check eMIOS register setting in debugger. To know global prescaler and internal prescaler are enabled and channel counter is running. You can also check An, Bn register setting. Sn[UCOUT] indicates the output pin state, so if it is toggling, then most probably your pin setting is not correct.

BR, Petr

0 件の賞賛
返信
4,508件の閲覧回数
HBH
Contributor II

given pwm duty cycle is 50%, Value for register A4 and B4 are being set accordingly. attaching the screen shot for the same.  

0 件の賞賛
返信
4,501件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

this looks normal. Counter seems to be running as flag is set. Mode is OPWMB.
Do you see UCOUT also change value? What about OUDIS register, if set for channel bit, clear it.

BR, Petr

0 件の賞賛
返信
4,499件の閲覧回数
HBH
Contributor II

HBH_0-1689331206673.png

the mode i have set is OPWFMB, sharing the updated register snapshot

attaching the screen shot for configuration details also

0 件の賞賛
返信
4,490件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

well, UCOUT is toggling, so OPWFMB works normal.
Then check pin setting and be sure you measure right pin.
Picture names point to 48, is that GPIO48 (PTB16) pin and so controlled by MSCR48?
Because in port setting you have PCR value 36 that is PTB4 pin, also configurable for eMIOS_0 ch4.

BR, Petr

0 件の賞賛
返信
4,481件の閲覧回数
HBH
Contributor II

its PTB4 and is controlled by MSCR36 and selected eMIOS_0 ch4 as mode. attaching the snapshot for same

0 件の賞賛
返信