stm32 - Break function execution from interrupt -


i write firmware stm32. there function a() executes in main loop. need break execution of function if happens uart interrupt! possible? thanks)

of course can that. canonical method create volatile flag variable accessible within scope of both irq , a() method. initialise false.

when irq method wants tell a() method sets flag true. in a() method poll flag , if it's true act upon it.

the fact you're asking makes me think perhaps you're making blocking call somewhere in a() , want somehow forcibly unblocked interrupt code. that's not possible. if code you'll need redesign non-blocking.


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -