ARM Cortex-M

From ERIKA WIKI
Jump to: navigation, search

Introduction

This manual describes the porting details of the ERIKA Enterprise v3 kernel(s) for families of microcontrollers which integrate ARM Cortex-M CPUs.

Cortex-M features supported

The following are the main features of the currently implemented support:

Additionally, we are porting ERIKA3 also on a ARM Cortex-M7 CPU on ST 32F746GDISCOVERY board with STM32F746NG MCU.

In the next months, the public code will be delivered through the GitHub repository. In case of urgent need, please contact us.

Tutorials

The following tutorials are available for this architecture:

Configuration and Programming

ERIKA Enterprise is configured through RT-Druid and an OIL file and some other properties.

The following sections describe the properties and OIL fields customized for ARM Cortex-M architecture.

GCC Compiler Path

It is possible to choose the path in three different ways:

  • Specific environment variables: ARM_TOOLS
    • E.g.: ARM_TOOLS=C:\Program Files (x86)\GNU Tools ARM Embedded\4.9 2015q3
  • RT-Druid Eclipse IDE Property.
  • RT-Druid Configuration File Entry: preference_cortex_m__path_for_gcc_compiler
    • E.g.: preference_cortex_m__path_for_gcc_compiler=C:\Program Files (x86)\GNU Tools ARM Embedded\4.9 2015q3

Here is an example of RT-Druid configuration file.

S32 SDK Path

It is possible to choose the path in three different ways:

  • Specific environment variables: S32_SDK_FILES
    • E.g.: S32_SDK_FILES=C:\NXP\S32DS_ARM_v2.0\S32DS\S32SDK_S32K14x_EAR_0.8.4
  • RT-Druid Eclipse IDE Property.
  • RT-Druid Configuration File Entry: preference_cortex_m__path_for_s32_sdk
    • E.g.: preference_cortex_m__path_for_s32_sdk=C:\NXP\S32DS_ARM_v2.0\S32DS\S32SDK_S32K14x_EAR_0.8.4

Here is an example of RT-Druid configuration file.

STM32F4 Cube Path

It is possible to choose the path in three different ways:

  • Specific environment variables: STM32_CUBE_F4_FILES
    • E.g.: STM32_CUBE_F4_FILES=C:\Evidence\STM32Cube_FW_F4_V1.25.0
  • RT-Druid Eclipse IDE Property.
  • RT-Druid Configuration File Entry: preference_cortex_m__path_for_stm32_cube_f4
    • E.g.: preference_cortex_m__path_for_stm32_cube_f4=C:\Evidence\STM32Cube_FW_F4_V1.25.0

Here is an example of RT-Druid configuration file.

Lauterbach TRACE32 Path

It is possible to choose the path in two different ways:

  • RT-Druid Eclipse IDE Property.
  • RT-Druid Configuration File Entry: preference_lauterbach__path_for_trace32
    • E.g.: preference_lauterbach__path_for_trace32=C:\T32

Here is an example of RT-Druid configuration file.

Lauterbach Emulator Interface

It is possible to choose the path in two different ways:

  • RT-Druid Eclipse IDE Property.
  • RT-Druid Configuration File Entry: preference_lauterbach__emulator_usb_interface
    • E.g.: preference_lauterbach__emulator_usb_interface=true

Here is an example of RT-Druid configuration file.

CPU

CPU_DATA object must be set to CORTEX_M.

Example of a CPU_DATA section:

   CPU_DATA = CORTEX_M {
     ...
   };

MODEL

MODEL attribute of CPU_DATA supports the M4, M4F, M7 and M7F values. Deafult value is M4.

Example of a MODEL attribute of CPU_DATA section:

   CPU_DATA = CORTEX_M {
     MODEL = M4;
     ...
   };

FPU Support

Selecting M4F or M7F in the MODEL attribute of CPU_DATA the FPU support is enabled by default.

To disable the FPU support the DISABLE_FPU sub-field of M4F/M7F model SHALL be se to TRUE as shown in the following example:

   CPU_DATA = CORTEX_M {
     MODEL = M4F {
          DISABLE_FPU = TRUE;
     };
     ...
   };

COMPILER

COMPILER attribute of CPU_DATA supports for now the GCC value only. Deafult value is GCC.

Example of a COMPILER attribute of CPU_DATA section:

   CPU_DATA = CORTEX_M {
     MODEL = M4;
     COMPILER = GCC;
     ...
   };

MINIMAL_OPTS

