TM4C123GH6PM中定时器能否向PWM那样由系统时钟分频得到?应该怎么配置?
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.
楼上正解。
定时器直默认接使用主时钟的。因此设置定时器周期的时候,直接拿系统频率去换算就行。
头文件中有一个函数 void TimerPrescaleSet(uint32_t ui32Base, uint32_t ui32Timer,uint32_t ui32Value);这个函数可以给定时器分频吧!我用了以后就发现频率下降了呢!