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
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.