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.

关于C2000的TIMER_reload()的发现。有哪理解错的话请指出,谢谢。



timer.c中的TIMER_reload()函数中写:

// clear the bits
timer->TCR &= (~(uint32_t)TIMER_TCR_TRB_BITS);

TRB:

CPU-Timer Reload bit.
0 The TRB bit is always read as zero. Writes of 0 are ignored.
1 When you write a 1 to TRB, the TIMH:TIM is loaded with the value in the PRDH:PRD,
and the prescaler counter (PSCH:PSC) is loaded with the value in the timer dividedown
register (TDDRH:TDDR).

置一才reload,所以例程函数写错了。