embOS interrupt priority on STM32F103

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

  • embOS interrupt priority on STM32F103

    Hello,

    I want to use embOS on the STM32F103 MCU. That MCU has only interrupt priorities fom 0 .. 15.


    I've read that embOS on Cortex-M3 MCUs use interrupt priority 0 .. 127 as fast interrupts and
    priority 128 to 255 as interrupts from which embOS APIs can be called. Does that mean that on the
    STM32F103 no embOS APIs can be called from any interrupt?

    Best regards.
  • Hello,

    the Cortex-M3 supports up to 256 levels of programmable priority. Most Cortex-M3 chips have fewer supported levels, for example 8, 16, 32, and so on. The chip designer can customize the chip to obtain the levels required. At least, there is a minimum of 8 preemption levels.
    The priority registers are stored with the implemented values first. This means that if there are four bits of priority, the priority value is stored in bits [7:4] of the byte. However, if there are three bits of priority, the priority value is stored in bits [7:5] of the byte. This means that an application can work even if it does not know how many priorities are possible.

    embOS uses interrupt priority level 0..127 as fast interrupt level and interrupt priority level 128 to 255 as embOS priority level. That means when only 4 bits are implemented the following interrupt priority values are possible: 240, 224, 208, ... ,32, 16, 0. Therefore embOS API calls are allowed for interrupt priority level 128 to 255 but not all priority levels exists.

    Best 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.