Skip to main content
thannara123
Associate III
August 27, 2024
Solved

In center align mode SPWM generation may I need give the same CCR value in the LUT

  • August 27, 2024
  • 3 replies
  • 1035 views

Hi ,

 In SPWM generation ,in Center align mode ,May i require give one sine table value twice , in the upword and down counting sequence . 

 

Original sine wave values: [A1, A2, A3, ..., A200]
DMA array: [A1, A1, A2, A2, A3, A3, ..., A200, A200]

 

like wise the DMA array ?

other wise is it distroted ?

 

@MM..1 

 

This topic has been closed for replies.
Best answer by Sarra.S

Hello,

In center-aligned PWM mode, the counter counts both up and down within a single period. This means that each value in the sine wave table will be used twice: once during the up-counting phase and once during the down-counting phase. I think you should try to provide each sine table value twice in the DMA array 

3 replies

TDK
August 27, 2024

It depends on how your values are generated, but you are not required to duplicate values and doing so will make your sine wave more distorted, in general.

 

"If you feel a post has answered your question, please click ""Accept as Solution""."
thannara123
Associate III
August 27, 2024

if it duplicate , in one pwm cycle there are two ccr value , is it distrote the wave . please how do i to get a smooth sinewave ?

 

Sarra.SBest answer
ST Employee
August 28, 2024

Hello,

In center-aligned PWM mode, the counter counts both up and down within a single period. This means that each value in the sine wave table will be used twice: once during the up-counting phase and once during the down-counting phase. I think you should try to provide each sine table value twice in the DMA array 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.