50 Hz Sine Wave with PWM

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

50 Hz Sine Wave with PWM

833 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

819 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

811 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

815 Views
rogeliovdm
Contributor II

Hi Daniel, 

I've already answered your email. 

 

Thank you so much!

 

Rogelio V

0 Kudos