50 Hz Sine Wave with PWM

cancel
Showing results for 
Search instead for 
Did you mean: 

50 Hz Sine Wave with PWM

229 Views
rogeliovdm
Contributor II

Hi everyone,

I need to produce a 50 Hz sine wave modulated with a PWM at 400 KHz. What I have right now it's FTM0 PWM overflow interruption that loads the next sine value from an array with 8000 samples. The problem with this approach is that is taking up to much time from the micro's CPU. 

My idea is to implement a different solution using DMA, so it loads the sine values without the CPU having to do any actual work. 

My problem is that I can't find any way of doing this from the processor expert (sdk 3.0.0). 

Could you please help me finding the best way to get this? Should I use the DMA? Or is there a way of sticking to the PWM modulation without consuming too much memory? 

Thank you in advance

0 Kudos
3 Replies

215 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi Rogelio,

Unfortunately, we don't have any SDK example with DMA - FTM_PWM, but I will send you a non-SKD example that utilizes that.

 

Regards,

Daniel

207 Views
rogeliovdm
Contributor II

Hi Daniel, 

 

I appreciate again your response, but in the email that you sent me there is not a file attached. 

 

Could you re-send it to me with the file in the thing you said please? 

 

Regards, 

 

Rogelio

0 Kudos

211 Views
rogeliovdm
Contributor II

Hi Daniel, 

I've already answered your email. 

 

Thank you so much!

 

Rogelio V

0 Kudos