mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-11-01 00:48:39 +08:00
turn on TIM side update IRQs
This commit is contained in:
1 parent
8ac49bfe6e
commit
dbb16fc8e1
1 file changed
+4
@@ -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