Problems with fast subsequent rising and falling callback functions
I have the STM32G030K6T.
Connecting a magnet to my magnet detector causes HAL_GPIO_EXTI_Rising_Callback and removing the magnet causes HAL_GPIO_EXTI_Falling_Callback. I think I have too much code inside these functions. Inside these functions I'm fading LEDs up and down using HAL_TIM_SET_COMPARE. Executing these functions takes about 0.3 seconds. When I'm quickly connecting and disconnecting the magnet, the main program becomes unresponsive and only rising and falling callbacks are executed after this. My main program takes voltage measurements and runs a simple state machine.
What happens when these callbacks are "stacked" too much? Why does the main program become unresponsive?
EDIT: If I'm transmitting a lot of UART messages in main program the unresponsiveness happens fast. If i remove the UART messages the program might run for a while longer. Assuming I'm connecting and disconnecting the magnet for the whole time.
