OS_ERR_DICNT error after OS_WaitEvent_Timed()

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

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

    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. void OS_irq_handler(void) {
    2. OS_ISR_HANDLER* pISR;
    3. pISR = (OS_ISR_HANDLER*) AIC->AIC_IVR; // Read interrupt vector to release nIRQ to CPU core
    4. OS_EnterInterrupt(); // Inform OS that interrupt handler is running
    5. pISR(); // Call interrupt service routine
    6. OS_LeaveInterrupt(); // Leave interrupt, perform task switch if required
    7. AIC->AIC_EOICR = 0; // interrupt controller => Restore previous priority
    8. }

    Using latest 3.88a embOS, Cortex-A5 CPU.
    Where could be a problem?
  • 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: