楼主你好!
你需要先关闭计数器,再重新开启,然后counter就能重新运行了。
控制TPM计数器关闭的寄存器是TMPx_SC[CMOD].
其实关于这点,在TPMx_CONF【CSOO】位的讲解中也很清楚了“:
Once the counter has stopped
incrementing, the counter will not start incrementing unless it is disabled and then enabled again, or a
rising edge on the selected trigger input is detected when CSOT set.