MINIMAL_OPTS boolean property of COMPILER attribute of CPU_DATA configures the build system with minimal compiling and linking options. That allow an user to specify it's own compiler and linker oprions via CFLAGS, CXXFLAGS and LDFLAGS. The default value is set to FALSE.

Example of a MINIMAL_OPTS property of COMPILER attribute of CPU_DATA section:

   CPU_DATA = CORTEX_M {
     MODEL = M4;
     COMPILER = GCC {
          MINIMAL_OPTS = TRUE;
     };
     ...
   };

LINKER_SCRIPT

LINKER_SCRIPT boolean property of COMPILER attribute of CPU_DATA configures the build system to use an external linker script that SHALL be placed in the project root folder.

Example of a LINKER_SCRIPT property of COMPILER attribute of CPU_DATA section:

   CPU_DATA = CORTEX_M {
     MODEL = M4;
     COMPILER = GCC {
          LINKER_SCRIPT = "myLinkerScript.ld";
     };
     ...
   };

EXECUTE_FROM_RAM

EXECUTE_FROM_RAM attribute of CPU_DATA configures the build system generate binary to execute the application in RAM. The default value is set to FALSE.

Example of a COMPILER attribute of CPU_DATA section:

   CPU_DATA = CORTEX_M {
     MODEL = M4;
     EXECUTE_FROM_RAM = TRUE;
     ...
   };

TRACER

TRACER attribute of CPU_DATA configures the build system to generate Lauterbach TRACE32 scripts to enable the tracing support. This attribute make sense in the MCUs that implements ITM and/or ETM hardware. Supported values are OFF, SWO and OFFCHIP. The default value is set to OFF.

Example of a TRACER attribute of CPU_DATA section:

   CPU_DATA = CORTEX_M {
     MODEL = M4;
     TRACER = OFFCHIP;
     ...
   };

SYS_STACK_SIZE

SYS_STACK_SIZE attribute of CPU_DATA configures the size in bytes of the system stack. The default value is set to 1024.

Example of a TRACER attribute of CPU_DATA section:

   CPU_DATA = CORTEX_M {
     MODEL = M4;
     SYS_STACK_SIZE = 2048;
     ...
   };

MCU

MCU_DATA object supports for now only the followings MCUs:

  • S32K1XX: NXP S32K1xx Family
  • STM32F4: ST STM32F4 Family
  • STM32H7: ST STM32H7 Family

Example of a MCU_DATA section:

   MCU_DATA = S32K1XX {
     ...
   };

MODEL

MODEL attribute of MCU_DATA supports for now the followings models for every family of MCU:

  • S32K1XX: NXP S32K1xx Family
    • S32K144 (default)
    • S32K148
  • STM32F4: ST STM32F4 Family
    • STM32F407XX (default)
    • STM32F429XX (currently only supported in a special version done for the Huawei University Challenge)
  • STM32H7: ST STM32H7 Family
    • STM32H753XX (default)

Example of MODEL attribute of a MCU_DATA section:

   MCU_DATA = S32K1XX {
     MODEL = S32K148;
     ...
   };

BOARD

BOARD_DATA object supports for now only the followings boards for every MCU

  • S32K1XX: NXP S32K1xx Family
    • S32K144
      • S32K144EVB_Q100
    • S32K148
      • S32K148EVB_Q144_Q176
  • STM32F4: ST STM32F4 Family
    • STM32F407XX
      • STM32F4_DISCOVERY
    • STM32F429XX
      • STM32F429I_DISC1
    • STM32H753XX
      • STM32H753I_EVAL2

Default value is NO_BOARD.

Example of a BOARD_DATA section:

 BOARD_DATA = S32K148EVB_Q144_Q176;

LIB

LIB object supports for now the followings libraries for every family of MCU:

Example of a LIB section:

   LIB = S32_SDK {
     ...
   };

S32 SDK

The following sections describe the OIL fields of the LIB object customized for the official S32 SDK supports.

NOTE: The complete documentation of the S32SDK provided by S32 Design Studio IDE for Arm based MCUs is not part of ERIKA3.

NOTE: Please keep in mind that every time an user configures a driver or a module to use interrupts, a corresponding ISRs with correct relative source shall be defined in the OIL file to let ERIKA3 to correctly manage ISRs.

BOARD

BOARD attribute of S32_SDK supports for now only the followings boards for every MCU:

  • S32K144
    • S32K144EVB_Q100
  • S32K148
    • S32K148EVB_Q144_Q176

Default value is S32K144EVB_Q100.

