cancel
Showing results for 
Search instead for 
Did you mean: 

stm32g491 crashes in HAL_Init when using timer1!

char_array
Associate III

I select tim1 for sys source in STM32CubeMX and generate code.

I use STM32CubeMX V6.4.0.

I added a stripped example of the code that crashes. HAL_NVIC_EnableIRQ crashes.

10 REPLIES 10

> SCB->VTOR should be cleared at reset.

It *is* cleared, but as initial boot was probably from system memory (dangling BOOT0) just overriden by the debugger, the system memory is still mapped at 0 instead of the user FLASH.

Reading memory from 0x0000'0000 and/or SYSCFG_MEMRMP.MEM_MODE would tell the truth.

JW