Wednesday, April 25th 2018, 6:37am UTC+2

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.

Vakaras

Beginner

Date of registration: May 23rd 2013

Posts: 2

1

Friday, August 30th 2013, 7:22pm

OS_ERR_DICNT error after OS_WaitEvent_Timed()

Hello,

I have a problem with OS_WaitEvent_Timed() function - it raises OS_ERR_DICNT error after waking up event, and entering to this function again.
For ex.:

Source code

1
2
3
4
5
6
7
while (1) 
{
   EvMask = OS_WaitEvent_Timed(0xFFFFFFFF, 50); //< Exits after event arrives.
   if (EvMask)
   {   OS_WaitEvent_Timed(0xFFFFFFFF, 50);  //< Should exit after timeout, but raises OS_ERR_DICNT error.
   }
}

Few interrupts exists in the system, and all has the same priority. No nested interrupts. I don't see problems with my interrupts. Here is IRQ low level routine:

Source code

1
2
3
4
5
6
7
8
9
void OS_irq_handler(void) {
  OS_ISR_HANDLER* pISR;

  pISR = (OS_ISR_HANDLER*) AIC->AIC_IVR;   // Read interrupt vector to release nIRQ to CPU core
  OS_EnterInterrupt();             	// Inform OS that interrupt handler is running
  pISR();                          	// Call interrupt service routine
  OS_LeaveInterrupt();             	// Leave interrupt, perform task switch if required
  AIC->AIC_EOICR = 0;                  	// interrupt controller =>  Restore previous priority
}

Using latest 3.88a embOS, Cortex-A5 CPU.
Where could be a problem?

SEGGER - Til

Super Moderator

Date of registration: Nov 14th 2007

Posts: 266

2

Monday, September 2nd 2013, 8:30am

Hello,

we are not aware of any problems with task events.
Could you please contact our support directly?
Maybe it's possible to send us a project with which we can reproduce this issue?

Best regards,
Til

Vakaras

Beginner

Date of registration: May 23rd 2013

Posts: 2

3

Monday, September 2nd 2013, 10:30am

Hello,
Thanks for the answer.
Seems that the problem was in the application - a command used huge memory array of stack, which was much more than a task had. So application probably modified OS internals, and at the 2nd call of OS_WaitEvent_Timed() raised error.

So the OS seems to be working good. :thumbup: