S32K344 hardware PWM frequency

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

S32K344 hardware PWM frequency

ソリューションへジャンプ
2,969件の閲覧回数
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 解決策
2,953件の閲覧回数
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 返答(返信)
2,954件の閲覧回数
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,936件の閲覧回数
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 件の賞賛
2,917件の閲覧回数
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,943件の閲覧回数
sorozatgyilkos
Contributor II

Thank you very much Petr!

0 件の賞賛