cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G031F8P6 Startup Problem with CubeMX generated code SysTick on Timer16

SThor.2
Associate

I seem to be having issues with a basic CubeMX generated setup on my G0 board. I seem to end in nowhere land after any timer interrupt takes place, when i stop the debugger i am somewhere around (0x1fff1xxx)

Even if try to run a basic timer setup with CubeMX doing all the code generation for SysTick on timer 16. As soon as the TIM16 interrupt is enabled in HAL_Init after it setups the timer this happens a random number of few instructions afterwards.

Everything looks OK on the surface.

-Fresh CubeMX setup. Default interrupt table location.

-Bootmode0 is pulled low with 10k resistor (Flash boot)

-Interrupt table has .word TIM16_IRQHandler         /* TIM16            */

-I have void TIM16_IRQHandler(void) to catch it

HAL Init seems to set up the clock for the periheral, settings, etc.

What am i missing?

1 REPLY 1
SThor.2
Associate

I have verified the vector table looks correct. The address of TIM16_IRQHandler appear in the correct spot in the vector table.

As extra information i am running with the internal RCs without external crystals.

Once the event has happened the priority mask is 0x1

SP : 0x20000e38 (valid place i think)

PC: 0x1fff11ec (somewhere in flash, i would expect 0x800xxxxx right?)

basepri, faultmask, control is 0

Any ideas?