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.
比如说,系统时钟100MHz,CMPA的值为32,CMPAHR的值最大为56(180ps),如果我给CMPAHR值写入100的话,那么PWM输出会怎么变化?会在计数器值等于33时强制变化PWM输出电平,还是等到CMPAHR寄存器计数到100时变化?此时微步长总时间明显已大于时钟时间。按照手册里介绍,高分辨率一般处理占空比小数部分,就是CMPAHR值一般小于56.
CMPAHR的最大值是65536(16位寄存器),但是有效位是8位,也就是256,如果超过56就等于在整数部分+1.