2022-03-02 08:03 AM
I could locate the HAL_NVIC_SetPriority() calls for DMA and EXT1 Interrupts in main.c as shown below.
I could not find the HAL_NVIC_SetPriority() calls for RTC, USART & Timers - TIM4, TIM5, TIM6, TIM7. Where is the interrupt priority for these peripherals set in the code by CubeMX?
The CubeMX configuration is as follows :
HAL_NVIC_SetPriority() calls found in main.c
static void MX_DMA_Init(void)
{
......
/* DMA interrupt init */
/* DMA1_Channel4_IRQn interrupt configuration */
HAL_NVIC_SetPriority(DMA1_Channel4_IRQn, 6, 0);
HAL_NVIC_EnableIRQ(DMA1_Channel4_IRQn);
/* DMA1_Channel7_IRQn interrupt configuration */
HAL_NVIC_SetPriority(DMA1_Channel7_IRQn, 4, 0);
HAL_NVIC_EnableIRQ(DMA1_Channel7_IRQn);
}
static void MX_GPIO_Init(void)
{
.....
/* EXTI interrupt init*/
HAL_NVIC_SetPriority(EXTI9_5_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(EXTI9_5_IRQn);
}
I am using :
STM32CubeMX 6.2.1.202103241236
STM32CubeIDE Version: 1.6.1 Build: 9958_20210326_1446 (UTC)
Processor is STM32F105RC with STM32Cube_FW_F1_V1.8.4
2022-03-02 07:46 PM
You can use Search -> File... to find all instances of HAL_NVIC_SetPriority to see if/where they exist.
It's possible they aren't set up at all if the peripheral isn't enabled.
2022-03-02 09:42 PM
Thanks, the HAL_NVIC_SetPriority() calls are added to the stm32f1xx_hal_msp.c file in the HAL_<Peripheral>_MspInit() functions