I use microcontroller STR911FA(ARM966E-S) for my application. In this phase of developing emedded system I get during debugging embOS error no. 162 continually. What did I do wrong, where to start searching ? I know that this error is related with embOS timer interrupt(system) and function OS_HandleTick inside of it. But before entering, every interrupt routine embOS is inormed with OS_EnterInterrupt() command (in function OS_irq_handler). This applys for system(embOS timer) interrupt also. But why then this error appears ?
There are some functions which are only allowed to be called from within an interrupt function.
These functions are:
Please note that OS_HandleTick is just a define for OS_TICK_Handle, OS_HandleTick is obsolet.
So please check if you call one of this functions from outside an interrupt routine. Do you have this problem already with the
embOS start project?
Thank you for the answer. I use embOS 3.60 (rev 0) and there is this function OS_HandleTick inside of embOS Timer interrupt rutine _OS_ISR_Tick(). At the beginning (in the start project) this error didn't appear. I also thought that somwhere outside the interrupt routine this function or it's extended version were called but this isn't the case. I don't use embOSview so OS_OnTx also isn't the reason. But if calling this function outside interrupt routine is only thing that can cause this error(I did see that only this functions have OS_ASSERT_INT() call) I will do some more search.
You should try to find out which function causes the OS_Error. The first way is to look at the call stack and the second one is to set with your debugger the variable OS_Status to 0 and step through your code. This will ends the while loop in OS_Error() and you will step into the function which has called OS_Error().