类似下面这样,寄存器的值并没有改变,为什么呢?
uint16 array[2];
array[1] = 0x493E;
EvaRegs.T1PR=array[1] ; //1KHz的PWM,周期为1ms
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.
类似下面这样,寄存器的值并没有改变,为什么呢?
uint16 array[2];
array[1] = 0x493E;
EvaRegs.T1PR=array[1] ; //1KHz的PWM,周期为1ms
您可以使用CCS在线观察一下:在debug模式使用 view-->register
一般是直接常量赋值的
写入都都是常量值。可变周期的话,可以使用循环或者条件函数来再次初始化pwm配置