S32K344 hardware PWM frequency

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

S32K344 hardware PWM frequency

跳至解决方案
3,155 次查看
sorozatgyilkos
Contributor II

Hello everyone!

Me and my team are working on a high power battery charger (OBC) and we would require a 100 kHz hardware PWM. Based on the S32K344 datasheet, only 20 kHz and 400 Hz is mentioned.

Is it possible to adjust the hardware PWM's frequency to 100 kHz or other arbitrary frequencies? If so, how?

Thank you in advance!

Greetings,
Peter

0 项奖励
1 解答
3,139 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

yes 100Khz frequency is possible.
eMIOS module is available for PWM signal generating, using PWM modes (OPWMB, OPWFMB, ...)
eMIOS is clocked from CORE_CLK (up to 160Mhz). eMIOS divides this clock by the global prescaler (MCR[GPRE] + 1) and routes the resulting prescaled clock output to the channel internal prescaler (Cn[UCPRE] + 1). Thus channel internal counter counts (CORE_CLK/global prescaler/internal prescaler) clock.
Finally assuming channel running in e.g. OPWFMB mode, its PWM frequency is calculated as

PWM frequency = CORE_CLK / global prescaler / internal prescaler / (B1+1)

B1 is a value written to channel B register.

Refer to device RM for description of eMIOS modes.

BR, Petr

在原帖中查看解决方案

4 回复数
3,140 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

yes 100Khz frequency is possible.
eMIOS module is available for PWM signal generating, using PWM modes (OPWMB, OPWFMB, ...)
eMIOS is clocked from CORE_CLK (up to 160Mhz). eMIOS divides this clock by the global prescaler (MCR[GPRE] + 1) and routes the resulting prescaled clock output to the channel internal prescaler (Cn[UCPRE] + 1). Thus channel internal counter counts (CORE_CLK/global prescaler/internal prescaler) clock.
Finally assuming channel running in e.g. OPWFMB mode, its PWM frequency is calculated as

PWM frequency = CORE_CLK / global prescaler / internal prescaler / (B1+1)

B1 is a value written to channel B register.

Refer to device RM for description of eMIOS modes.

BR, Petr

3,122 次查看
sorozatgyilkos
Contributor II

Just a quick question, just checked the reference manual now, and it mentions 72 standard channels for emios, does this mean that we can have 72 individual PWM outputs in theory?

0 项奖励
3,103 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

unfortunately not, you need to consider possible modes implemented in each channel, which is stated in Chip-specific eMIOS information chapter of the RM. Some channels does not include internal counter so must run out of other counter bases (global or local), which must be generated by channel running in MCB/MC modes. There are 5 counter busses, for those channels not having internal counter, so this also limits number of channels with individual PWM frequency.

BR, Petr

3,129 次查看
sorozatgyilkos
Contributor II

Thank you very much Petr!

0 项奖励