ARM Cortex M3 with embOS and Nested vectored interrupt's

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

  • ARM Cortex M3 with embOS and Nested vectored interrupt's

    Hi,

    I'm using embOS V3.60d with the IAR Workbench for my STM32 controller.

    In my interrupt routine i would like to call the function OS_SignalEvent(0x01, &m_xyTcb).
    What is to consider if an OS-function is called from a nested interrupt? A simple example
    would help me.

    regards
  • The embos_cm3_iar.pdf file has the documentation for this (if you're using something other than IAR tools I assume that there's a similarly named document that has the details for your particular platform). There are 2 key items:

    1) embOS (at least in a default build) does not disable interrupts with a priority higher than 128 (ie., interrupt levels 0-127 are never disabled). Those so-called "fast interrupts" cannot make any embOS API calls. So make sure your interrupt that you want to call OS_SignalEvent() from is in the correct interrupt level range.

    2) On entry to the interrupt handler a call must be made to OS_EnterInterrupt()/OS_EnterNestableInterupt() and on leaving the interrupt a corresponding call to OS_LeaveInterrupt()/OS_LeaveNestableInterrupt() must be made.