CC26xx Driver Library |

- Main Page
- Related Pages
- CC26xx APIs
- Register Descriptions
- Online Resources

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
aux_wuc.h
Go to the documentation of this file.
1 /******************************************************************************
2 * Filename: aon_wuc.h
3 * Revised: 2015-01-14 12:12:44 +0100 (on, 14 jan 2015)
4 * Revision: 42373
5 *
6 * Description: Defines and prototypes for the AUX Wakeup Controller
7 *
8 * Copyright (c) 2015, Texas Instruments Incorporated
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions are met:
13 *
14 * 1) Redistributions of source code must retain the above copyright notice,
15 * this list of conditions and the following disclaimer.
16 *
17 * 2) Redistributions in binary form must reproduce the above copyright notice,
18 * this list of conditions and the following disclaimer in the documentation
19 * and/or other materials provided with the distribution.
20 *
21 * 3) Neither the name of the ORGANIZATION nor the names of its contributors may
22 * be used to endorse or promote products derived from this software without
23 * specific prior written permission.
24 *
25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
29 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 * POSSIBILITY OF SUCH DAMAGE.
36 *
37 ******************************************************************************/
38
39 //****************************************************************************
40 //
43 //
44 //****************************************************************************
45
46 #ifndef __AUX_WUC_H__
47 #define __AUX_WUC_H__
48
49 //*****************************************************************************
50 //
51 // If building with a C++ compiler, make all of the definitions in this header
52 // have a C binding.
53 //
54 //*****************************************************************************
55 #ifdef __cplusplus
56 extern "C"
57 {
58 #endif
59
60 #include <stdbool.h>
61 #include <stdint.h>
62 #include <inc/hw_types.h>
63 #include <inc/hw_memmap.h>
64 #include <inc/hw_aux_wuc.h>
65 #include <driverlib/debug.h>
66
67 //*****************************************************************************
68 //
69 // Support for DriverLib in ROM:
70 // This section renames all functions that are not "static inline", so that
71 // calling these functions will default to implementation in flash. At the end
72 // of this file a second renaming will change the defaults to implementation in
73 // ROM for available functions.
74 //
75 // To force use of the implementation in flash, e.g. for debugging:
76 // - Globally: Define DRIVERLIB_NOROM at project level
77 // - Per function: Use prefix "NOROM_" when calling the function
78 //
79 // Do not define DRIVERLIB_GENERATE_ROM!
80 //
81 //*****************************************************************************
82 #ifndef DRIVERLIB_GENERATE_ROM
83 #define AUXWUCClockEnable NOROM_AUXWUCClockEnable
84 #define AUXWUCClockDisable NOROM_AUXWUCClockDisable
85 #define AUXWUCClockStatus NOROM_AUXWUCClockStatus
86 #define AUXWUCPowerCtrl NOROM_AUXWUCPowerCtrl
87 #endif
88
89 //*****************************************************************************
90 //
91 // Defines for the AUX power control.
92 //
93 //*****************************************************************************
94 #define AUX_WUC_POWER_OFF 0x00000001
95 #define AUX_WUC_POWER_DOWN 0x00000002
96 #define AUX_WUC_POWER_ACTIVE 0x00000004
97
98 //*****************************************************************************
99 //
100 // Defines for the AUX peripherals clock control.
101 //
102 //*****************************************************************************
103 #define AUX_WUC_SMPH_CLOCK 0x00000001
104 #define AUX_WUC_AIODIO0_CLOCK 0x00000002
105 #define AUX_WUC_AIODIO1_CLOCK 0x00000004
106 #define AUX_WUC_TIMER_CLOCK 0x00000008
107 #define AUX_WUC_SOC_CLOCK 0x00000010
108 #define AUX_WUC_TDCIF_CLOCK 0x00000020
109 #define AUX_WUC_OSCCTRL_CLOCK 0x00000040
110 #define AUX_WUC_ADI_CLOCK 0x00000080
111 #define AUX_WUC_MODCLK_MASK 0x000000FF
112
113 #define AUX_WUC_TDC_CLOCK 0x00000100
114 #define AUX_WUC_ADC_CLOCK 0x00000200
115 #define AUX_WUC_REF_CLOCK 0x00000400
116
117 #define AUX_WUC_CLOCK_OFF 0x00000000
118 #define AUX_WUC_CLOCK_UNSTABLE 0x00000001
119 #define AUX_WUC_CLOCK_READY 0x00000011
120
121 #define AUX_WUC_CLOCK_HIFREQ 0x00000000
122 #define AUX_WUC_CLOCK_LOFREQ 0x00000001
123
124 //*****************************************************************************
125 //
126 // API Functions and prototypes
127 //
128 //*****************************************************************************
129
130 //****************************************************************************
131 //
153 //
154 //****************************************************************************
155 extern void AUXWUCClockEnable(uint32_t ui32Clocks);
156
157 //****************************************************************************
158 //
180 //
181 //****************************************************************************
182 extern void AUXWUCClockDisable(uint32_t ui32Clocks);
183
184 //****************************************************************************
185 //
207 //
208 //****************************************************************************
209 extern uint32_t AUXWUCClockStatus(uint32_t ui32Clocks);
210
211 //****************************************************************************
212 //
229 //
230 //****************************************************************************
231 __STATIC_INLINE void
232 AUXWUCClockFreqReq(uint32_t ui32ClockFreq)
233 {
234 //
235 // Check the arguments.
236 //
237 ASSERT((ui32ClockFreq == AUX_WUC_CLOCK_HIFREQ) ||
238 (ui32ClockFreq == AUX_WUC_CLOCK_LOFREQ));
239
240 //
241 // Set the request
242 //
243 HWREG(AUX_WUC_BASE + AUX_WUC_O_CLKLFREQ) = ui32ClockFreq;
244 }
245
246 //****************************************************************************
247 //
259 //
260 //****************************************************************************
261 extern void AUXWUCPowerCtrl(uint32_t ui32PowerMode);
262
263 //*****************************************************************************
264 //
276 //
277 //*****************************************************************************
278 __STATIC_INLINE void
279 AUXWUCFreezeEnable(void)
280 {
281 //
282 // Set the AUX WUC latches as static.
283 //
284 HWREG(AUX_WUC_BASE + AUX_WUC_O_AUXIOLATCH) = 0x0;
285 }
286
287 //*****************************************************************************
288 //
301 //
302 //*****************************************************************************
303 __STATIC_INLINE void
304 AUXWUCFreezeDisable(void)
305 {
306 //
307 // Set the AUX WUC latches as transparent.
308 //
309 HWREG(AUX_WUC_BASE + AUX_WUC_O_AUXIOLATCH) = AUX_WUC_AUXIOLATCH_EN;
310 }
311
312 //*****************************************************************************
313 //
314 // Support for DriverLib in ROM:
315 // Redirect to implementation in ROM when available.
316 //
317 //*****************************************************************************
318 #ifndef DRIVERLIB_NOROM
319 #include <driverlib/rom.h>
320 #ifdef ROM_AUXWUCClockEnable
321 #undef AUXWUCClockEnable
322 #define AUXWUCClockEnable ROM_AUXWUCClockEnable
323 #endif
324 #ifdef ROM_AUXWUCClockDisable
325 #undef AUXWUCClockDisable
326 #define AUXWUCClockDisable ROM_AUXWUCClockDisable
327 #endif
328 #ifdef ROM_AUXWUCClockStatus
329 #undef AUXWUCClockStatus
330 #define AUXWUCClockStatus ROM_AUXWUCClockStatus
331 #endif
332 #ifdef ROM_AUXWUCPowerCtrl
333 #undef AUXWUCPowerCtrl
334 #define AUXWUCPowerCtrl ROM_AUXWUCPowerCtrl
335 #endif
336 #endif
337
338 //*****************************************************************************
339 //
340 // Mark the end of the C bindings section for C++ compilers.
341 //
342 //*****************************************************************************
343 #ifdef __cplusplus
344 }
345 #endif
346
347 #endif // __AUX_WUC_H__
348
349 //****************************************************************************
350 //
353 //
354 //****************************************************************************
AUXWUCClockFreqReq
__STATIC_INLINE void AUXWUCClockFreqReq(uint32_t ui32ClockFreq)
Request a high or low frequency clock source.
Definition: aux_wuc.h:232
AUX_WUC_CLOCK_LOFREQ
#define AUX_WUC_CLOCK_LOFREQ
Definition: aux_wuc.h:122
AUXWUCClockEnable
void AUXWUCClockEnable(uint32_t ui32Clocks)
Enable clocks for peripherals in the AUX domain.
Definition: aux_wuc.c:64
debug.h
AUXWUCPowerCtrl
void AUXWUCPowerCtrl(uint32_t ui32PowerMode)
Control the power to the AUX domain.
Definition: aux_wuc.c:274
AUXWUCClockStatus
uint32_t AUXWUCClockStatus(uint32_t ui32Clocks)
Get the status of a clock.
Definition: aux_wuc.c:162
AUX_WUC_CLOCK_HIFREQ
#define AUX_WUC_CLOCK_HIFREQ
Definition: aux_wuc.h:121
ASSERT
#define ASSERT(expr)
Definition: debug.h:65
AUXWUCClockDisable
void AUXWUCClockDisable(uint32_t ui32Clocks)
Disable clocks for peripherals in the AUX domain.
Definition: aux_wuc.c:113
AUXWUCFreezeDisable
__STATIC_INLINE void AUXWUCFreezeDisable(void)
Unfreeze the AUX IOs.
Definition: aux_wuc.h:304
AUXWUCFreezeEnable
__STATIC_INLINE void AUXWUCFreezeEnable(void)
Freeze the AUX IOs.
Definition: aux_wuc.h:279
rom.h