Are functions reentrant?
Functions are not reentrant. The local variables are not placed on a stack; their address is set at compile time. If a function calls itself, or a function is being executed from both the main loop and within an interrupt, the second call to the function will use the same memory. In this case local variables will become corrupted. ETPU_functions are reentrant, in the sense that multiple channels can dispatch the same function. C functions called from within ETPU_functions are not reentrant.