Contiki-NG
Loading...
Searching...
No Matches
cc2538_cm3.h
Go to the documentation of this file.
1/*
2 * Template:
3 * Copyright (c) 2012 ARM LIMITED
4 * All rights reserved.
5 *
6 * CC2538:
7 * Copyright (c) 2016, Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
8 * All rights reserved.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions are met:
12 *
13 * 1. Redistributions of source code must retain the above copyright notice,
14 * this list of conditions and the following disclaimer.
15 *
16 * 2. Redistributions in binary form must reproduce the above copyright notice,
17 * this list of conditions and the following disclaimer in the documentation
18 * and/or other materials provided with the distribution.
19 *
20 * 3. Neither the name of the copyright holder nor the names of its contributors
21 * may be used to endorse or promote products derived from this software
22 * without specific prior written permission.
23 *
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
28 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 * POSSIBILITY OF SUCH DAMAGE.
35 */
36/**
37 * \addtogroup cc2538
38 * @{
39 *
40 * \defgroup cc2538-cm3 CC2538 Cortex-M3
41 *
42 * CC2538 Cortex-M3 CMSIS definitions
43 * @{
44 *
45 * \file
46 * CMSIS Cortex-M3 core peripheral access layer header file for CC2538
47 */
48#ifndef CC2538_CM3_H
49#define CC2538_CM3_H
50
51#ifdef __cplusplus
52extern "C" {
53#endif
54
55/** \defgroup CC2538_CMSIS CC2538 CMSIS Definitions
56 * Configuration of the Cortex-M3 Processor and Core Peripherals
57 * @{
58 */
59
60/** \name Interrupt Number Definition
61 * @{
62 */
63
64typedef enum IRQn
65{
66 /****** Cortex-M3 Processor Exceptions Numbers ****************************/
67 NonMaskableInt_IRQn = -14, /**< 2 Non Maskable Interrupt */
68 HardFault_IRQn = -13, /**< 3 HardFault Interrupt */
69 MemoryManagement_IRQn = -12, /**< 4 Memory Management Interrupt */
70 BusFault_IRQn = -11, /**< 5 Bus Fault Interrupt */
71 UsageFault_IRQn = -10, /**< 6 Usage Fault Interrupt */
72 SVCall_IRQn = -5, /**< 11 SV Call Interrupt */
73 DebugMonitor_IRQn = -4, /**< 12 Debug Monitor Interrupt */
74 PendSV_IRQn = -2, /**< 14 Pend SV Interrupt */
75 SysTick_IRQn = -1, /**< 15 System Tick Interrupt */
76
77 /****** CC2538-Specific Interrupt Numbers *********************************/
78 GPIO_A_IRQn = 0, /**< GPIO port A Interrupt */
79 GPIO_B_IRQn = 1, /**< GPIO port B Interrupt */
80 GPIO_C_IRQn = 2, /**< GPIO port C Interrupt */
81 GPIO_D_IRQn = 3, /**< GPIO port D Interrupt */
82 UART0_IRQn = 5, /**< UART0 Interrupt */
83 UART1_IRQn = 6, /**< UART1 Interrupt */
84 SSI0_IRQn = 7, /**< SSI0 Interrupt */
85 I2C_IRQn = 8, /**< I²C Interrupt */
86 ADC_IRQn = 14, /**< ADC Interrupt */
87 WDT_IRQn = 18, /**< Watchdog Timer Interrupt */
88 GPT0A_IRQn = 19, /**< GPTimer 0A Interrupt */
89 GPT0B_IRQn = 20, /**< GPTimer 0B Interrupt */
90 GPT1A_IRQn = 21, /**< GPTimer 1A Interrupt */
91 GPT1B_IRQn = 22, /**< GPTimer 1B Interrupt */
92 GPT2A_IRQn = 23, /**< GPTimer 2A Interrupt */
93 GPT2B_IRQn = 24, /**< GPTimer 2B Interrupt */
94 ADC_CMP_IRQn = 25, /**< Analog Comparator Interrupt */
95 RF_TX_RX_ALT_IRQn = 26, /**< RF Tx/Rx (Alternate) Interrupt */
96 RF_ERR_ALT_IRQn = 27, /**< RF Error (Alternate) Interrupt */
97 SYS_CTRL_IRQn = 28, /**< System Control Interrupt */
98 FLASH_CTRL_IRQn = 29, /**< Flash memory Control Interrupt */
99 AES_ALT_IRQn = 30, /**< AES (Alternate) Interrupt */
100 PKA_ALT_IRQn = 31, /**< PKA (Alternate) Interrupt */
101 SMT_ALT_IRQn = 32, /**< SM Timer (Alternate) Interrupt */
102 MACT_ALT_IRQn = 33, /**< MAC Timer (Alternate) Interrupt */
103 SSI1_IRQn = 34, /**< SSI1 Interrupt */
104 GPT3A_IRQn = 35, /**< GPTimer 3A Interrupt */
105 GPT3B_IRQn = 36, /**< GPTimer 3B Interrupt */
106 UDMA_SW_IRQn = 46, /**< µDMA Software Interrupt */
107 UDMA_ERR_IRQn = 47, /**< µDMA Error Interrupt */
108 USB_IRQn = 140, /**< USB Interrupt */
109 RF_TX_RX_IRQn = 141, /**< RF Tx/Rx Interrupt */
110 RF_ERR_IRQn = 142, /**< RF Error Interrupt */
111 AES_IRQn = 143, /**< AES Interrupt */
112 PKA_IRQn = 144, /**< PKA Interrupt */
113 SMT_IRQn = 145, /**< SM Timer Interrupt */
114 MACT_IRQn = 146 /**< MAC Timer Interrupt */
115} IRQn_Type;
116
117/** @} */
118
119/** \name Processor and Core Peripheral Section
120 * @{
121 */
122
123/* Configuration of the Cortex-M3 Processor and Core Peripherals */
124#define __CM3_REV 0x0200 /**< Core Revision r2p0 */
125#define __MPU_PRESENT 1 /**< MPU present or not */
126#define __NVIC_PRIO_BITS 3 /**< Number of Bits used for Priority Levels */
127#define __Vendor_SysTickConfig 0 /**< Set to 1 if different SysTick Config is used */
128
129/** @} */
130
131/** @} */ /* CC2538_CMSIS */
132
133#include <core_cm3.h> /* Cortex-M3 processor and core peripherals */
134
135#ifdef __cplusplus
136}
137#endif
138
139#endif /* CC2538_CM3_H */
140
141/**
142 * @}
143 * @}
144 */
IRQn
Definition cc2538_cm3.h:65
@ SSI0_IRQn
SSI0 Interrupt.
Definition cc2538_cm3.h:84
@ PendSV_IRQn
14 Pend SV Interrupt
Definition cc2538_cm3.h:74
@ PKA_IRQn
PKA Interrupt.
Definition cc2538_cm3.h:112
@ PKA_ALT_IRQn
PKA (Alternate) Interrupt.
Definition cc2538_cm3.h:100
@ GPT3A_IRQn
GPTimer 3A Interrupt.
Definition cc2538_cm3.h:104
@ MemoryManagement_IRQn
4 Memory Management Interrupt
Definition cc2538_cm3.h:69
@ UDMA_ERR_IRQn
µDMA Error Interrupt
Definition cc2538_cm3.h:107
@ MACT_IRQn
MAC Timer Interrupt.
Definition cc2538_cm3.h:114
@ GPIO_D_IRQn
GPIO port D Interrupt.
Definition cc2538_cm3.h:81
@ GPT2B_IRQn
GPTimer 2B Interrupt.
Definition cc2538_cm3.h:93
@ SVCall_IRQn
11 SV Call Interrupt
Definition cc2538_cm3.h:72
@ ADC_IRQn
ADC Interrupt.
Definition cc2538_cm3.h:86
@ GPIO_A_IRQn
GPIO port A Interrupt.
Definition cc2538_cm3.h:78
@ ADC_CMP_IRQn
Analog Comparator Interrupt.
Definition cc2538_cm3.h:94
@ USB_IRQn
USB Interrupt.
Definition cc2538_cm3.h:108
@ RF_ERR_ALT_IRQn
RF Error (Alternate) Interrupt.
Definition cc2538_cm3.h:96
@ GPT3B_IRQn
GPTimer 3B Interrupt.
Definition cc2538_cm3.h:105
@ SMT_IRQn
SM Timer Interrupt.
Definition cc2538_cm3.h:113
@ GPT2A_IRQn
GPTimer 2A Interrupt.
Definition cc2538_cm3.h:92
@ SMT_ALT_IRQn
SM Timer (Alternate) Interrupt.
Definition cc2538_cm3.h:101
@ UsageFault_IRQn
6 Usage Fault Interrupt
Definition cc2538_cm3.h:71
@ GPT0A_IRQn
GPTimer 0A Interrupt.
Definition cc2538_cm3.h:88
@ SysTick_IRQn
15 System Tick Interrupt
Definition cc2538_cm3.h:75
@ WDT_IRQn
Watchdog Timer Interrupt.
Definition cc2538_cm3.h:87
@ RF_ERR_IRQn
RF Error Interrupt.
Definition cc2538_cm3.h:110
@ GPT1A_IRQn
GPTimer 1A Interrupt.
Definition cc2538_cm3.h:90
@ AES_IRQn
AES Interrupt.
Definition cc2538_cm3.h:111
@ BusFault_IRQn
5 Bus Fault Interrupt
Definition cc2538_cm3.h:70
@ RF_TX_RX_ALT_IRQn
RF Tx/Rx (Alternate) Interrupt.
Definition cc2538_cm3.h:95
@ DebugMonitor_IRQn
12 Debug Monitor Interrupt
Definition cc2538_cm3.h:73
@ UART1_IRQn
UART1 Interrupt.
Definition cc2538_cm3.h:83
@ GPIO_C_IRQn
GPIO port C Interrupt.
Definition cc2538_cm3.h:80
@ FLASH_CTRL_IRQn
Flash memory Control Interrupt.
Definition cc2538_cm3.h:98
@ GPT1B_IRQn
GPTimer 1B Interrupt.
Definition cc2538_cm3.h:91
@ GPT0B_IRQn
GPTimer 0B Interrupt.
Definition cc2538_cm3.h:89
@ HardFault_IRQn
3 HardFault Interrupt
Definition cc2538_cm3.h:68
@ MACT_ALT_IRQn
MAC Timer (Alternate) Interrupt.
Definition cc2538_cm3.h:102
@ RF_TX_RX_IRQn
RF Tx/Rx Interrupt.
Definition cc2538_cm3.h:109
@ UDMA_SW_IRQn
µDMA Software Interrupt
Definition cc2538_cm3.h:106
@ SYS_CTRL_IRQn
System Control Interrupt.
Definition cc2538_cm3.h:97
@ NonMaskableInt_IRQn
2 Non Maskable Interrupt
Definition cc2538_cm3.h:67
@ I2C_IRQn
I²C Interrupt.
Definition cc2538_cm3.h:85
@ GPIO_B_IRQn
GPIO port B Interrupt.
Definition cc2538_cm3.h:79
@ SSI1_IRQn
SSI1 Interrupt.
Definition cc2538_cm3.h:103
@ UART0_IRQn
UART0 Interrupt.
Definition cc2538_cm3.h:82
@ AES_ALT_IRQn
AES (Alternate) Interrupt.
Definition cc2538_cm3.h:99