S32K344 hardware PWM frequency

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

S32K344 hardware PWM frequency

Jump to solution
2,857 Views
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 Kudos
1 Solution
2,841 Views
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

View solution in original post

4 Replies
2,842 Views
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

2,824 Views
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 Kudos
2,805 Views
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

2,831 Views
sorozatgyilkos
Contributor II

Thank you very much Petr!

0 Kudos