Example of SDK_BOARD attribute of S32_SDK:

   LIB = S32_SDK {
     BOARD = S32K148EVB_Q144_Q176;
     ...
   };

VERSION

VERSION attribute of S32_SDK supports for now the "0.8.4 EAR" and "0.8.6 EAR" value only.

Example of VERSION attribute of S32_SDK:

   LIB = S32_SDK {
     BOARD = S32K148EVB_Q144_Q176;
     VERSION = "0.8.4 EAR";
     ...
   };

STAND_ALONE

STAND_ALONE boolean attribute of S32_SDK configures the build system to generate or not libs32sdk.a stand-alone binary library. The default value is set to TRUE. Default value is TRUE.

Example of STAND_ALONE attribute of S32_SDK:

   LIB = S32_SDK {
     BOARD = S32K148EVB_Q144_Q176;
     VERSION = "0.8.4 EAR";
     STAND_ALONE = TRUE;
   };

STM32 CUBE F4

The following sections describe the OIL fields of the LIB object customized for the official STM32 CUBE F4 supports.

NOTE: The complete documentation of the STM32Cube MCU Package for STM32F4 series is not part of ERIKA3.

NOTE: Please keep in mind that every time an user configures a driver or a module to use interrupts, a corresponding ISRs with correct relative source shall be defined in the OIL file to let ERIKA3 to correctly manage ISRs.

BOARD

BOARD attribute of STM32_CUBE_F4 supports for now only the followings boards for every MCU:

  • STM32F407XX
    • STM32F4_DISCOVERY
  • STM32F429XX
    • STM32F429I_DISC1

Example of SDK_BOARD attribute of STM32_CUBE_F4:

   LIB = STM32_CUBE_F4 {
     BOARD = STM32F429I_DISC1;
     ...
   };

VERSION

VERSION attribute of STM32_CUBE_F4 supports for now the "1.18.0", "1.24.0" and "1.25.0" values only.

Example of VERSION attribute of STM32_CUBE_F4:

   LIB = STM32_CUBE_F4 {
     BOARD = STM32F429I_DISC1;
     VERSION = "1.25.0";
     ...
   };

STAND_ALONE

STAND_ALONE boolean attribute of STM32_CUBE_F4 configures the build system to generate or not libstm32cubef4.a stand-alone binary library. The default value is set to TRUE.

Example of STAND_ALONE attribute of STM32_CUBE_F4:

   LIB = STM32_CUBE_F4 {
     BOARD = STM32F429I_DISC1;
     VERSION = "1.25.0";
     STAND_ALONE = TRUE;
   };

Interrupt Handling

Traps

ARM Cortex-M CPU has followings default traps that could be used as SOURCE in the ISRs configuration of ERIKA3.

  • NMI: Non-maskable Interrupt (NMI) Trap
  • HARD_FAULT: Hard Fault Trap
  • BUS_FAULT: Bus Fault Trap
  • USAGE_FAULT: Usage Fault Trap
  • DEBUG_MONITOR: Debug Monitor Trap
  • SYSTICK: SysTick Trap

Interrupts

The Interrupt Handling support is microcontroller dependent. For each supported microcontroller family, the ISRs configuration of ERIKA3 is shown below.

S32K1XX Family

