Tool/software: Code Composer Studio
Hello to all members,
In pwm up-down counter mode, I set a breakpoint after make TBCTR = 0 about several clocks, By observing register windows i can get the following information
1. BIT[2] in TBSTS , CTRMAX == 1, It indicates that the time-base counter reached the max value 0xFFFF
2. BIT[0] in TBSTS , CTRDIR == 0, It means Time-Base Counter is currently counting down
3. TBCTR == 65506
4. TBPRD == 30000
If i set the breakpoint before make TBCTR = 0, then step over one by one, it seems that TBCTR is a correct value, With one-step debugging, its value gradually increases。
I am very confused how this happened, what makes TBCTR bigger than TBPRD?
Any help would be appreciate
thanks in advance