4945| 4
|
请教一下同时开启定时器的问题 |
1金钱
最佳答案用定时器的主从模式啊,STM32那么强大的定时器,定时器间同步简直小菜一碟。
首先选择一个主定时器,如TIM1,将它的TRGO信号设定为001:Enable,即TIM1的EN位开启时输出1,关闭时输出0,需要操作的寄存器是TIMx_CR2,Bits 6:4 MMS[2:0]: Master mode selection
001: Enable - the Counter enable signal, CNT_EN, is used as trigger output (TRGO). It is useful to start several timers at the same time or to control a wi ...
| ||
| ||
坚决不用寄存器,拒绝重复造轮子。
|
||
| ||
| ||
| ||
|手机版|OpenEdv-开源电子网
( 粤ICP备12000418号-1 )
GMT+8, 2025-6-27 23:30
Powered by OpenEdv-开源电子网
© 2001-2030 OpenEdv-开源电子网