The S32K1XX family microcontrollers has an interrupt vector table which could be stored in the flash or in RAM. The complete list of SOURCE entries is shown below.

  • DMA0: DMA channel 0 transfer complete
  • DMA1: DMA channel 1 transfer complete
  • DMA2: DMA channel 2 transfer complete
  • DMA3: DMA channel 3 transfer complete
  • DMA4: DMA channel 4 transfer complete
  • DMA5: DMA channel 5 transfer complete
  • DMA6: DMA channel 6 transfer complete
  • DMA7: DMA channel 7 transfer complete
  • DMA8: DMA channel 8 transfer complete
  • DMA9: DMA channel 9 transfer complete
  • DMA10: DMA channel 10 transfer complete
  • DMA11: DMA channel 11 transfer complete
  • DMA12: DMA channel 12 transfer complete
  • DMA13: DMA channel 13 transfer complete
  • DMA14: DMA channel 14 transfer complete
  • DMA15: DMA channel 15 transfer complete
  • DMA_ERR: DMA error interrupt channels 0-15
  • MCM_FPU: FPU sources
  • FTFC_CMD: FTFC Command complete
  • FTFC_RDC: FTFC Read collision
  • PMC_LVD: PMC Low voltage detect interrupt
  • FTFC_FAULT: FTFC Double bit fault detect
  • WDOG_EVM: Single interrupt vector for WDOG and EWM
  • RCM: RCM Asynchronous Interrupt
  • LPI2C0_MASTER:LPI2C0 Master Interrupt
  • LPI2C0_SLAVE: LPI2C0 Slave Interrupt
  • LPSPI0: LPSPI0 Interrupt
  • LPSPI1: LPSPI1 Interrupt
  • LPSPI2: LPSPI2 Interrupt
  • LPI2C1_MASTER:LPI2C1 Master Interrup
  • LPI2C1_SLAVE: LPI2C1 Slave Interrupt
  • LPUART0: LPUART0 Transmit
  • LPUART1: LPUART1 Transmit
  • LPUART2: LPUART2 Transmit
  • ADC0: ADC0 interrupt request
  • ADC1: ADC1 interrupt request
  • CMP0: CMP0 interrupt request
  • ERM_SINGLE: ERM single bit error correction
  • ERM_DOUBLE: ERM double bit error non-correctable
  • RTC_ALARM: RTC alarm interrupt
  • RTC_SECONDS: RTC seconds interrupt
  • LPIT0_CH0: LPIT0 channel 0 overflow interrupt
  • LPIT0_CH1: LPIT0 channel 1 overflow interrupt
  • LPIT0_CH2: LPIT0 channel 2 overflow interrupt
  • LPIT0_CH3: LPIT0 channel 3 overflow interrupt
  • PDB0: PDB0 interrupt
  • SAI1_TX: SAI1 Transmit Synchronous interrupt
  • SAI1_RX: SAI1 Receive Synchronous interrupt
  • SCG: SCG bus interrupt request
  • LPTMR0: LPTIMER0 interrupt request
  • PORTA: Port A pin detect interrupt
  • PORTB: Port B pin detect interrupt
  • PORTC: Port C pin detect interrupt
  • PORTD: Port D pin detect interrupt
  • PORTE: Port E pin detect interrupt
  • SWI: Software interrupt
  • QSPI0: QSPI All interrupts ORed output
  • PDB1: PDB1 interrupt
  • FLEXIO: FlexIO Interrupt
  • SAI0_TX: SAI0 Transmit Synchronous interrupt
  • SAI0_RX: SAI0 Receive Synchronous interrupt
  • ENET_TIMER: ENET 1588 Timer Interrupt - synchronous
  • ENET_TX: ENET Data transfer done
  • ENET_RX: ENET Receive Buffer Done for Ring/Queue 0
  • ENET_ERR: ENET Payload receive error
  • ENET_STOP: ENET Graceful stop
  • ENET_WAKE: ENET Wake from sleep
  • CAN0_ORED: CAN0 OR'ed [Bus Off OR Transmit Warning OR Receive Warning]
  • CAN0_ERR: CAN0 Interrupt indicating that errors were detected on the CAN bus
  • CAN0_WAKE: CAN0 Interrupt asserted when Pretended Networking operation is enabled, and a valid message matches the selected filter criteria during Low Power mode
  • CAN0_ORED_0_15: CAN0 OR'ed Message buffer (0-15)
  • CAN0_ORED_16_31: CAN0 OR'ed Message buffer (16-31)
  • CAN1_ORED: CAN1 OR'ed [Bus Off OR Transmit Warning OR Receive Warning]
  • CAN1_ERR: CAN1 Interrupt indicating that errors were detected on the CAN bus
  • CAN1_ORED_0_15: CAN1 OR'ed Message buffer (0-15)
  • CAN1_ORED_16_31: CAN0 OR'ed Message buffer (16-31)
  • CAN2_ORED: CAN2 OR'ed [Bus Off OR Transmit Warning OR Receive Warning]
  • CAN2_ERR: CAN0 Interrupt indicating that errors were detected on the CAN bus
  • CAN2_ORED_0_15: CAN1 OR'ed Message buffer (0-15)
  • CAN2_ORED_16_31: CAN0 OR'ed Message buffer (16-31)
  • FTM0_CH0_CH1: FTM0 Channel 0 and 1 interrupt
  • FTM0_CH2_CH3: FTM0 Channel 2 and 3 interrupt
  • FTM0_CH4_CH5: FTM0 Channel 4 and 5 interrupt
  • FTM0_CH6_CH7: FTM0 Channel 6 and 7 interrupt
  • FTM0_FAULT: FTM0 Fault interrupt
  • FTM0_OVF_RELOAD: FTM0 Counter overflow and Reload interrupt
  • FTM1_CH0_CH1: FTM1 Channel 0 and 1 interrupt
  • FTM1_CH2_CH3: FTM1 Channel 2 and 3 interrupt
  • FTM1_CH4_CH5: FTM1 Channel 4 and 5 interrupt
  • FTM1_CH6_CH7: FTM1 Channel 6 and 7 interrupt
  • FTM1_FAULT: FTM1 Fault interrupt
  • FTM1_OVF_RELOAD: FTM1 Counter overflow and Reload interrupt
  • FTM2_CH0_CH1: FTM2 Channel 0 and 1 interrupt
  • FTM2_CH2_CH3: FTM2 Channel 2 and 3 interrupt
  • FTM2_CH4_CH5: FTM2 Channel 4 and 5 interrupt
  • FTM2_CH6_CH7: FTM2 Channel 6 and 7 interrupt
  • FTM2_FAULT: FTM2 Fault interrupt
  • FTM2_OVF_RELOAD: FTM2 Counter overflow and Reload interrupt
  • FTM3_CH0_CH1: FTM3 Channel 0 and 1 interrupt
  • FTM3_CH2_CH3: FTM3 Channel 2 and 3 interrupt
  • FTM3_CH4_CH5: FTM3 Channel 4 and 5 interrupt
  • FTM3_CH6_CH7: FTM3 Channel 6 and 7 interrupt
  • FTM3_FAULT: FTM3 Fault interrupt
  • FTM3_OVF_RELOAD: FTM3 Counter overflow and Reload interrupt
  • FTM4_CH0_CH1: FTM4 Channel 0 and 1 interrupt
  • FTM4_CH2_CH3: FTM4 Channel 2 and 3 interrupt
  • FTM4_CH4_CH5: FTM4 Channel 4 and 5 interrupt
  • FTM4_CH6_CH7: FTM4 Channel 6 and 7 interrupt
  • FTM4_FAULT: FTM4 Fault interrupt
  • FTM4_OVF_RELOAD: FTM4 Counter overflow and Reload interrupt
  • FTM5_CH0_CH1: FTM5 Channel 0 and 1 interrupt
  • FTM5_CH2_CH3: FTM5 Channel 2 and 3 interrupt
  • FTM5_CH4_CH5: FTM5 Channel 4 and 5 interrupt
  • FTM5_CH6_CH7: FTM5 Channel 6 and 7 interrupt
  • FTM5_FAULT: FTM5 Fault interrupt
  • FTM5_OVF_RELOAD: FTM5 Counter overflow and Reload interrupt
  • FTM6_CH0_CH1: FTM6 Channel 0 and 1 interrupt
  • FTM6_CH2_CH3: FTM6 Channel 2 and 3 interrupt
  • FTM6_CH4_CH5: FTM6 Channel 4 and 5 interrupt
  • FTM6_CH6_CH7: FTM6 Channel 6 and 7 interrupt
  • FTM6_FAULT: FTM6 Fault interrupt
  • FTM6_OVF_RELOAD: FTM6 Counter overflow and Reload interrupt
  • FTM7_CH0_CH1: FTM7 Channel 0 and 1 interrupt
  • FTM7_CH2_CH3: FTM7 Channel 2 and 3 interrupt
  • FTM7_CH4_CH5: FTM7 Channel 4 and 5 interrupt
  • FTM7_CH6_CH7: FTM7 Channel 6 and 7 interrupt
  • FTM7_FAULT: FTM7 Fault interrupt
  • FTM7_OVF_RELOAD: FTM7 Counter overflow and Reload interrupt

