2021-06-09 03:03 AM
I would like to develope a program for a custom board that uses an external 8MHz cristal oscillator and a STM32G441RBT6 as a MCU. I configure the HCLK to be 120MHz with the PLL but when I try to do a HAL_Delay or a TIM count it gets stuck not counting.
I want the Systick to count 1ms in order to capture a signal each 100ms. So I would like to be able to do the TIM7 interrupt and the HAL_Delay in order to wait for the answer.
Also, I have attached the captures from the CubeMx Clocks, and the code of the main app.
2021-06-09 06:21 AM
You're calling blocking HAL functions in an interrupt. In order to do so, you need to ensure the SysTick interrupt is numerically lower than the interrupt you're calling it from.
2021-06-09 11:51 PM
If I remove all the interrupts except the systick, the problem still exists. Also, I have change the priority of the interrupts to be the systick the lowest. The problem is that the Systick does not enter in the interrupt routine, so it is not counting.