embOS cortex M3 problem in interrupt with OS_SignalCSema()

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

  • embOS cortex M3 problem in interrupt with OS_SignalCSema()

    Hi,

    we have a task that is waiting a signal (OS_WaitCSemaTimed()) from an uart interrupt handler. When the interrupt handler is called the OS_SignalCSema() is used to wake up the task.
    the problem is that sometimes all system is freezed in OS_SignalCSema().

    note: we use OS_EnterInterrupt() and OS_LeaveInterrupt() in the interrupt handler. there are only one task, and two interrupt source (the first from systick and the second from uart).

    we have a trial version of embOS 3.84 for Cortex M3 and IAR version 6.21 on stellaris lm3s9D96.

    Thanks in advance for your help.

    regards.
  • Hello,

    which interrupt priority has your uart interrupt handler?
    Is it possible to send us a project with which we can reproduce this problem?

    Regards,
    Til
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hello,

    Priorities are set to default value (0) for both interrupt.

    We replace semaphore by event mechanism and it works correctly (OS_SignalEvent(), OS_WaitEventTimed() ). Strange ... . If this information can help you?

    thanks,

    Regards.

    phlb.
  • Hello,

    please be aware that with Cortex M3 the value 0 is the highest interrupt priority!
    You must not call embOS API functions from zero latency interrupts.
    Zero latency interrupts (or also called fast interrupts) are interrupts with an interrupt priority < 128.
    Please have a look in the embOS CPU/Compiler specific manual for more details.

    Could you please check it and let me know if this solves your problem?

    Regards,
    Til
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hello,

    It works!!! thanks for your help and sorry, I didn't read the documentation correctly about interrupts priority and embOS API.

    we have another problem at start up with embOS 3.84, I'm going to create another thread about it.

    Thanks very much.

    Regards.

    phlb.