cc26xx_cc13xx_ioc.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 
21 #include "cc26xx_cc13xx.h"
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
30 #define MCU_IOC_BASE (0x40081000)
38 typedef struct {
39  reg32_t CFG[32];
41 
42 #define IOC ((cc26x0_ioc_regs_t *)(MCU_IOC_BASE))
48 #define IOCFG_PORTID_GPIO 0x00000000
50 #ifdef CPU_VARIANT_X0
51 #define IOCFG_PORTID_AON_SCS 0x00000001
52 #define IOCFG_PORTID_AON_SCK 0x00000002
53 #define IOCFG_PORTID_AON_SDI 0x00000003
54 #define IOCFG_PORTID_AON_SDO 0x00000004
55 #endif /* CPU_VARIANT_X0 */
56 
57 #define IOCFG_PORTID_AON_CLK32K 0x00000007
58 #define IOCFG_PORTID_AUX_IO 0x00000008
59 #define IOCFG_PORTID_SSI0_RX 0x00000009
60 #define IOCFG_PORTID_SSI0_TX 0x0000000A
61 #define IOCFG_PORTID_SSI0_FSS 0x0000000B
62 #define IOCFG_PORTID_SSI0_CLK 0x0000000C
63 #define IOCFG_PORTID_I2C_MSSDA 0x0000000D
64 #define IOCFG_PORTID_I2C_MSSCL 0x0000000E
65 #define IOCFG_PORTID_UART0_RX 0x0000000F
66 #define IOCFG_PORTID_UART0_TX 0x00000010
67 #define IOCFG_PORTID_UART0_CTS 0x00000011
68 #define IOCFG_PORTID_UART0_RTS 0x00000012
70 #ifdef CPU_VARIANT_X2
71 #define IOCFG_PORTID_UART1_RX 0x00000013
72 #define IOCFG_PORTID_UART1_TX 0x00000014
73 #define IOCFG_PORTID_UART1_CTS 0x00000015
74 #define IOCFG_PORTID_UART1_RTS 0x00000016
75 #endif // CPU_VARIANT_X2
76 
77 #define IOCFG_PORTID_PORT_EVT0 0x00000017
78 #define IOCFG_PORTID_PORT_EVT1 0x00000018
79 #define IOCFG_PORTID_PORT_EVT2 0x00000019
80 #define IOCFG_PORTID_PORT_EVT3 0x0000001A
81 #define IOCFG_PORTID_PORT_EVT4 0x0000001B
82 #define IOCFG_PORTID_PORT_EVT5 0x0000001C
83 #define IOCFG_PORTID_PORT_EVT6 0x0000001D
84 #define IOCFG_PORTID_PORT_EVT7 0x0000001E
85 #define IOCFG_PORTID_SWV 0x00000020
86 #define IOCFG_PORTID_SSI1_RX 0x00000021
87 #define IOCFG_PORTID_SSI1_TX 0x00000022
88 #define IOCFG_PORTID_SSI1_FSS 0x00000023
89 #define IOCFG_PORTID_SSI1_CLK 0x00000024
90 #define IOCFG_PORTID_I2S_AD0 0x00000025
91 #define IOCFG_PORTID_I2S_AD1 0x00000026
92 #define IOCFG_PORTID_I2S_WCLK 0x00000027
93 #define IOCFG_PORTID_I2S_BCLK 0x00000028
94 #define IOCFG_PORTID_I2S_MCLK 0x00000029
95 #define IOCFG_PORTID_RFC_TRC 0x0000002E
96 #define IOCFG_PORTID_RFC_GPO0 0x0000002F
97 #define IOCFG_PORTID_RFC_GPO1 0x00000030
98 #define IOCFG_PORTID_RFC_GPO2 0x00000031
99 #define IOCFG_PORTID_RFC_GPO3 0x00000032
100 #define IOCFG_PORTID_RFC_GPI0 0x00000033
101 #define IOCFG_PORTID_RFC_GPI1 0x00000034
102 #define IOCFG_PORTID_RFC_SMI_DL_OUT 0x00000035
103 #define IOCFG_PORTID_RFC_SMI_DL_IN 0x00000036
104 #define IOCFG_PORTID_RFC_SMI_CMD_OUT 0x00000037
105 #define IOCFG_PORTID_RFC_SMI_CMD_IN 0x00000038
107 #define IOCFG_IOSTR_AUTO 0x00000000
108 #define IOCFG_IOSTR_MAX 0x00000300
109 #define IOCFG_IOSTR_MED 0x00000200
110 #define IOCFG_IOSTR_MIN 0x00000100
112 #define IOCFG_IOCURR_2MA 0x00000000
113 #define IOCFG_IOCURR_4MA 0x00000400
114 #define IOCFG_IOCURR_8MA 0x00000800
115 #define IOCFG_IOCURR_16MA 0x00000C00
117 #define IOCFG_SLEW_RED 0x00001000
119 #define IOCFG_PULLCTL_OFF 0x00006000
120 #define IOCFG_PULLCTL_UP 0x00004000
121 #define IOCFG_PULLCTL_DOWN 0x00002000
123 #define IOCFG_EDGEDET_FALLING 0x00010000
124 #define IOCFG_EDGEDET_RISING 0x00020000
125 #define IOCFG_EDGEDET_BOTH 0x00030000
126 #define IOCFG_EDGEIRQ_ENABLE 0x00040000
128 /* n/a when port_id is AON or AUX */
129 #define IOCFG_IOMODE_INV 0x01000000
130 #define IOCFG_IOMODE_OPEN_DRAIN 0x04000000
131 #define IOCFG_IOMODE_OPEN_SRC 0x06000000
133 /* both enable waking up when port_id is AON or AUX */
134 #define IOCFG_WUCFG_LOW 0x10000000
135 #define IOCFG_WUCFG_HIGH 0x18000000
136 
137 /* ignored if port_id is AUX */
138 #define IOCFG_INPUT_ENABLE 0x20000000
139 
140 #define IOCFG_HYST_ENABLE 0x40000000
146 typedef struct {
152 #ifdef CPU_VARIANT_X2
153  reg32_t TCKCTL;
154 #endif
156 
161 #define AON_IOC_IOCLATCH_EN 0x00000001
162 #define AON_IOC_CLK32KCTL_OEN 0x00000001
172 #define AON_IOC_BASE (PERIPH_BASE + 0x94000)
178 #define AON_IOC ((aon_ioc_regs_t *) (AON_IOC_BASE))
179 
180 #ifdef __cplusplus
181 }
182 #endif
183 
CC26xx, CC13xx definitions.
volatile uint32_t reg32_t
Unsigned 32-bit register type.
Definition: cc26xx_cc13xx.h:39
AON_IOC registers.
reg32_t IOSTRMIN
IO Drive Strength Minimum.
reg32_t IOCLATCH
IO Latch Control.
reg32_t CLK32KCTL
SCLK_LF External Output Control.
reg32_t IOSTRMAX
IO Drive Strength Maximum.
reg32_t IOSTRMED
IO Drive Strength Medium.
obtain IOCFG-register for a DIO