cancel
Showing results for 
Search instead for 
Did you mean: 

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

thannara123
Senior

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 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Sarra.S
ST Employee

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.

View solution in original post

3 REPLIES 3
TDK
Guru

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".

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.S
ST Employee

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.