I was building a simple Blink application on STM8S, the LED on-off interval was controlled by Delay function using TIM4 Interrupt. A button event monitor is using another external Interrupt to prevent the interference from the Timer Interrupt.
But I also found out that even the button event is not interrupted by the Delay function, but the Function associated with it still gets interrupted by the Delay function, it will only execute after delay() returns no matter how early I press the button.
Is there a way to bypass this? Should I enable another TIMER(like TIM2) to independently handle the button event? I need some insights.