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 
9 #pragma once
10 
22 #include <stdint.h>
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
31 typedef volatile uint8_t reg8_t;
35 typedef volatile uint16_t reg16_t;
39 typedef volatile uint32_t reg32_t;
40 
44 typedef struct {
47 } reg8_m4_t;
48 
53 
57 typedef struct {
60 } reg32_m16_t;
61 
69 typedef enum IRQn {
70  /****** Cortex-M4 Processor Exceptions Numbers ****************************/
75  BusFault_IRQn = -11,
77  SVCall_IRQn = - 5,
79  PendSV_IRQn = - 2,
80  SysTick_IRQn = - 1,
82  /****** CC13x2 specific Interrupt Numbers *********************************/
84  I2C_IRQN = 1,
86  PKA_IRQN = 3,
88  UART0_IRQN = 5,
90  SSI0_IRQN = 7,
91  SSI1_IRQN = 8,
93  RF_HW_IRQN = 10,
95  I2S_IRQN = 12,
106  CRYPTO_IRQN = 23,
107  UDMA_IRQN = 24,
110  SW0_IRQN = 27,
113  PROG_IRQN = 30,
116  TRNG_IRQN = 33,
117 #ifdef CPU_VARIANT_X2
118  OSC_IRQN = 34,
119  AUX_TIMER2_IRQN = 35,
120  UART1_IRQN = 36,
121  BATMON_IRQN = 37,
123  IRQN_COUNT = (BATMON_IRQN + 1)
124 #else
125  IRQN_COUNT = (TRNG_IRQN + 1)
126 #endif
127 
129 
134 #define __MPU_PRESENT 1
135 #define __NVIC_PRIO_BITS 3
136 #define __Vendor_SysTickConfig 0
139 #define RCOSC48M_FREQ 48000000
140 #define RCOSC24M_FREQ 24000000
145 #ifdef CPU_VARIANT_X2
146 #include <core_cm4.h>
147 #else
148 #include <core_cm3.h>
149 #endif
156 #define FLASH_BASE 0x00000000
157 #define PERIPH_BASE 0x40000000
158 #define PERIPH_BASE_NONBUF 0x60000000
159 #define ROM_HARD_API_BASE 0x10000048
160 #define ROM_API_TABLE ((uint32_t *) 0x10000180)
167 #define ADI_DIR 0x00000000
168 #define ADI_SET 0x00000010
169 #define ADI_CLR 0x00000020
170 #define ADI_MASK4B 0x00000040
171 #define ADI_MASK8B 0x00000060
172 #define ADI_MASK16B 0x00000080
175 #ifdef __cplusplus
176 }
177 #endif
178 
volatile uint32_t reg32_t
Unsigned 32-bit register type.
Definition: cc26xx_cc13xx.h:39
reg16_t reg8_m8_t
Masked 8-bit register.
Definition: cc26xx_cc13xx.h:52
volatile uint16_t reg16_t
Unsigned 16-bit register type.
Definition: cc26xx_cc13xx.h:35
enum IRQn IRQn_Type
Interrupt number definition.
volatile uint8_t reg8_t
Unsigned 8-bit register type.
Definition: cc26xx_cc13xx.h:31
@ PendSV_IRQn
14 Cortex-M4 Pend SV Interrupt
Definition: cc26xx_cc13xx.h:79
@ GPTIMER_0B_IRQN
32 Timer 0 subtimer B
Definition: cc26xx_cc13xx.h:99
@ UART0_IRQN
21 UART0 Rx and Tx
Definition: cc26xx_cc13xx.h:88
@ 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:85
@ AON_AUX_SWEV0_IRQN
22 Sensor Controller software event 0, through AON domain
Definition: cc26xx_cc13xx.h:89
@ GPTIMER_0A_IRQN
31 Timer 0 subtimer A
Definition: cc26xx_cc13xx.h:98
@ AUX_COMBO_IRQN
44 AUX combined event, directly to MCU domain
@ WATCHDOG_IRQN
30 Watchdog timer
Definition: cc26xx_cc13xx.h:97
@ MemoryManagement_IRQn
4 Cortex-M4 Memory Management Interrupt
Definition: cc26xx_cc13xx.h:74
@ AON_RTC_IRQN
20 AON RTC
Definition: cc26xx_cc13xx.h:87
@ 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:95
@ SVCall_IRQn
11 Cortex-M4 SV Call Interrupt
Definition: cc26xx_cc13xx.h:77
@ 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:76
@ SSI1_IRQN
24 SSI1 Rx and Tx
Definition: cc26xx_cc13xx.h:91
@ SysTick_IRQn
15 Cortex-M4 System Tick Interrupt
Definition: cc26xx_cc13xx.h:80
@ ResetHandler_IRQn
1 Reset Handler
Definition: cc26xx_cc13xx.h:71
@ AUX_COMPA_IRQN
47 AUX Comparator A
@ BusFault_IRQn
5 Cortex-M4 Bus Fault Interrupt
Definition: cc26xx_cc13xx.h:75
@ I2C_IRQN
17 I2C
Definition: cc26xx_cc13xx.h:84
@ RF_HW_IRQN
26 RF Core Hardware
Definition: cc26xx_cc13xx.h:93
@ DebugMonitor_IRQn
12 Cortex-M4 Debug Monitor Interrupt
Definition: cc26xx_cc13xx.h:78
@ RF_CPE0_IRQN
25 RF Command and Packet Engine 0
Definition: cc26xx_cc13xx.h:92
@ RF_CMD_ACK_IRQN
27 RF Core Command Acknowledge
Definition: cc26xx_cc13xx.h:94
@ UDMA_IRQN
40 uDMA Software
@ EDGE_DETECT_IRQN
16 AON edge detect
Definition: cc26xx_cc13xx.h:83
@ PKA_IRQN
19 PKA interrupt
Definition: cc26xx_cc13xx.h:86
@ SW0_IRQN
43 Software Event 0
@ HardFault_IRQn
3 Cortex-M4 Hard Fault Interrupt
Definition: cc26xx_cc13xx.h:73
@ 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:90
@ NonMaskableInt_IRQn
2 Non Maskable Interrupt
Definition: cc26xx_cc13xx.h:72
@ AON_AUX_SWEV1_IRQN
29 Sensor Controller software event 1, through AON domain
Definition: cc26xx_cc13xx.h:96
@ TRNG_IRQN
49 TRNG event
IRQn
Interrupt Number Definition.
Definition: cc2538.h:34
Masked 32-bit register.
Definition: cc26xx_cc13xx.h:57
reg32_t HIGH
High 16-bit half.
Definition: cc26xx_cc13xx.h:59
reg32_t LOW
Low 16-bit half.
Definition: cc26xx_cc13xx.h:58
Masked 8-bit register.
Definition: cc26xx_cc13xx.h:44
reg8_t HIGH
High 4-bit half.
Definition: cc26xx_cc13xx.h:46
reg8_t LOW
Low 4-bit half.
Definition: cc26xx_cc13xx.h:45