STM32F4XX Family

The STM32F4XX family microcontrollers has an interrupt vector table which could be stored in the flash or in RAM. The complete list of SOURCE entries is shown below.

  • WWDG: Window Watchdog interrupt
  • PVD: PVD through EXTI line detection interrupt
  • TAMP_STAMP: Tamper and TimeStamp interrupts through the EXTI line
  • RTC_WKUP: RTC Wakeup interrupt through the EXTI line
  • FLASH: Flash global interrupt
  • RCC: RCC global interrupt
  • EXTI0: EXTI Line0 interrupt
  • EXTI1: EXTI Line1 interrupt
  • EXTI2: EXTI Line2 interrupt
  • EXTI3: EXTI Line3 interrupt
  • EXTI4: EXTI Line4 interrupt
  • DMA1_S0: DMA1 Stream0 global interrupt
  • DMA1_S1: DMA1 Stream1 global interrupt
  • DMA1_S2: DMA1 Stream2 global interrupt
  • DMA1_S3: DMA1 Stream3 global interrupt
  • DMA1_S4: DMA1 Stream4 global interrupt
  • DMA1_S5: DMA1 Stream5 global interrupt
  • DMA1_S6: DMA1 Stream6 global interrupt
  • ADC: ADC1, ADC2 and ADC3 global interrupts
  • CAN1_TX: CAN1 TX interrupts
  • CAN1_RX0: CAN1 RX0 interrupts
  • CAN1_RX1: CAN1 RX1 interrupt
  • CAN1_SCE: CAN1 SCE interrupt
  • EXTI9_5: EXTI Line[9:5] interrupts
  • TIM1_BRK_TIM9: TIM1 Break interrupt and TIM9 global interrupt
  • TIM1_UP_TIM10: TIM1 Update interrupt and TIM10 global interrupt
  • TIM1_TRG_COM_TIM11: TIM1 Trigger and Commutation interrupts and TIM11 global interrupt
  • TIM1_CC: TIM1 Capture Compare interrupt
  • TIM2: TIM2 global interrupt
  • TIM3: TIM3 global interrupt
  • TIM4: TIM4 global interrupt
  • I2C1_EV: I2C1 event interrupt
  • I2C1_ER: I2C1 error interrupt
  • I2C2_EV: I2C2 event interrupt
  • I2C2_ER: I2C2 error interrupt
  • SPI1: SPI1 global interrupt
  • SPI2: SPI2 global interrupt
  • USART1: USART1 global interrupt
  • USART2: USART2 global interrupt
  • USART3: USART3 global interrupt
  • EXTI15_10: EXTI Line[15:10] interrupts
  • RTC_ALARM: RTC Alarms (A and B) through EXTI line interrupt
  • OTG_FS_WKUP: USB On-The-Go FS Wakeup through EXTI line interrupt
  • TIM8_BRK_TIM12: TIM8 Break interrupt and TIM12 global interrupt
  • TIM8_UP_TIM13: TIM8 Update interrupt and TIM13 global interrupt
  • TIM8_TRG_COM_TIM1: TIM8 Trigger and Commutation interrupts and TIM14 global interrupt
  • TIM8_CC: TIM8 Capture Compare interrupt
  • DMA1_S7: DMA1 Stream7 global interrupt
  • FSMC: FSMC global interrupt
  • SDIO: SDIO global interrupt
  • TIM5: TIM5 global interrupt
  • SPI3: SPI3 global interrupt
  • UART4: UART4 global interrupt
  • UART5: UART5 global interrupt
  • TIM6_DAC: TIM6 global interrupt, DAC1 and DAC2 underrun error interrupts
  • TIM7: TIM7 global interrupt
  • DMA2_S0: DMA2 Stream0 global interrupt
  • DMA2_S1: DMA2 Stream1 global interrupt
  • DMA2_S2: DMA2 Stream2 global interrupt
  • DMA2_S3: DMA2 Stream3 global interrupt
  • DMA2_S4: DMA2 Stream4 global interrupt
  • ETH: Ethernet global interrupt
  • ETH_WKUP: Ethernet Wakeup through EXTI line interrupt
  • CAN2_TX: CAN2 TX interrupts
  • CAN2_RX0: CAN2 RX0 interrupts
  • CAN2_RX1: CAN2 RX1 interrupt
  • CAN2_SCE: CAN2 SCE interrupt
  • OTG_FS: USB On The Go FS global interrupt
  • DMA2_S5: DMA2 Stream5 global interrupt
  • DMA2_S6: DMA2 Stream6 global interrupt
  • DMA2_S7: DMA2 Stream7 global interrupt
  • USART6: USART6 global interrupt
  • I2C3_EV: I2C3 event interrupt
  • I2C3_ER: I2C3 error interrupt
  • OTG_HS_EP1_OUT: USB On The Go HS End Point 1 Out global interrupt
  • OTG_HS_EP1_IN: USB On The Go HS End Point 1 In global interrupt
  • OTG_HS_WKUP: USB On The Go HS Wakeup through EXTI interrupt
  • OTG_HS USB: On The Go HS global interrupt
  • DCMI: DCMI global interrupt
  • CRYP: CRYP crypto global interrupt
  • HASH_RNG: Hash and Rng global interrupt
  • FPU: FPU global interrupt
  • UART7: UART 7 global interrupt
  • UART8: UART 8 global interrupt
  • SPI4: SPI 4 global interrupt
  • SPI5: SPI 5 global interrupt
  • SPI6: SPI 6 global interrupt
  • SAI1: SAI1 global interrupt
  • LTDC: LTDC global interrupt
  • LTDC_ER: LTDC global Error interrupt
  • DMA2D: DMA2D global interrupt

