Close

LUT, PIO and SPWM

A project log for DIAVOX Cellphone

Turning an old diavox phone into a cellphone. No smart stuff, just a telephone. Pick up the handset and dial just like the old days.

anders-helgessonAnders Helgesson 10/13/2024 at 21:400 Comments

I've been looking at how I should set up the SPWM there are some options but using a PWM slice should suffice. A LUT will store the sinewave data, I'm thinking of using 1024 samples at 32 bits which holds 180 degress of the sinewave for both pwm slices. Using 16 bits for each channel. 

Since the LUT begins with both channels at 0 and both channels are 0 in the middle and at the end. We should have enough deadtime to not cause shoot through. It depends on how fast we feed the PWM slice with data. I have to check to make sure that it's enough.

DMA will be used to feed data to the PWM peripheral so we can free up the cpu for other tasks. 

Discussions