Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

What is the easiest way to find if certain part of code is executed from ISR?

I am using FreeRTOS and some of the commands there have two flavors: for using in regular code flow and when are executed from an ISR, but in nRF SDK components and examples is  difficult to see right away all the call stack through if there is some ISR there  and errors for executing FreeRTOS regular commands from an ISR context are not always generated, so I’m curious  what will be the best practice to check if certain code is executed from any ISR down the call stack?

Thanks