Skip to main content
Graduate II
August 27, 2024
Solved

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

  • August 27, 2024
  • 2 replies
  • 988 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 

    2 replies

    Super User
    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.

     

    Graduate II
    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.SAnswer
    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