The problem: if TIM2 is used prior to my code, then it gets stuck at a certain point, even though all the registers are properly set.* Here is the configuration of TIM2 registers when it works fine:(gdb) x/21 $TIM2_BASE0x40000000: 0x00000001 0x000000...