This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

The time is different!



When I compile a small program about the PWM ,then I get the .out file.  I download  this file seven times to the DSP28335 RAM ,and step debug the program. I check the change of the TBCTR of the PWM. Although the .out file is same and the debug procedure are same.But I got the number of the TBCTR is different.

                                                                                                      time 1...........................time 7

EPwm1Regs.TBCTL.bit.PHSEN = TB_DISABLE;                        1    1    1    0    1    0    0
EPwm1Regs.CMPB = period*1/2;                                                   0    0    1    2    1    2    0     
EPwm1Regs.TBPHS.all = 0;                                                             0    0    2    1    1   2    1
   
EPwm1Regs.TBCTL.bit.CLKDIV = TB_DIV1;                                1    0     1    0    1    0    2
EPwm1Regs.TBCTL.bit.HSPCLKDIV = TB_DIV1;                        0    0    0     0    0    0    0
EPwm1Regs.TBCTL.bit.SYNCOSEL = TB_SYNC_DISABLE;    1    1    1     1    1    1    1

even the same sentence of the program execute use the different TBCLK.

Can some people help me solve this problem?Thank you!