|
| 1 | +/* |
| 2 | + * Copyright (C) 2025 Mesotic SAS |
| 3 | + * |
| 4 | + * This file is subject to the terms and conditions of the GNU Lesser |
| 5 | + * General Public License v2.1. See the file LICENSE in the top level |
| 6 | + * directory for more details. |
| 7 | + */ |
| 8 | + |
| 9 | +/** |
| 10 | + * @ingroup cpu_sam4s |
| 11 | + * @{ |
| 12 | + * |
| 13 | + * @file |
| 14 | + * @brief Startup code and interrupt vector definition |
| 15 | + * |
| 16 | + * @author Dylan Laduranty <[email protected]> |
| 17 | + * |
| 18 | + * @} |
| 19 | + */ |
| 20 | + |
| 21 | +#include <stdint.h> |
| 22 | +#include "vectors_cortexm.h" |
| 23 | + |
| 24 | +/* define a local dummy handler as it needs to be in the same compilation unit |
| 25 | + * as the alias definition */ |
| 26 | +void dummy_handler(void) { |
| 27 | + dummy_handler_default(); |
| 28 | +} |
| 29 | + |
| 30 | +/* Cortex-M common interrupt vectors */ |
| 31 | +WEAK_DEFAULT void isr_svc(void); |
| 32 | +WEAK_DEFAULT void isr_pendsv(void); |
| 33 | +WEAK_DEFAULT void isr_systick(void); |
| 34 | +/* SAM4S specific interrupt vector */ |
| 35 | +WEAK_DEFAULT void isr_supc(void); |
| 36 | +WEAK_DEFAULT void isr_rstc(void); |
| 37 | +WEAK_DEFAULT void isr_rtc(void); |
| 38 | +WEAK_DEFAULT void isr_rtt(void); |
| 39 | +WEAK_DEFAULT void isr_wdt(void); |
| 40 | +WEAK_DEFAULT void isr_pmc(void); |
| 41 | +WEAK_DEFAULT void isr_eefc0(void); |
| 42 | +WEAK_DEFAULT void isr_eefc1(void); |
| 43 | +WEAK_DEFAULT void isr_uart0(void); |
| 44 | +WEAK_DEFAULT void isr_uart1(void); |
| 45 | +WEAK_DEFAULT void isr_smc(void); |
| 46 | +WEAK_DEFAULT void isr_pioa(void); |
| 47 | +WEAK_DEFAULT void isr_piob(void); |
| 48 | +WEAK_DEFAULT void isr_pioc(void); |
| 49 | +WEAK_DEFAULT void isr_usart0(void); |
| 50 | +WEAK_DEFAULT void isr_usart1(void); |
| 51 | +WEAK_DEFAULT void isr_hsmci(void); |
| 52 | +WEAK_DEFAULT void isr_twi0(void); |
| 53 | +WEAK_DEFAULT void isr_twi1(void); |
| 54 | +WEAK_DEFAULT void isr_spi(void); |
| 55 | +WEAK_DEFAULT void isr_ssc(void); |
| 56 | +WEAK_DEFAULT void isr_tc0(void); |
| 57 | +WEAK_DEFAULT void isr_tc1(void); |
| 58 | +WEAK_DEFAULT void isr_tc2(void); |
| 59 | +WEAK_DEFAULT void isr_tc3(void); |
| 60 | +WEAK_DEFAULT void isr_tc4(void); |
| 61 | +WEAK_DEFAULT void isr_tc5(void); |
| 62 | +WEAK_DEFAULT void isr_adc(void); |
| 63 | +WEAK_DEFAULT void isr_dacc(void); |
| 64 | +WEAK_DEFAULT void isr_pwm(void); |
| 65 | +WEAK_DEFAULT void isr_crccu(void); |
| 66 | +WEAK_DEFAULT void isr_acc(void); |
| 67 | +WEAK_DEFAULT void isr_udp(void); |
| 68 | + |
| 69 | +/* CPU specific interrupt vector table */ |
| 70 | +ISR_VECTOR(1) const isr_t vector_cpu[CPU_IRQ_NUMOF] = { |
| 71 | + isr_supc, /* 0 Supply Controller */ |
| 72 | + isr_rstc, /* 1 Reset Controller */ |
| 73 | + isr_rtc, /* 2 Real Time Clock */ |
| 74 | + isr_rtt, /* 3 Real Timer Timer */ |
| 75 | + isr_wdt, /* 4 Watchdog Timer */ |
| 76 | + isr_pmc, /* 5 Power Management Controller */ |
| 77 | + isr_eefc0, /* 6 Enhanced Embedded Flash Controller 0 */ |
| 78 | + isr_eefc1, /* 7 Enhanced Embedded Flash Controller 1 */ |
| 79 | + isr_uart0, /* 8 Universal Asynchronous Receiver Transceiver 0 */ |
| 80 | + isr_uart1, /* 9 Universal Asynchronous Receiver Transceiver 1 */ |
| 81 | + isr_smc, /* 10 Static Memory Controller */ |
| 82 | + isr_pioa, /* 11 GPIO port A */ |
| 83 | + isr_piob, /* 12 GPIO port B */ |
| 84 | + isr_pioc, /* 13 GPIO port C */ |
| 85 | + isr_usart0, /* 14 USART0 */ |
| 86 | + isr_usart1, /* 15 USART1 */ |
| 87 | + (0UL), /* Reserved */ |
| 88 | + (0UL), /* Reserved */ |
| 89 | + isr_hsmci, /* 18 Multimedia Card Interface */ |
| 90 | + isr_twi0, /* 19 Two-wire Interface 0 */ |
| 91 | + isr_twi1, /* 20 Two-wire Interface 1 */ |
| 92 | + isr_spi, /* 21 Serial Peripheral Interface */ |
| 93 | + isr_ssc, /* 22 Synchronous Serial Controller */ |
| 94 | + isr_tc0, /* 23 Timer Counter 0 */ |
| 95 | + isr_tc1, /* 24 Timer Counter 1 */ |
| 96 | + isr_tc2, /* 25 Timer Counter 2 */ |
| 97 | + isr_tc3, /* 26 Timer Counter 3 */ |
| 98 | + isr_tc4, /* 27 Timer Counter 4 */ |
| 99 | + isr_tc5, /* 28 Timer Counter 5 */ |
| 100 | + isr_adc, /* 29 Analog/Digital Converter */ |
| 101 | + isr_dacc, /* 30 Digital/Analog Converter Controller */ |
| 102 | + isr_pwm, /* 31 Pulse Width Modulation */ |
| 103 | + isr_crccu, /* 32 CRC Calculation Unit */ |
| 104 | + isr_acc, /* 33 Analog Comparator Controller */ |
| 105 | + isr_udp, /* 34 USB Device Port */ |
| 106 | +}; |
0 commit comments