cc26xx_cc13xx.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Leon George
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 
20 #ifndef CC26XX_CC13XX_H
21 #define CC26XX_CC13XX_H
22 
23 #include <stdint.h>
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
32 typedef volatile uint8_t reg8_t;
36 typedef volatile uint16_t reg16_t;
40 typedef volatile uint32_t reg32_t;
41 
45 typedef struct {
48 } reg8_m4_t;
49 
54 
58 typedef struct {
61 } reg32_m16_t;
62 
70 typedef enum IRQn {
71  /****** Cortex-M4 Processor Exceptions Numbers ****************************/
76  BusFault_IRQn = -11,
78  SVCall_IRQn = - 5,
80  PendSV_IRQn = - 2,
81  SysTick_IRQn = - 1,
83  /****** CC13x2 specific Interrupt Numbers *********************************/
85  I2C_IRQN = 1,
87  PKA_IRQN = 3,
89  UART0_IRQN = 5,
91  SSI0_IRQN = 7,
92  SSI1_IRQN = 8,
94  RF_HW_IRQN = 10,
96  I2S_IRQN = 12,
107  CRYPTO_IRQN = 23,
108  UDMA_IRQN = 24,
111  SW0_IRQN = 27,
114  PROG_IRQN = 30,
117  TRNG_IRQN = 33,
118 #ifdef CPU_VARIANT_X2
119  OSC_IRQN = 34,
120  AUX_TIMER2_IRQN = 35,
121  UART1_IRQN = 36,
122  BATMON_IRQN = 37,
124  IRQN_COUNT = (BATMON_IRQN + 1)
125 #else
126  IRQN_COUNT = (TRNG_IRQN + 1)
127 #endif
128 
130 
135 #define __MPU_PRESENT 1
136 #define __NVIC_PRIO_BITS 3
137 #define __Vendor_SysTickConfig 0
140 #define RCOSC48M_FREQ 48000000
141 #define RCOSC24M_FREQ 24000000
146 #ifdef CPU_VARIANT_X2
147 #include <core_cm4.h>
148 #else
149 #include <core_cm3.h>
150 #endif
157 #define FLASH_BASE 0x00000000
158 #define PERIPH_BASE 0x40000000
159 #define PERIPH_BASE_NONBUF 0x60000000
160 #define ROM_HARD_API_BASE 0x10000048
161 #define ROM_API_TABLE ((uint32_t *) 0x10000180)
168 #define ADI_DIR 0x00000000
169 #define ADI_SET 0x00000010
170 #define ADI_CLR 0x00000020
171 #define ADI_MASK4B 0x00000040
172 #define ADI_MASK8B 0x00000060
173 #define ADI_MASK16B 0x00000080
176 #ifdef __cplusplus
177 }
178 #endif
179 
180 #endif /* CC26XX_CC13XX_H */
volatile uint32_t reg32_t
Unsigned 32-bit register type.
Definition: cc26xx_cc13xx.h:40
reg16_t reg8_m8_t
Masked 8-bit register.
Definition: cc26xx_cc13xx.h:53
volatile uint16_t reg16_t
Unsigned 16-bit register type.
Definition: cc26xx_cc13xx.h:36
enum IRQn IRQn_Type
Interrupt number definition.
volatile uint8_t reg8_t
Unsigned 8-bit register type.
Definition: cc26xx_cc13xx.h:32
@ PendSV_IRQn
14 Cortex-M4 Pend SV Interrupt
Definition: cc26xx_cc13xx.h:80
@ GPTIMER_0B_IRQN
32 Timer 0 subtimer B
@ UART0_IRQN
21 UART0 Rx and Tx
Definition: cc26xx_cc13xx.h:89
@ GPTIMER_2A_IRQN
35 Timer 2 subtimer A
@ AUX_ADC_IRQN
48 AUX ADC IRQ
@ GPTIMER_2B_IRQN
36 Timer 2 subtimer B
@ RF_CPE1_IRQN
18 RF Command and Packet Engine 1
Definition: cc26xx_cc13xx.h:86
@ AON_AUX_SWEV0_IRQN
22 Sensor Controller software event 0, through AON domain
Definition: cc26xx_cc13xx.h:90
@ GPTIMER_0A_IRQN
31 Timer 0 subtimer A
Definition: cc26xx_cc13xx.h:99
@ AUX_COMBO_IRQN
44 AUX combined event, directly to MCU domain
@ WATCHDOG_IRQN
30 Watchdog timer
Definition: cc26xx_cc13xx.h:98
@ MemoryManagement_IRQn
4 Cortex-M4 Memory Management Interrupt
Definition: cc26xx_cc13xx.h:75
@ AON_RTC_IRQN
20 AON RTC
Definition: cc26xx_cc13xx.h:88
@ PROG_IRQN
46 Dynamic Programmable interrupt (default source: PRCM)
@ GPTIMER_3A_IRQN
37 Timer 3 subtimer A
@ IRQN_COUNT
Number of peripheral IDs.
@ I2S_IRQN
28 I2S
Definition: cc26xx_cc13xx.h:96
@ SVCall_IRQn
11 Cortex-M4 SV Call Interrupt
Definition: cc26xx_cc13xx.h:78
@ FLASH_CTRL_IRQN
42 Flash controller
@ GPTIMER_3B_IRQN
38 Timer 3 subtimer B
@ UDMA_ERR_IRQN
41 uDMA Error
@ UsageFault_IRQn
6 Cortex-M4 Usage Fault Interrupt
Definition: cc26xx_cc13xx.h:77
@ SSI1_IRQN
24 SSI1 Rx and Tx
Definition: cc26xx_cc13xx.h:92
@ SysTick_IRQn
15 Cortex-M4 System Tick Interrupt
Definition: cc26xx_cc13xx.h:81
@ ResetHandler_IRQn
1 Reset Handler
Definition: cc26xx_cc13xx.h:72
@ AUX_COMPA_IRQN
47 AUX Comparator A
@ BusFault_IRQn
5 Cortex-M4 Bus Fault Interrupt
Definition: cc26xx_cc13xx.h:76
@ I2C_IRQN
17 I2C
Definition: cc26xx_cc13xx.h:85
@ RF_HW_IRQN
26 RF Core Hardware
Definition: cc26xx_cc13xx.h:94
@ DebugMonitor_IRQn
12 Cortex-M4 Debug Monitor Interrupt
Definition: cc26xx_cc13xx.h:79
@ RF_CPE0_IRQN
25 RF Command and Packet Engine 0
Definition: cc26xx_cc13xx.h:93
@ RF_CMD_ACK_IRQN
27 RF Core Command Acknowledge
Definition: cc26xx_cc13xx.h:95
@ UDMA_IRQN
40 uDMA Software
@ EDGE_DETECT_IRQN
16 AON edge detect
Definition: cc26xx_cc13xx.h:84
@ PKA_IRQN
19 PKA interrupt
Definition: cc26xx_cc13xx.h:87
@ SW0_IRQN
43 Software Event 0
@ HardFault_IRQn
3 Cortex-M4 Hard Fault Interrupt
Definition: cc26xx_cc13xx.h:74
@ GPTIMER_1B_IRQN
34 Timer 1 subtimer B
@ CRYPTO_IRQN
39 Crypto Core Result available
@ GPTIMER_1A_IRQN
33 Timer 1 subtimer A
@ AON_PRG0_IRQN
45 AON programmable 0
@ SSI0_IRQN
23 SSI0 Rx and Tx
Definition: cc26xx_cc13xx.h:91
@ NonMaskableInt_IRQn
2 Non Maskable Interrupt
Definition: cc26xx_cc13xx.h:73
@ AON_AUX_SWEV1_IRQN
29 Sensor Controller software event 1, through AON domain
Definition: cc26xx_cc13xx.h:97
@ TRNG_IRQN
49 TRNG event
IRQn
Interrupt Number Definition.
Definition: cc2538.h:35
Masked 32-bit register.
Definition: cc26xx_cc13xx.h:58
reg32_t HIGH
High 16-bit half.
Definition: cc26xx_cc13xx.h:60
reg32_t LOW
Low 16-bit half.
Definition: cc26xx_cc13xx.h:59
Masked 8-bit register.
Definition: cc26xx_cc13xx.h:45
reg8_t HIGH
High 4-bit half.
Definition: cc26xx_cc13xx.h:47
reg8_t LOW
Low 4-bit half.
Definition: cc26xx_cc13xx.h:46