Sunday, February 18th 2018, 9:56am UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Tucepi

Beginner

Date of registration: Mar 18th 2008

Posts: 5

1

Wednesday, October 8th 2008, 4:25pm

embOS error " OS_ERR_ILLEGAL_OUT_ISR" (no. 162)

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 ?

SEGGER - Til

Super Moderator

Date of registration: Nov 14th 2007

Posts: 264

2

Thursday, October 9th 2008, 3:20pm

Hello Tucepi,

There are some functions which are only allowed to be called from within an interrupt function.
These functions are:

OS_OnTx()
OS_TICK_Handle()
OS_TICK_HandleEx()

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?

Regards,
Til

Tucepi

Beginner

Date of registration: Mar 18th 2008

Posts: 5

3

Thursday, October 9th 2008, 4:39pm

embOS error no. 162

Hello Til,

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.

SEGGER - Til

Super Moderator

Date of registration: Nov 14th 2007

Posts: 264

4

Monday, October 13th 2008, 9:15am

Hello Tucepi,

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().

Regards,
Til

Similar threads