Processor Expert Priority System

Some CPUs support selectable interrupts priorities. The user may select a priority for each interrupt vector. The interrupt with a higher priority number can interrupt a service routine with the lower one.

Processor Expert supports the following settings in design-time: interrupt priority and priority of the event code.
Priority can be changed also in the user code. The user may use Cpu method to adjust the requested value.

Small microcontroller architectures support only a basic interrupt control: interrupts enabled or disabled. Settings of the interrupt priority may be ignored for such microcontrollers. The only option is to enable interrupts for the user event code.

Interrupt Priority

The user may select interrupt priority in the bean properties, just below the interrupt vector name. Processor Expert offers the following values, which are supported for all microcontrollers:

  • minimum priority
  • low priority
  • medium priority
  • high priority
  • maximum priority

 

The selected value is automatically mapped to the priority supported by the target microcontroller. It is indicated in the third column of the Bean Inspector.
The user may select a target-specific value (such as priority 255), if portability of the application to another architecture is not required.

Priority of the Event Code

The user can also select a priority for the processing of his/her event code. This priority may be different from the interrupt priority. However, the meaning of the number is the same - the event may be interrupted only by the interrupts with the higher priority number. Processor Expert offers the following architecture independent values:

  • same as interrupt - default value which means that the event priority is the same as the priority of interrupt service routine.
  • minimum priority
  • low priority
  • medium priority
  • high priority
  • maximum priority
  • interrupts disabled - e.g. the highest priority supported by the microcontroller, which may be interrupted only by non-maskable interrupts.

 

The selected value is automatically mapped to the priority supported by the target microcontroller and the selected value is displayed in the third column of the Bean Inspector.
The user may also select a target-specific value, if portability of the application to another architecture is not required.

Note: Some events do not support priorities, because their invocation is not caused by the interrupt processing.

 

 

[top of page]