中级会员
 
- 积分
- 368
- 金钱
- 368
- 注册时间
- 2015-9-7
- 在线时间
- 82 小时
|
发表于 2016-11-23 16:57:59
|
显示全部楼层
本帖最后由 淡淡的鼬殇 于 2016-11-23 16:59 编辑
有个定时器计数寄存器设置的函数 /**
* @brief Sets the TIMx Counter Register value
* @param TIMx: where x can be 1 to 17 to select the TIM peripheral.
* @param Counter: specifies the Counter register new value.
* @retval None
*/
void TIM_SetCounter(TIM_TypeDef* TIMx, uint16_t Counter)
{
/* Check the parameters */
assert_param(IS_TIM_ALL_PERIPH(TIMx));
/* Set the Counter Register value */
TIMx->CNT = Counter;
}
|
|