Browse Source

update

master
zhaohe 2 years ago
parent
commit
4893e4c7eb
  1. 2
      chip/zpwm_generator.cpp

2
chip/zpwm_generator.cpp

@ -49,7 +49,7 @@ void ZPWMGenerator::startPWM(float freq, float duty) {
if (HAL_TIM_PWM_ConfigChannel(m_htim, &sConfigOC, m_channel) != HAL_OK) {
Error_Handler();
}
// HAL_TIM_PWM_Start(m_htim, Channel);
HAL_TIM_PWM_Stop(m_htim, m_channel);
if (HAL_TIM_PWM_Start(m_htim, m_channel) != HAL_OK) {
Error_Handler();
}

Loading…
Cancel
Save