[fpc-pascal] ARM-embedded & Interrupt numbers
Koenraad Lelong
fpascal1 at de-brouwerij.be
Mon Aug 24 13:18:09 CEST 2015
Op 14-08-15 om 14:18 schreef Jeppe Johansen:
> Hi Koenraad,
>
> For simplicity I think it would be best to just add them to each unit
> without too many macros.
>
> There's not a clear line for what to include in the RTL units at the
> moment, but with CMSIS growing more relevant I think it makes sense to
> have that table of IRQn numbers in there for all Cortex-M devices.
>
> You can either just use SVN to create a patch (there's info here:
> http://wiki.freepascal.org/Creating_A_Patch), or just send the files to
> me and I'll fix it up.
>
> Best Regards,
> Jeppe
Hi,
Sorry it's been a while, but here are the modifications I did and the
include file.
That include file is a Pascal version of the stm32f10x.h file from CMSIS
3.5.0.
I hope this will appear in some future FPC-version.
Koenraad.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mypatch.diff
Type: text/x-patch
Size: 1525 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20150824/ab62b813/attachment.bin>
-------------- next part --------------
const
NonMaskableInt_IRQn = -14; // 2 Non Maskable // interrupt
HardFault_IRQn = -13; // 4 Cortex-M3 Memory Management // interrupt
MemoryManagement_IRQn = -12; // 4 Cortex-M3 Memory Management // interrupt
BusFault_IRQn = -11; // 5 Cortex-M3 Bus Fault // interrupt
UsageFault_IRQn = -10; // 6 Cortex-M3 Usage Fault // interrupt
SVCall_IRQn = -5; // 11 Cortex-M3 SV Call // interrupt
DebugMonitor_IRQn = -4; // 12 Cortex-M3 Debug Monitor // interrupt
PendSV_IRQn = -2; // 14 Cortex-M3 Pend SV // interrupt
SysTick_IRQn = -1; // 15 Cortex-M3 System Tick // interrupt
WWDG_IRQn = 0; // Window WatchDog // interrupt
PVD_IRQn = 1; // PVD through EXTI Line detection // interrupt
TAMPER_IRQn = 2; // Tamper // interrupt
RTC_IRQn = 3; // RTC global // interrupt
FLASH_IRQn = 4; // FLASH global // interrupt
RCC_IRQn = 5; // RCC global // interrupt
EXTI0_IRQn = 6; // EXTI Line0 // interrupt
EXTI1_IRQn = 7; // EXTI Line1 // interrupt
EXTI2_IRQn = 8; // EXTI Line2 // interrupt
EXTI3_IRQn = 9; // EXTI Line3 // interrupt
EXTI4_IRQn = 10; // EXTI Line4 // interrupt
DMA1_Channel1_IRQn = 11; // DMA1 Channel 1 global // interrupt
DMA1_Channel2_IRQn = 12; // DMA1 Channel 2 global // interrupt
DMA1_Channel3_IRQn = 13; // DMA1 Channel 3 global // interrupt
DMA1_Channel4_IRQn = 14; // DMA1 Channel 4 global // interrupt
DMA1_Channel5_IRQn = 15; // DMA1 Channel 5 global // interrupt
DMA1_Channel6_IRQn = 16; // DMA1 Channel 6 global // interrupt
DMA1_Channel7_IRQn = 17; // DMA1 Channel 7 global // interrupt
{$ifdef stm32f10x_ld}
ADC1_2_IRQn = 18; // ADC1 et ADC2 global // interrupt
USB_HP_CAN1_TX_IRQn = 19; // USB High Priority or CAN1 TX Interrupts
USB_LP_CAN1_RX0_IRQn = 20; // USB Low Priority or CAN1 RX0 Interrupts
CAN1_RX1_IRQn = 21; // CAN1 RX1 // interrupt
CAN1_SCE_IRQn = 22; // CAN1 SCE // interrupt
EXTI9_5_IRQn = 23; // External Line[9:5] Interrupts
TIM1_BRK_IRQn = 24; // TIM1 Break // interrupt
TIM1_UP_IRQn = 25; // TIM1 Update // interrupt
TIM1_TRG_COM_IRQn = 26; // TIM1 Trigger and Commutation // interrupt
TIM1_CC_IRQn = 27; // TIM1 Capture Compare // interrupt
TIM2_IRQn = 28; // TIM2 global // interrupt
TIM3_IRQn = 29; // TIM3 global // interrupt
I2C1_EV_IRQn = 31; // I2C1 Event // interrupt
I2C1_ER_IRQn = 32; // I2C1 Error // interrupt
SPI1_IRQn = 35; // SPI1 global // interrupt
USART1_IRQn = 37; // USART1 global // interrupt
USART2_IRQn = 38; // USART2 global // interrupt
EXTI15_10_IRQn = 40; // External Line[15:10] Interrupts
RTCAlarm_IRQn = 41; // RTC Alarm through EXTI Line // interrupt
USBWakeUp_IRQn = 42; // USB WakeUp from suspend through EXTI Line // interrupt
{$endif}
{$ifdef STM32F10X_LD_VL}
ADC1_IRQn = 18; // ADC1 et ADC2 global // interrupt
EXTI9_5_IRQn = 23; // External Line[9:5] Interrupts
TIM1_BRKTIM15__IRQn = 24; // TIM1 Break // interrupt
TIM1_UP_TIM16_IRQn = 25; // TIM1 Update // interrupt
TIM1_TRG_COM_TIM17_IRQn = 26; // TIM1 Trigger and Commutation // interrupt
TIM1_CC_IRQn = 27; // TIM1 Capture Compare // interrupt
TIM2_IRQn = 28; // TIM2 global // interrupt
TIM3_IRQn = 29; // TIM3 global // interrupt
I2C1_EV_IRQn = 31; // I2C1 Event // interrupt
I2C1_ER_IRQn = 32; // I2C1 Error // interrupt
SPI1_IRQn = 35; // SPI1 global // interrupt
USART1_IRQn = 37; // USART1 global // interrupt
USART2_IRQn = 38; // USART2 global // interrupt
EXTI15_10_IRQn = 40; // External Line[15:10] Interrupts
RTCAlarm_IRQn = 41; // RTC Alarm through EXTI Line // interrupt
CEC_IRQn = 42; // USB WakeUp from suspend through EXTI Line // interrupt
TIM6_DAC_IRQn = 54; // TIM6 global // interrupt
TIM7_IRQn = 55; // TIM7 global // interrupt
{$endif}
{$ifdef STM32F10X_MD}
ADC1_2_IRQn = 18; // ADC1 et ADC2 global // interrupt
USB_HP_CAN1_TX_IRQn = 19; // USB High Priority or CAN1 TX Interrupts
USB_LP_CAN1_RX0_IRQn = 20; // USB Low Priority or CAN1 RX0 Interrupts
CAN1_RX1_IRQn = 21; // CAN1 RX1 // interrupt
CAN1_SCE_IRQn = 22; // CAN1 SCE // interrupt
EXTI9_5_IRQn = 23; // External Line[9:5] Interrupts
TIM1_BRK_IRQn = 24; // TIM1 Break // interrupt
TIM1_UP_IRQn = 25; // TIM1 Update // interrupt
TIM1_TRG_COM_IRQn = 26; // TIM1 Trigger and Commutation // interrupt
TIM1_CC_IRQn = 27; // TIM1 Capture Compare // interrupt
TIM2_IRQn = 28; // TIM2 global // interrupt
TIM3_IRQn = 29; // TIM3 global // interrupt
TIM4_IRQn = 30; // TIM4 global // interrupt
I2C1_EV_IRQn = 31; // I2C1 Event // interrupt
I2C1_ER_IRQn = 32; // I2C1 Error // interrupt
I2C2_EV_IRQn = 33; // I2C2 Event // interrupt
I2C2_ER_IRQn = 34; // I2C2 Error // interrupt
SPI1_IRQn = 35; // SPI1 global // interrupt
SPI2_IRQn = 36; // SPI2 global // interrupt
USART1_IRQn = 37; // USART1 global // interrupt
USART2_IRQn = 38; // USART2 global // interrupt
USART3_IRQn = 39; // USART3 global // interrupt
EXTI15_10_IRQn = 40; // External Line[15:10] Interrupts
RTCAlarm_IRQn = 41; // RTC Alarm through EXTI Line // interrupt
USBWakeUp_IRQn = 42; // USB WakeUp from suspend through EXTI Line // interrupt
{$endif}
{$ifdef STM32F10X_MD_VL}
ADC1_IRQn = 18; // ADC1 et ADC2 global // interrupt
EXTI9_5_IRQn = 23; // External Line[9:5] Interrupts
TIM1_BRK_TIM15_IRQn = 24; // TIM1 Break // interrupt
TIM1_UP_TIM16_IRQn = 25; // TIM1 Update // interrupt
TIM1_TRG_COM_TIM17_IRQn = 26; // TIM1 Trigger and Commutation // interrupt
TIM1_CC_IRQn = 27; // TIM1 Capture Compare // interrupt
TIM2_IRQn = 28; // TIM2 global // interrupt
TIM3_IRQn = 29; // TIM3 global // interrupt
TIM4_IRQn = 30; // TIM4 global // interrupt
I2C1_EV_IRQn = 31; // I2C1 Event // interrupt
I2C1_ER_IRQn = 32; // I2C1 Error // interrupt
I2C2_EV_IRQn = 33; // I2C2 Event // interrupt
I2C2_ER_IRQn = 34; // I2C2 Error // interrupt
SPI1_IRQn = 35; // SPI1 global // interrupt
SPI2_IRQn = 36; // SPI2 global // interrupt
USART1_IRQn = 37; // USART1 global // interrupt
USART2_IRQn = 38; // USART2 global // interrupt
USART3_IRQn = 39; // USART3 global // interrupt
EXTI15_10_IRQn = 40; // External Line[15:10] Interrupts
RTCAlarm_IRQn = 41; // RTC Alarm through EXTI Line // interrupt
CEC_IRQn = 42; // USB WakeUp from suspend through EXTI Line // interrupt
TIM6_DAC_IRQn = 54; // TIM6 global // interrupt
TIM7_IRQn = 55; // TIM7 global // interrupt
{$endif}
{$ifdef STM32F10X_HD}
ADC1_2_IRQn = 18; // ADC1 et ADC2 global // interrupt
USB_HP_CAN1_TX_IRQn = 19; // USB High Priority or CAN1 TX Interrupts
USB_LP_CAN1_RX0_IRQn = 20; // USB Low Priority or CAN1 RX0 Interrupts
CAN1_RX1_IRQn = 21; // CAN1 RX1 // interrupt
CAN1_SCE_IRQn = 22; // CAN1 SCE // interrupt
EXTI9_5_IRQn = 23; // External Line[9:5] Interrupts
TIM1_BRK_IRQn = 24; // TIM1 Break // interrupt
TIM1_UP_IRQn = 25; // TIM1 Update // interrupt
TIM1_TRG_COM_IRQn = 26; // TIM1 Trigger and Commutation // interrupt
TIM1_CC_IRQn = 27; // TIM1 Capture Compare // interrupt
TIM2_IRQn = 28; // TIM2 global // interrupt
TIM3_IRQn = 29; // TIM3 global // interrupt
TIM4_IRQn = 30; // TIM4 global // interrupt
I2C1_EV_IRQn = 31; // I2C1 Event // interrupt
I2C1_ER_IRQn = 32; // I2C1 Error // interrupt
I2C2_EV_IRQn = 33; // I2C2 Event // interrupt
I2C2_ER_IRQn = 34; // I2C2 Error // interrupt
SPI1_IRQn = 35; // SPI1 global // interrupt
SPI2_IRQn = 36; // SPI2 global // interrupt
USART1_IRQn = 37; // USART1 global // interrupt
USART2_IRQn = 38; // USART2 global // interrupt
USART3_IRQn = 39; // USART3 global // interrupt
EXTI15_10_IRQn = 40; // External Line[15:10] Interrupts
RTCAlarm_IRQn = 41; // RTC Alarm through EXTI Line // interrupt
USBWakeUp_IRQn = 42; // USB WakeUp from suspend through EXTI Line // interrupt
TIM8_BRK_IRQn = 43; // TIM8 Break // interrupt
TIM8_UP_IRQn = 44; // TIM8 Update // interrupt
TIM8_TRG_COM_IRQn = 45; // TIM8 Trigger and Commutation // interrupt
TIM8_CC_IRQn = 46; // TIM8 Capture Compare // interrupt
ADC3_IRQn = 47; // ADC3 global // interrupt
FSMC_IRQn = 48; // FSMC global // interrupt
SDIO_IRQn = 49; // SDIO global // interrupt
TIM5_IRQn = 50; // TIM5 global // interrupt
SPI3_IRQn = 51; // SPI3 global // interrupt
UART4_IRQn = 52; // UART4 global // interrupt
UART5_IRQn = 53; // UART5 global // interrupt
TIM6_IRQn = 54; // TIM6 global // interrupt
TIM7_IRQn = 55; // TIM7 global // interrupt
DMA2_Channel1_IRQn = 56; // DMA2 Channel 1 global // interrupt
DMA2_Channel2_IRQn = 57; // DMA2 Channel 2 global // interrupt
DMA2_Channel3_IRQn = 58; // DMA2 Channel 3 global // interrupt
DMA2_Channel4_5_IRQn = 59; // DMA2 Channel 4 and Channel 5 global // interrupt
{$endif}
{$ifdef STM32F10X_HD_VL}
ADC1_IRQn = 18; // ADC1 et ADC2 global // interrupt
EXTI9_5_IRQn = 23; // External Line[9:5] Interrupts
TIM1_BRK_TIM15_IRQn = 24; // TIM1 Break // interrupt
TIM1_UP_TIM16_IRQn = 25; // TIM1 Update // interrupt
TIM1_TRG_COM_TIM17_IRQn = 26; // TIM1 Trigger and Commutation // interrupt
TIM1_CC_IRQn = 27; // TIM1 Capture Compare // interrupt
TIM2_IRQn = 28; // TIM2 global // interrupt
TIM3_IRQn = 29; // TIM3 global // interrupt
TIM4_IRQn = 30; // TIM4 global // interrupt
I2C1_EV_IRQn = 31; // I2C1 Event // interrupt
I2C1_ER_IRQn = 32; // I2C1 Error // interrupt
I2C2_EV_IRQn = 33; // I2C2 Event // interrupt
I2C2_ER_IRQn = 34; // I2C2 Error // interrupt
SPI1_IRQn = 35; // SPI1 global // interrupt
SPI2_IRQn = 36; // SPI2 global // interrupt
USART1_IRQn = 37; // USART1 global // interrupt
USART2_IRQn = 38; // USART2 global // interrupt
USART3_IRQn = 39; // USART3 global // interrupt
EXTI15_10_IRQn = 40; // External Line[15:10] Interrupts
RTCAlarm_IRQn = 41; // RTC Alarm through EXTI Line // interrupt
CEC_IRQn = 42; // UHDMI-CEC // interrupt
TIM12_IRQn = 43; // TIM8 Break // interrupt
TIM13_IRQn = 44; // TIM8 Update // interrupt
TIM14_IRQn = 45; // TIM8 Trigger and Commutation // interrupt
TIM5_IRQn = 50; // TIM5 global // interrupt
SPI3_IRQn = 51; // SPI3 global // interrupt
UART4_IRQn = 52; // UART4 global // interrupt
UART5_IRQn = 53; // UART5 global // interrupt
TIM6_DAC_IRQn = 54; // TIM6 global // interrupt
TIM7_IRQn = 55; // TIM7 global // interrupt
DMA2_Channel1_IRQn = 56; // DMA2 Channel 1 global // interrupt
DMA2_Channel2_IRQn = 57; // DMA2 Channel 2 global // interrupt
DMA2_Channel3_IRQn = 58; // DMA2 Channel 3 global // interrupt
DMA2_Channel4_5_IRQn = 59; // DMA2 Channel 4 and Channel 5 global // interrupt
DMA2_Channel5_IRQn = 60; // DMA2 Channel 4 and Channel 5 global // interrupt
{$endif}
{$ifdef STM32F10X_XL}
ADC1_2_IRQn = 18; // ADC1 et ADC2 global // interrupt
USB_HP_CAN1_TX_IRQn = 19; // USB High Priority or CAN1 TX Interrupts
USB_LP_CAN1_RX0_IRQn = 20; // USB Low Priority or CAN1 RX0 Interrupts
CAN1_RX1_IRQn = 21; // CAN1 RX1 // interrupt
CAN1_SCE_IRQn = 22; // CAN1 SCE // interrupt
EXTI9_5_IRQn = 23; // External Line[9:5] Interrupts
TIM1_BRK_TIM9_IRQn = 24; // TIM1 Break // interrupt
TIM1_UP_TIM10_IRQn = 25; // TIM1 Update // interrupt
TIM1_TRG_COM_TIM11_IRQn = 26; // TIM1 Trigger and Commutation // interrupt
TIM1_CC_IRQn = 27; // TIM1 Capture Compare // interrupt
TIM2_IRQn = 28; // TIM2 global // interrupt
TIM3_IRQn = 29; // TIM3 global // interrupt
TIM4_IRQn = 30; // TIM4 global // interrupt
I2C1_EV_IRQn = 31; // I2C1 Event // interrupt
I2C1_ER_IRQn = 32; // I2C1 Error // interrupt
I2C2_EV_IRQn = 33; // I2C2 Event // interrupt
I2C2_ER_IRQn = 34; // I2C2 Error // interrupt
SPI1_IRQn = 35; // SPI1 global // interrupt
SPI2_IRQn = 36; // SPI2 global // interrupt
USART1_IRQn = 37; // USART1 global // interrupt
USART2_IRQn = 38; // USART2 global // interrupt
USART3_IRQn = 39; // USART3 global // interrupt
EXTI15_10_IRQn = 40; // External Line[15:10] Interrupts
RTCAlarm_IRQn = 41; // RTC Alarm through EXTI Line // interrupt
USBWakeUp_IRQn = 42; // USB WakeUp from suspend through EXTI Line // interrupt
TIM8_BRK_TIM12_IRQn = 43; // TIM8 Break Interrupt and TIM12 global Interrupt
TIM8_UP_TIM13_IRQn = 44; // TIM8 Update Interrupt and TIM13 global Interrupt
TIM8_TRG_COM_TIM14_IRQn = 45; // TIM8 Trigger and Commutation Interrupt and TIM14 global interrupt
TIM8_CC_IRQn = 46; // TIM8 Capture Compare Interrupt
ADC3_IRQn = 47; // ADC3 global Interrupt
FSMC_IRQn = 48; // FSMC global Interrupt
SDIO_IRQn = 49; // SDIO global Interrupt
TIM5_IRQn = 50; // TIM5 global Interrupt
SPI3_IRQn = 51; // SPI3 global Interrupt
UART4_IRQn = 52; // UART4 global Interrupt
UART5_IRQn = 53; // UART5 global Interrupt
TIM6_IRQn = 54; // TIM6 global Interrupt
TIM7_IRQn = 55; // TIM7 global Interrupt
DMA2_Channel1_IRQn = 56; // DMA2 Channel 1 global Interrupt
DMA2_Channel2_IRQn = 57; // DMA2 Channel 2 global Interrupt
DMA2_Channel3_IRQn = 58; // DMA2 Channel 3 global Interrupt
DMA2_Channel4_5_IRQn = 59; // DMA2 Channel 4 and Channel 5 global Interrupt
{$endif}
{$ifdef STM32F10X_CL}
ADC1_2_IRQn = 18; // ADC1 and ADC2 global Interrupt
CAN1_TX_IRQn = 19; // USB Device High Priority or CAN1 TX Interrupts
CAN1_RX0_IRQn = 20; // USB Device Low Priority or CAN1 RX0 Interrupts
CAN1_RX1_IRQn = 21; // CAN1 RX1 Interrupt
CAN1_SCE_IRQn = 22; // CAN1 SCE Interrupt
EXTI9_5_IRQn = 23; // External Line[9:5] Interrupts
TIM1_BRK_IRQn = 24; // TIM1 Break Interrupt
TIM1_UP_IRQn = 25; // TIM1 Update Interrupt
TIM1_TRG_COM_IRQn = 26; // TIM1 Trigger and Commutation Interrupt
TIM1_CC_IRQn = 27; // TIM1 Capture Compare Interrupt
TIM2_IRQn = 28; // TIM2 global Interrupt
TIM3_IRQn = 29; // TIM3 global Interrupt
TIM4_IRQn = 30; // TIM4 global Interrupt
I2C1_EV_IRQn = 31; // I2C1 Event Interrupt
I2C1_ER_IRQn = 32; // I2C1 Error Interrupt
I2C2_EV_IRQn = 33; // I2C2 Event Interrupt
I2C2_ER_IRQn = 34; // I2C2 Error Interrupt
SPI1_IRQn = 35; // SPI1 global Interrupt
SPI2_IRQn = 36; // SPI2 global Interrupt
USART1_IRQn = 37; // USART1 global Interrupt
USART2_IRQn = 38; // USART2 global Interrupt
USART3_IRQn = 39; // USART3 global Interrupt
EXTI15_10_IRQn = 40; // External Line[15:10] Interrupts
RTCAlarm_IRQn = 41; // RTC Alarm through EXTI Line Interrupt
OTG_FS_WKUP_IRQn = 42; // USB OTG FS WakeUp from suspend through EXTI Line Interrupt
TIM5_IRQn = 50; // TIM5 global Interrupt
SPI3_IRQn = 51; // SPI3 global Interrupt
UART4_IRQn = 52; // UART4 global Interrupt
UART5_IRQn = 53; // UART5 global Interrupt
TIM6_IRQn = 54; // TIM6 global Interrupt
TIM7_IRQn = 55; // TIM7 global Interrupt
DMA2_Channel1_IRQn = 56; // DMA2 Channel 1 global Interrupt
DMA2_Channel2_IRQn = 57; // DMA2 Channel 2 global Interrupt
DMA2_Channel3_IRQn = 58; // DMA2 Channel 3 global Interrupt
DMA2_Channel4_IRQn = 59; // DMA2 Channel 4 global Interrupt
DMA2_Channel5_IRQn = 60; // DMA2 Channel 5 global Interrupt
ETH_IRQn = 61; // Ethernet global Interrupt
ETH_WKUP_IRQn = 62; // Ethernet Wakeup through EXTI line Interrupt
CAN2_TX_IRQn = 63; // CAN2 TX Interrupt
CAN2_RX0_IRQn = 64; // CAN2 RX0 Interrupt
CAN2_RX1_IRQn = 65; // CAN2 RX1 Interrupt
CAN2_SCE_IRQn = 66; // CAN2 SCE Interrupt
OTG_FS_IRQn = 67 // USB OTG FS global Interrupt
{$endif}
More information about the fpc-pascal
mailing list