Skip to content

Commit

Permalink
raise the IMU interrupts priority again for it to work during ranging
Browse files Browse the repository at this point in the history
  • Loading branch information
corruptbear committed Aug 9, 2024
1 parent 859b930 commit 596cea1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions software/firmware/src/peripherals/src/imu.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,8 @@ void imu_init(void)
configASSERT0(am_hal_gpio_pinconfig(PIN_IMU_INTERRUPT, am_hal_gpio_pincfg_input));
configASSERT0(am_hal_gpio_interrupt_control(AM_HAL_GPIO_INT_CHANNEL_0, AM_HAL_GPIO_INT_CTRL_INDV_ENABLE, &imu_interrupt_pin));
configASSERT0(am_hal_gpio_interrupt_register(AM_HAL_GPIO_INT_CHANNEL_0, PIN_IMU_INTERRUPT, imu_isr, NULL));
NVIC_SetPriority(GPIO0_001F_IRQn + GPIO_NUM2IDX(PIN_IMU_INTERRUPT), configMAX_SYSCALL_INTERRUPT_PRIORITY + 2);
NVIC_SetPriority(IOMSTR0_IRQn + IMU_I2C_NUMBER, configMAX_SYSCALL_INTERRUPT_PRIORITY + 1);
NVIC_SetPriority(GPIO0_001F_IRQn + GPIO_NUM2IDX(PIN_IMU_INTERRUPT), NVIC_configKERNEL_INTERRUPT_PRIORITY - 1);
NVIC_SetPriority(IOMSTR0_IRQn + IMU_I2C_NUMBER, NVIC_configKERNEL_INTERRUPT_PRIORITY - 2);
NVIC_EnableIRQ(GPIO0_001F_IRQn + GPIO_NUM2IDX(PIN_IMU_INTERRUPT));
NVIC_EnableIRQ(IOMSTR0_IRQn + IMU_I2C_NUMBER);

Expand Down

0 comments on commit 596cea1

Please sign in to comment.