随后笔者采用了莽着来的定点清楚的操作:
(void)TMRA_PWM_StructInit(&stcPwmInit);
stcPwmInit.u16StartPolarity = TMRA_PWM_LOW;
stcPwmInit.u16StopPolarity = TMRA_PWM_HIGH;
stcPwmInit.u16CompareMatchPolarity = TMRA_PWM_HIGH;
stcPwmInit.u16PeriodMatchPolarity = TMRA_PWM_LOW;
GPIO_SetFunc(GPIO_PORT_A, GPIO_PIN_04, TMRA_PWM_PIN_FUNC);
stcPwmInit.u32CompareValue = ret_compare;
(void)TMRA_PWM_Init(CM_TMRA_3, TMRA_CH5, &stcPwmInit);
TMRA_SetPeriodValue(CM_TMRA_3,ret_period);
TMRA_SetCompareValue(CM_TMRA_3, TMRA_CH5, ret_compare);
|
———————————————— 版权声明:本文为CSDN博主「GreenDreamer」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。 原文链接:https://blog.csdn.net/a982606774/article/details/126805498