mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-08-20 03:52:08 +08:00
turn on TIM side update IRQs
This commit is contained in:
@@ -239,6 +239,10 @@ void start_adc_pwm() {
|
||||
__HAL_TIM_MOE_DISABLE_UNCONDITIONALLY(&htim1);
|
||||
__HAL_TIM_MOE_DISABLE_UNCONDITIONALLY(&htim8);
|
||||
|
||||
// Enable the update interrupt (used to coherently sample GPIO)
|
||||
__HAL_TIM_ENABLE_IT(&htim1, TIM_IT_UPDATE);
|
||||
__HAL_TIM_ENABLE_IT(&htim8, TIM_IT_UPDATE);
|
||||
|
||||
// Start brake resistor PWM in floating output configuration
|
||||
htim2.Instance->CCR3 = 0;
|
||||
htim2.Instance->CCR4 = TIM_APB1_PERIOD_CLOCKS + 1;
|
||||
|
||||
Reference in New Issue
Block a user