STM32H7XX Family

The STM32H7XX family microcontrollers has an interrupt vector table which could be stored in the flash or in RAM. The complete list of SOURCE entries is shown below.

  • WWDG: Window WatchDog
  • PVD_AVD: PVD/AVD through EXTI Line detection
  • TAMP_STAMP: Tamper and TimeStamps through the EXTI line
  • RTC_WKUP: RTC Wakeup through the EXTI line
  • FLASH: FLASH
  • RCC: RCC
  • EXTI0: EXTI Line0
  • EXTI1: EXTI Line1
  • EXTI2: EXTI Line2
  • EXTI3: EXTI Line3
  • EXTI4: EXTI Line4
  • DMA1_Stream0: DMA1 Stream 0
  • DMA1_Stream1: DMA1 Stream 1
  • DMA1_Stream2: DMA1 Stream 2
  • DMA1_Stream3: DMA1 Stream 3
  • DMA1_Stream4: DMA1 Stream 4
  • DMA1_Stream5: DMA1 Stream 5
  • DMA1_Stream6: DMA1 Stream 6
  • ADC: ADC1, ADC2 and ADC3s
  • FDCAN1_IT0: FDCAN1 interrupt line 0
  • FDCAN2_IT0: FDCAN2 interrupt line 0
  • FDCAN1_IT1: FDCAN1 interrupt line 1
  • FDCAN2_IT1: FDCAN2 interrupt line 1
  • EXTI9_5: External Line[9:5]s
  • TIM1_BRK: TIM1 Break interrupt
  • TIM1_UP: TIM1 Update interrupt
  • TIM1_TRG_COM: TIM1 Trigger and Commutation interrupt
  • TIM1_CC: TIM1 Capture Compare
  • TIM2: TIM2
  • TIM3: TIM3
  • TIM4: TIM4
  • I2C1_EV: I2C1 Event
  • I2C1_ER: I2C1 Error
  • I2C2_EV: I2C2 Event
  • I2C2_ER: I2C2 Error
  • SPI1: SPI1
  • SPI2: SPI2
  • USART1: USART1
  • USART2: USART2
  • USART3: USART3
  • EXTI15_10: External Line[15:10]s
  • RTC_Alarm: RTC Alarm (A and B) through EXTI Line
  • TIM8_BRK_TIM12: TIM8 Break and TIM12
  • TIM8_UP_TIM13: TIM8 Update and TIM13
  • TIM8_TRG_COM_TIM14: TIM8 Trigger and Commutation and TIM14
  • TIM8_CC: TIM8 Capture Compare
  • DMA1_Stream7: DMA1 Stream7
  • FMC: FMC
  • SDMMC1: SDMMC1
  • TIM5: TIM5
  • SPI3: SPI3
  • UART4: UART4
  • UART5: UART5
  • TIM6_DAC: TIM6 and DAC1&2 underrun errors
  • TIM7: TIM7
  • DMA2_Stream0: DMA2 Stream 0
  • DMA2_Stream1: DMA2 Stream 1
  • DMA2_Stream2: DMA2 Stream 2
  • DMA2_Stream3: DMA2 Stream 3
  • DMA2_Stream4: DMA2 Stream 4
  • ETH: Ethernet
  • ETH_WKUP: Ethernet Wakeup through EXTI line
  • FDCAN_CAL: FDCAN calibration unit interrupt
  • DMA2_Stream5: DMA2 Stream 5
  • DMA2_Stream6: DMA2 Stream 6
  • DMA2_Stream7: DMA2 Stream 7
  • USART6: USART6
  • I2C3_EV: I2C3 event
  • I2C3_ER: I2C3 error
  • OTG_HS_EP1_OUT: USB OTG HS End Point 1 Out
  • OTG_HS_EP1_IN: USB OTG HS End Point 1 In
  • OTG_HS_WKUP: USB OTG HS Wakeup through EXTI
  • OTG_HS: USB OTG HS
  • DCMI: DCMI
  • RNG: Rng
  • FPU: FPU
  • UART7: UART7
  • UART8: UART8
  • SPI4: SPI4
  • SPI5: SPI5
  • SPI6: SPI6
  • SAI1: SAI1
  • LTDC: LTDC
  • LTDC_ER: LTDC error
  • DMA2D: DMA2D
  • SAI2: SAI2
  • QUADSPI: QUADSPI
  • LPTIM1: LPTIM1
  • CEC: HDMI_CEC
  • I2C4_EV: I2C4 Event
  • I2C4_ER: I2C4 Error
  • SPDIF_RX: SPDIF_RX
  • OTG_FS_EP1_OUT: USB OTG FS End Point 1 Out
  • OTG_FS_EP1_IN: USB OTG FS End Point 1 In
  • OTG_FS_WKUP: USB OTG FS Wakeup through EXTI
  • OTG_FS: USB OTG FS
  • DMAMUX1_OVR: DMAMUX1 Overrun interrupt
  • HRTIM1_Master: HRTIM Master Timer global Interrupt
  • HRTIM1_TIMA: HRTIM Timer A global Interrupt
  • HRTIM1_TIMB: HRTIM Timer B global Interrupt
  • HRTIM1_TIMC: HRTIM Timer C global Interrupt
  • HRTIM1_TIMD: HRTIM Timer D global Interrupt
  • HRTIM1_TIME: HRTIM Timer E global Interrupt
  • HRTIM1_FLT: HRTIM Fault global Interrupt
  • DFSDM1_FLT0: DFSDM Filter0 Interrupt
  • DFSDM1_FLT1: DFSDM Filter1 Interrupt
  • DFSDM1_FLT2: DFSDM Filter2 Interrupt
  • DFSDM1_FLT3: DFSDM Filter3 Interrupt
  • SAI3: SAI3 global Interrupt
  • SWPMI1: Serial Wire Interface 1 global interrupt
  • TIM15: TIM15 global Interrupt
  • TIM16: TIM16 global Interrupt
  • TIM17: TIM17 global Interrupt
  • MDIOS_WKUP: MDIOS Wakeup Interrupt
  • MDIOS: MDIOS global Interrupt
  • JPEG: JPEG global Interrupt
  • MDMA: MDMA global Interrupt
  • SDMMC2: SDMMC2 global Interrupt
  • HSEM1: HSEM1 global Interrupt
  • ADC3: ADC3 global Interrupt
  • DMAMUX2_OVR: DMAMUX Overrun interrupt
  • BDMA_Channel0: BDMA Channel 0 global Interrupt
  • BDMA_Channel1: BDMA Channel 1 global Interrupt
  • BDMA_Channel2: BDMA Channel 2 global Interrupt
  • BDMA_Channel3: BDMA Channel 3 global Interrupt
  • BDMA_Channel4: BDMA Channel 4 global Interrupt
  • BDMA_Channel5: BDMA Channel 5 global Interrupt
  • BDMA_Channel6: BDMA Channel 6 global Interrupt
  • BDMA_Channel7: BDMA Channel 7 global Interrupt
  • COMP1: COMP1 global Interrupt
  • LPTIM2: LP TIM2 global interrupt
  • LPTIM3: LP TIM3 global interrupt
  • LPTIM4: LP TIM4 global interrupt
  • LPTIM5: LP TIM5 global interrupt
  • LPUART1: LP UART1 interrupt
  • CRS: Clock Recovery Global Interrupt
  • ECC: ECC diagnostic Global Interrupt
  • SAI4: SAI4 global interrupt
  • WAKEUP_PIN: Interrupt for all 6 wake-up pins

OSEK/VDX Extensions

This Section contains information about the OSEK/VDX Extensions (or optional features) that have been implemented for the Arm Cortex-M support.

System Timer

System Timer counter is implemented using SysTick of Cortex-M CPUso the DEVICE attribute MUST be se to SYSTICK as shown below.

Example of a System Timer counter:

   COUNTER SystemTimer {
     MINCYCLE = 1;
     MAXALLOWEDVALUE = 65535;
     TICKSPERBASE = 1;
     TYPE = HARDWARE {
       DEVICE = "SYSTICK";
       SYSTEM_TIMER = TRUE;
     };
     SECONDSPERTICK = 0.001;
   };

CPU_CLOCK

System Timer need the CPU_CLOCK attribute of CPU_DATA. This value, expressed as MHz, must be set to the configured frequency of the CPU.

Example of a CPU_CLOCK attribute of CPU_DATA section:

   CPU_DATA = CORTEX_M {
     MODEL = M4;
     CPU_CLOCK = 48.0;
     ...
   };