Uncertainty about portYIELD_FROM_ISR()


If use STM’s MCU with ARM Cotex-M, Is it required to put this MACRO at the very end of ISR.

Arm Cortex-M ports use a bottom priority interrupt to trigger the scheduler, so there isn’t a requirement that the use of portYIELD_FROM_ISR be at the very end.

I do find that if I am doing things the recommended way, defining the wasWoken flag at the top of the ISR and using it on all the FromISR calls that might wake up a task, that putting it at the end is not an issue.

Thanks for replay so fast.