S32k3 S32CT eMiOS PWM Generate 50khz

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

S32k3 S32CT eMiOS PWM Generate 50khz

跳至解决方案
501 次查看
noobsplzwin
Contributor III

Hi NXP Friends,

I am working on generating a PWM signal with a frequency of 50kHz. My core system clock is set to 160MHz. According to my calculations, setting the default period to 3200 should divide the 160MHz clock down to 50kHz. However, I'm encountering issues where the oscilloscope shows no signal at all.

Steps Taken:

  1. Set Default Period to 3200:
    • Expected Result: PWM signal at 50kHz.
    • Actual Result: No signal on the oscilloscope.
  2. Tried Other Default Periods:
    • 16000
      noobsplzwin_0-1718976679915.jpeg

       

    • 8000
      noobsplzwin_1-1718976685888.jpeg

      As I decrease the default period (thereby increasing the PWM frequency), the PWM signal starts to look messy and unreliable.

      Is there a limitation in the driver that prevents achieving a 50kHz PWM frequency? Am I missing something in the configuration that could be causing these issues?

      Any insights or suggestions would be greatly appreciated. Thank you!

      noobsplzwin_4-1718976882202.pngnoobsplzwin_5-1718976890081.png

       

       

0 项奖励
回复
1 解答
391 次查看
noobsplzwin
Contributor III

Hi VaneB,

 

Sorry for the late response. This issue is solved as we were connecting the PWM to an inductive load. After adding a diode to the output, the wave looks perfect.

在原帖中查看解决方案

0 项奖励
回复
2 回复数
474 次查看
VaneB
NXP TechSupport
NXP TechSupport

Hi @noobsplzwin 

Which S32K3 device are you using? Is it a custom board or one of our EVBs? The configurations seem correct, also I saw that you enabled the Freeze state, this is freezing the UC in its current state while in Debug mode could you please let me know the behavior of the signal while not in freeze mode? Did you test any of the PWM example codes? if yes, did you observe the same behavior?

 

B.R.

VaneB

0 项奖励
回复
392 次查看
noobsplzwin
Contributor III

Hi VaneB,

 

Sorry for the late response. This issue is solved as we were connecting the PWM to an inductive load. After adding a diode to the output, the wave looks perfect.

0 项奖励
回复