S32k3 S32CT eMiOS PWM Generate 50khz

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

S32k3 S32CT eMiOS PWM Generate 50khz

Jump to solution
502 Views
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 Kudos
Reply
1 Solution
392 Views
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.

View solution in original post

0 Kudos
Reply
2 Replies
475 Views
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 Kudos
Reply
393 Views
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 Kudos
Reply