STM8S/A Standard Peripherals Firmware Library: stm8_interrupt_vector.c Source File

STM8S/A

stm8_interrupt_vector.c
Go to the documentation of this file.
00001 /* BASIC INTERRUPT VECTORS TABLE FOR STM8 devices
00002  * Copyright (c) 2014 STMicroelectronics
00003  */
00004 
00005 #include "stm8s_it.h"
00006 
00007 typedef void @far (*interrupt_handler_t)(void);
00008 
00009 struct interrupt_vector {
00010         u8 interrupt_instruction;
00011         interrupt_handler_t interrupt_handler;
00012 };
00013 
00014 struct interrupt_vector const _vectab[] = {
00015   {0x82, (interrupt_handler_t)_stext}, /* RESET */
00016   {0x82, (interrupt_handler_t)TRAP_IRQHandler}, /* TRAP - Software interrupt */
00017         {0x82, (interrupt_handler_t)TLI_IRQHandler}, /* irq0 - External Top Level interrupt (TLI) */
00018         {0x82, (interrupt_handler_t)AWU_IRQHandler}, /* irq1 - Auto Wake Up from Halt interrupt */
00019         {0x82, (interrupt_handler_t)CLK_IRQHandler}, /* irq2 - Clock Controller interrupt */
00020   {0x82, (interrupt_handler_t)EXTI_PORTA_IRQHandler}, /* irq3 - External interrupt 0 (GPIOA) */
00021         {0x82, (interrupt_handler_t)EXTI_PORTB_IRQHandler}, /* irq4 - External interrupt 1 (GPIOB) */
00022         {0x82, (interrupt_handler_t)EXTI_PORTC_IRQHandler}, /* irq5 - External interrupt 2 (GPIOC) */
00023         {0x82, (interrupt_handler_t)EXTI_PORTD_IRQHandler}, /* irq6 - External interrupt 3 (GPIOD) */
00024         {0x82, (interrupt_handler_t)EXTI_PORTE_IRQHandler}, /* irq7 - External interrupt 4 (GPIOE) */
00025         
00026 #if defined(STM8S208) || defined(STM8AF52Ax)
00027         {0x82, (interrupt_handler_t)CAN_RX_IRQHandler}, /* irq8 - CAN Rx interrupt */
00028         {0x82, (interrupt_handler_t)CAN_TX_IRQHandler}, /* irq9 - CAN Tx/ER/SC interrupt */
00029 #elif defined(STM8S903) || defined(STM8AF622x)
00030         {0x82, (interrupt_handler_t)EXTI_PORTF_IRQHandler}, /* irq8 - External interrupt 5 (GPIOF) */
00031         {0x82, (interrupt_handler_t)NonHandledInterrupt}, /* irq9 - Reserved */
00032 #else /*STM8S207, STM8S105 or STM8AF62Ax or STM8AF626x*/
00033         {0x82, (interrupt_handler_t)NonHandledInterrupt}, /* irq8 - Reserved */
00034         {0x82, (interrupt_handler_t)NonHandledInterrupt}, /* irq9 - Reserved */
00035 #endif /* STM8S208 or STM8AF52Ax */
00036         {0x82, (interrupt_handler_t)SPI_IRQHandler}, /* irq10 - SPI End of transfer interrupt */
00037         {0x82, (interrupt_handler_t)TIM1_UPD_OVF_TRG_BRK_IRQHandler}, /* irq11 - TIM1 Update/Overflow/Trigger/Break interrupt */
00038         {0x82, (interrupt_handler_t)TIM1_CAP_COM_IRQHandler}, /* irq12 - TIM1 Capture/Compare interrupt */
00039   
00040 #if defined(STM8S903) || defined(STM8AF622x)
00041   {0x82, (interrupt_handler_t)TIM5_UPD_OVF_BRK_TRG_IRQHandler}, /* irq13 - TIM5 Update/Overflow/Break/Trigger interrupt  */
00042   {0x82, (interrupt_handler_t)TIM5_CAP_COM_IRQHandler}, /* irq14 - TIM5 Capture/Compare interrupt */
00043         
00044 #else /*STM8S208, STM8S207, STM8S105 or STM8S103 or STM8AF62Ax or STM8AF52Ax or STM8AF626x*/
00045   {0x82, (interrupt_handler_t)TIM2_UPD_OVF_BRK_IRQHandler}, /* irq13 - TIM2 Update/Overflow/Break interrupt  */
00046   {0x82, (interrupt_handler_t)TIM2_CAP_COM_IRQHandler}, /* irq14 - TIM2 Capture/Compare interrupt */
00047 #endif /*STM8S903*/
00048         
00049 #if defined(STM8S208) || defined(STM8S207) || defined(STM8S007) || defined(STM8S105) || \
00050     defined(STM8S005) ||  defined(STM8AF52Ax) || defined(STM8AF62Ax) || defined(STM8AF626x)
00051   {0x82, (interrupt_handler_t)TIM3_UPD_OVF_BRK_IRQHandler}, /* irq15 - TIM3 Update/Overflow/Break interrupt */
00052   {0x82, (interrupt_handler_t)TIM3_CAP_COM_IRQHandler}, /* irq16 - TIM3 Capture/Compare interrupt */
00053 #else
00054         {0x82, (interrupt_handler_t)NonHandledInterrupt}, /* irq15 - Reserved */
00055         {0x82, (interrupt_handler_t)NonHandledInterrupt}, /* irq16 - Reserved */
00056 #endif /*STM8S208, STM8S207, STM8S105 or STM8AF62Ax or STM8AF52Ax or STM8AF626x*/
00057         
00058 #if defined(STM8S105) || defined(STM8S005) || defined(STM8AF626x)
00059         {0x82, (interrupt_handler_t)NonHandledInterrupt}, /* irq17 - Reserved */
00060         {0x82, (interrupt_handler_t)NonHandledInterrupt}, /* irq18 - Reserved */
00061 #elif defined (STM8AF622x)
00062         {0x82, (interrupt_handler_t)UART4_TX_IRQHandler}, /* irq17 - UART4 Tx complete interrupt */
00063         {0x82, (interrupt_handler_t)UART4_RX_IRQHandler}, /* irq18 - UART4 Rx interrupt */
00064 #else   
00065         {0x82, (interrupt_handler_t)UART1_TX_IRQHandler}, /* irq17 - UART1 Tx complete interrupt */
00066         {0x82, (interrupt_handler_t)UART1_RX_IRQHandler}, /* irq18 - UART1 Rx interrupt */
00067 #endif /*STM8S105 or STM8AF626x */
00068         {0x82, (interrupt_handler_t)I2C_IRQHandler}, /* irq19 - I2C interrupt */
00069 
00070 #if defined(STM8S208) || defined(STM8S207) || defined(STM8S007) || defined(STM8AF52Ax) || defined(STM8AF62Ax)
00071 
00072         {0x82, (interrupt_handler_t)UART3_TX_IRQHandler}, /* irq20 - UART3 Tx interrupt */
00073         {0x82, (interrupt_handler_t)UART3_RX_IRQHandler}, /* irq21 - UART3 Rx interrupt */
00074 #elif defined(STM8S105) || defined(STM8S005) || defined(STM8AF626x)
00075         {0x82, (interrupt_handler_t)UART2_TX_IRQHandler}, /* irq20 - UART2 Tx interrupt */
00076         {0x82, (interrupt_handler_t)UART2_RX_IRQHandler}, /* irq21 - UART2 Rx interrupt */
00077 
00078 #else /* STM8S103, STM8S903, STM8AF622x */
00079         {0x82, (interrupt_handler_t)NonHandledInterrupt}, /* irq20 - Reserved */
00080         {0x82, (interrupt_handler_t)NonHandledInterrupt}, /* irq21 - Reserved */
00081 #endif /* STM8S208, STM8S207, STM8AF52Ax or STM8AF62Ax */
00082 
00083 #if defined(STM8S208) || defined(STM8S207) || defined(STM8S007) || defined(STM8AF52Ax) || defined(STM8AF62Ax)
00084         {0x82, (interrupt_handler_t)ADC2_IRQHandler}, /* irq22 - ADC2 end of conversion interrupt */
00085 #else /* STM8S105, STM8S103, STM8S903, STM8AF622x   */
00086         {0x82, (interrupt_handler_t)ADC1_IRQHandler}, /* irq22 - ADC1 end of conversion/Analog watchdog interrupts */
00087 
00088 #endif /* STM8S208, STM8S207, STM8AF52Ax or STM8AF62Ax */
00089 
00090 #if defined(STM8S903) || defined(STM8AF622x)
00091         {0x82, (interrupt_handler_t)TIM6_UPD_OVF_TRG_IRQHandler}, /* irq23 - TIM6 Update/Overflow/Trigger interrupt */
00092 #else
00093         {0x82, (interrupt_handler_t)TIM4_UPD_OVF_IRQHandler}, /* irq23 - TIM4 Update/Overflow interrupt */
00094 #endif /* (STM8S903) || (STM8AF622x) */
00095         {0x82, (interrupt_handler_t)EEPROM_EEC_IRQHandler},  /* irq24 - FLASH interrupt */
00096         {0x82, (interrupt_handler_t)NonHandledInterrupt}, /* irq25 - Reserved */
00097         {0x82, (interrupt_handler_t)NonHandledInterrupt}, /* irq26 - Reserved */
00098         {0x82, (interrupt_handler_t)NonHandledInterrupt}, /* irq27 - Reserved */
00099         {0x82, (interrupt_handler_t)NonHandledInterrupt}, /* irq28 - Reserved */
00100         {0x82, (interrupt_handler_t)NonHandledInterrupt}, /* irq29 - Reserved */
00101 
00102 };
00103 
00104 /******************* (C) COPYRIGHT 2014 STMicroelectronics *****END OF FILE****/
STM8 Standard Peripherals Library: Footer

 

 

 

      For complete documentation on STM8 8-bit Microcontrollers platform visit www.st.com