__NVIC_EnableIRQ Can not enable TIM2
I'm learning to port FreeRTOS to my STM32F407, but I'm running into problems with HAL initializing TIM2.
After HAL_OK the program is supposed to enable TIM2IRQ via NVIC_EnableIRQ(), but the operation of writing to NVIC->ISER doesn't seem to work.
NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));So I followed this post and modified 'CMSIS\Include\core_cm4.h', but again it didn't work.
uint32_t data;
uint32_t index;
if ((int32_t)(IRQn) >= 0)
{
__COMPILER_BARRIER();
index = ((uint32_t)IRQn) >> 5UL;
data = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
NVIC->ISER[index] = data;
__COMPILER_BARRIER();
}My debugger won't continue after this expression, any ideas?
