S32K324 Emios pwm output with dynamic frequency

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

S32K324 Emios pwm output with dynamic frequency

273 次查看
witness
Contributor III

hi, experts

Does NXP S32K324 support PWM output with variable frequency? that means when software running, we can be able to adjust frequency dynamically. 

0 项奖励
回复
6 回复数

238 次查看
_Leo_
NXP TechSupport
NXP TechSupport

Hi,

Thank you so much for your interest in our products and for using our community.

There is no demo but you can perform duty-cycle and period transitions during runtime with OPWFMB mode. You can refer to the 63.5.3.16 Output Pulse Width and Frequency Modulation Buffered (OPWFMB) mode section from reference manual.

Hope it helps you.

Have a nice day!

0 项奖励
回复

229 次查看
witness
Contributor III

Hi, Leo

Thanks for you kind reply, and I know the OPWFMB mode, it is triggered by internal counter. If I want to use two or more channels to output different PWM, since the internal counter can not be started at the same time point, so how can I sychronize these PWM?

0 项奖励
回复

203 次查看
_Leo_
NXP TechSupport
NXP TechSupport

You can use one channel as time base for the others channels. Then use AS1 and BS1 registers to change duty cycle and period, respectively of the channels configured as OPWFMB mode.

0 项奖励
回复

174 次查看
witness
Contributor III

hi, leo

we use EB tresos to do the MCAL development right now, and each PWM channel has its own internal counter, so we can not set one of them as the time base for another PWM channel. then, we try to change the MCAL plugin static code, and Enable the Output Update for Channels in sequence, since each invoke can not be started at the same time, so the each PWM channel phase will deviate some nanoseconds. but I don't think it is the perfect solution, so I want to know how could you achieve? if possible, could you please give me the demo? thanks in advance.

 

0 项奖励
回复

164 次查看
_Leo_
NXP TechSupport
NXP TechSupport

We do not have the demo that you request, but you can refer to 4.2.3.1. eMIOS section from AN13884 or AN13767 to see how one eMIOS channel (in MCB mode) is configured as a time base for PWM signals (in OPWMB mode).

0 项奖励
回复

142 次查看
witness
Contributor III

I have looked through the reference manual, but did not find the info you mentioned, can you send me yours or send me the link that I can be able to download.

0 项奖励
回复