-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathaon_event.h
620 lines (592 loc) · 31.6 KB
/
aon_event.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
/******************************************************************************
* Filename: aon_event.h
* Revised: 2017-08-09 16:56:05 +0200 (Wed, 09 Aug 2017)
* Revision: 49506
*
* Description: Defines and prototypes for the AON Event fabric.
*
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1) Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2) Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3) Neither the name of the ORGANIZATION nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************/
//*****************************************************************************
//
//! \addtogroup aon_group
//! @{
//! \addtogroup aonevent_api
//! @{
//
//*****************************************************************************
#ifndef __AON_EVENT_H__
#define __AON_EVENT_H__
//*****************************************************************************
//
// If building with a C++ compiler, make all of the definitions in this header
// have a C binding.
//
//*****************************************************************************
#ifdef __cplusplus
extern "C"
{
#endif
#include <stdbool.h>
#include <stdint.h>
#include "../inc/hw_types.h"
#include "../inc/hw_memmap.h"
#include "../inc/hw_device.h"
#include "../inc/hw_aon_event.h"
#include "debug.h"
//*****************************************************************************
//
// Support for DriverLib in ROM:
// This section renames all functions that are not "static inline", so that
// calling these functions will default to implementation in flash. At the end
// of this file a second renaming will change the defaults to implementation in
// ROM for available functions.
//
// To force use of the implementation in flash, e.g. for debugging:
// - Globally: Define DRIVERLIB_NOROM at project level
// - Per function: Use prefix "NOROM_" when calling the function
//
//*****************************************************************************
#if !defined(DOXYGEN)
#define AONEventMcuWakeUpSet NOROM_AONEventMcuWakeUpSet
#define AONEventMcuWakeUpGet NOROM_AONEventMcuWakeUpGet
#define AONEventAuxWakeUpSet NOROM_AONEventAuxWakeUpSet
#define AONEventAuxWakeUpGet NOROM_AONEventAuxWakeUpGet
#define AONEventMcuSet NOROM_AONEventMcuSet
#define AONEventMcuGet NOROM_AONEventMcuGet
#endif
//*****************************************************************************
//
// Event sources for the event AON fabric.
// Note: Events are level-triggered active high
//
//*****************************************************************************
// AON_EVENT_DIO0 // Edge detect on DIO0. See hw_device.h
// ... // ...
// AON_EVENT_DIO31 // Edge detect on DIO31. See hw_device.h
#define AON_EVENT_IO 32 // Edge detect on any DIO. Edge detect is enabled and configured in IOC.
// Event ID 33 is reserved for future use
// Event ID 34 is reserved for future use
#define AON_EVENT_RTC_CH0 35 // RTC channel 0
#define AON_EVENT_RTC_CH1 36 // RTC channel 1
#define AON_EVENT_RTC_CH2 37 // RTC channel 2
#define AON_EVENT_RTC_CH0_DLY 38 // RTC channel 0 - delayed event
#define AON_EVENT_RTC_CH1_DLY 39 // RTC channel 1 - delayed event
#define AON_EVENT_RTC_CH2_DLY 40 // RTC channel 2 - delayed event
#define AON_EVENT_RTC_COMB_DLY 41 // RTC combined delayed event
#define AON_EVENT_RTC_UPD 42 // RTC Update Tick (16 kHz signal, i.e. event line toggles value every 32 kHz clock period)
#define AON_EVENT_JTAG 43 // JTAG generated event
#define AON_EVENT_AUX_SWEV0 44 // AUX Software triggered event #0
#define AON_EVENT_AUX_SWEV1 45 // AUX Software triggered event #1
#define AON_EVENT_AUX_SWEV2 46 // AUX Software triggered event #2
#define AON_EVENT_AUX_COMPA 47 // Comparator A triggered (synchronized in AUX)
#define AON_EVENT_AUX_COMPB 48 // Comparator B triggered (synchronized in AUX)
#define AON_EVENT_AUX_ADC_DONE 49 // ADC conversion completed
#define AON_EVENT_AUX_TDC_DONE 50 // TDC completed or timed out
#define AON_EVENT_AUX_TIMER0_EV 51 // Timer 0 event
#define AON_EVENT_AUX_TIMER1_EV 52 // Timer 1 event
#define AON_EVENT_BATMON_TEMP 53 // BATMON temperature update event
#define AON_EVENT_BATMON_VOLT 54 // BATMON voltage update event
#define AON_EVENT_AUX_COMPB_ASYNC 55 // Comparator B triggered. Asynchronous signal directly from the AUX Comparator B
#define AON_EVENT_AUX_COMPB_ASYNC_N 56 // Comparator B not triggered. Asynchronous signal directly from the AUX Comparator B
// Event ID 57-62 is reserved for future use
#define AON_EVENT_NONE 63 // No event, always low
// Keeping backward compatibility until major revision number is incremented
#define AON_EVENT_RTC0 ( AON_EVENT_RTC_CH0 )
//*****************************************************************************
//
// Values that can be passed to AONEventMCUWakeUpSet() and returned
// by AONEventMCUWakeUpGet().
//
//*****************************************************************************
#define AON_EVENT_MCU_WU0 0 // Programmable MCU wake-up event 0
#define AON_EVENT_MCU_WU1 1 // Programmable MCU wake-up event 1
#define AON_EVENT_MCU_WU2 2 // Programmable MCU wake-up event 2
#define AON_EVENT_MCU_WU3 3 // Programmable MCU wake-up event 3
//*****************************************************************************
//
// Values that can be passed to AONEventAuxWakeUpSet() and AONEventAuxWakeUpGet()
//
//*****************************************************************************
#define AON_EVENT_AUX_WU0 0 // Programmable AUX wake-up event 0
#define AON_EVENT_AUX_WU1 1 // Programmable AUX wake-up event 1
#define AON_EVENT_AUX_WU2 2 // Programmable AUX wake-up event 2
//*****************************************************************************
//
// Values that can be passed to AONEventMcuSet() and AONEventMcuGet()
//
//*****************************************************************************
#define AON_EVENT_MCU_EVENT0 0 // Programmable event source fed to MCU event fabric (first of 3)
#define AON_EVENT_MCU_EVENT1 1 // Programmable event source fed to MCU event fabric (second of 3)
#define AON_EVENT_MCU_EVENT2 2 // Programmable event source fed to MCU event fabric (third of 3)
//*****************************************************************************
//
// API Functions and prototypes
//
//*****************************************************************************
//*****************************************************************************
//
//! \brief Select event source for the specified MCU wake-up programmable event.
//!
//! The AON event fabric has several programmable events that can wake up the MCU.
//!
//! \note The programmable event sources are effectively OR'ed together
//! to form a single wake-up event.
//!
//! \param ui32MCUWUEvent is one of the programmable MCU wake-up event sources.
//! - \ref AON_EVENT_MCU_WU0
//! - \ref AON_EVENT_MCU_WU1
//! - \ref AON_EVENT_MCU_WU2
//! - \ref AON_EVENT_MCU_WU3
//! \param ui32EventSrc is an event source for the event AON fabric.
//! - AON_EVENT_DIO0 : Edge detect on DIO0. See hw_device.h
//! - ...
//! - AON_EVENT_DIO31 : Edge detect on DIO31. See hw_device.h
//! - \ref AON_EVENT_IO : Edge detect on any DIO. Edge detect is enabled and configured in IOC.
//! - \ref AON_EVENT_RTC_CH0 : RTC channel 0
//! - \ref AON_EVENT_RTC_CH1 : RTC channel 1
//! - \ref AON_EVENT_RTC_CH2 : RTC channel 2
//! - \ref AON_EVENT_RTC_CH0_DLY : RTC channel 0 - delayed event
//! - \ref AON_EVENT_RTC_CH1_DLY : RTC channel 1 - delayed event
//! - \ref AON_EVENT_RTC_CH2_DLY : RTC channel 2 - delayed event
//! - \ref AON_EVENT_RTC_COMB_DLY : RTC combined delayed event
//! - \ref AON_EVENT_RTC_UPD : RTC Update Tick (16 kHz signal, i.e. event line toggles value every 32 kHz clock period)
//! - \ref AON_EVENT_JTAG : JTAG generated event
//! - \ref AON_EVENT_AUX_SWEV0 : AUX Software triggered event #0
//! - \ref AON_EVENT_AUX_SWEV1 : AUX Software triggered event #1
//! - \ref AON_EVENT_AUX_SWEV2 : AUX Software triggered event #2
//! - \ref AON_EVENT_AUX_COMPA : Comparator A triggered (synchronized in AUX)
//! - \ref AON_EVENT_AUX_COMPB : Comparator B triggered (synchronized in AUX)
//! - \ref AON_EVENT_AUX_ADC_DONE : ADC conversion completed
//! - \ref AON_EVENT_AUX_TDC_DONE : TDC completed or timed out
//! - \ref AON_EVENT_AUX_TIMER0_EV : Timer 0 event
//! - \ref AON_EVENT_AUX_TIMER1_EV : Timer 1 event
//! - \ref AON_EVENT_BATMON_TEMP : BATMON temperature update event
//! - \ref AON_EVENT_BATMON_VOLT : BATMON voltage update event
//! - \ref AON_EVENT_AUX_COMPB_ASYNC : Comparator B triggered. Asynchronous signal directly from the AUX Comparator B
//! - \ref AON_EVENT_AUX_COMPB_ASYNC_N : Comparator B not triggered. Asynchronous signal directly from the AUX Comparator B
//! - \ref AON_EVENT_NONE : No event, always low
//!
//! \return None
//!
//! \sa AONEventMcuWakeUpGet()
//
//*****************************************************************************
extern void AONEventMcuWakeUpSet(uint32_t ui32MCUWUEvent,
uint32_t ui32EventSrc);
//*****************************************************************************
//
//! \brief Get event source for the specified MCU wake-up programmable event.
//!
//! \param ui32MCUWUEvent is one of the programmable MCU wake-up event sources.
//! - \ref AON_EVENT_MCU_WU0
//! - \ref AON_EVENT_MCU_WU1
//! - \ref AON_EVENT_MCU_WU2
//! - \ref AON_EVENT_MCU_WU3
//!
//! \return Returns the event source for the event AON fabric.
//! - AON_EVENT_DIO0 : Edge detect on DIO0. See hw_device.h
//! - ...
//! - AON_EVENT_DIO31 : Edge detect on DIO31. See hw_device.h
//! - \ref AON_EVENT_IO : Edge detect on any DIO. Edge detect is enabled and configured in IOC.
//! - \ref AON_EVENT_RTC_CH0 : RTC channel 0
//! - \ref AON_EVENT_RTC_CH1 : RTC channel 1
//! - \ref AON_EVENT_RTC_CH2 : RTC channel 2
//! - \ref AON_EVENT_RTC_CH0_DLY : RTC channel 0 - delayed event
//! - \ref AON_EVENT_RTC_CH1_DLY : RTC channel 1 - delayed event
//! - \ref AON_EVENT_RTC_CH2_DLY : RTC channel 2 - delayed event
//! - \ref AON_EVENT_RTC_COMB_DLY : RTC combined delayed event
//! - \ref AON_EVENT_RTC_UPD : RTC Update Tick (16 kHz signal, i.e. event line toggles value every 32 kHz clock period)
//! - \ref AON_EVENT_JTAG : JTAG generated event
//! - \ref AON_EVENT_AUX_SWEV0 : AUX Software triggered event #0
//! - \ref AON_EVENT_AUX_SWEV1 : AUX Software triggered event #1
//! - \ref AON_EVENT_AUX_SWEV2 : AUX Software triggered event #2
//! - \ref AON_EVENT_AUX_COMPA : Comparator A triggered (synchronized in AUX)
//! - \ref AON_EVENT_AUX_COMPB : Comparator B triggered (synchronized in AUX)
//! - \ref AON_EVENT_AUX_ADC_DONE : ADC conversion completed
//! - \ref AON_EVENT_AUX_TDC_DONE : TDC completed or timed out
//! - \ref AON_EVENT_AUX_TIMER0_EV : Timer 0 event
//! - \ref AON_EVENT_AUX_TIMER1_EV : Timer 1 event
//! - \ref AON_EVENT_BATMON_TEMP : BATMON temperature update event
//! - \ref AON_EVENT_BATMON_VOLT : BATMON voltage update event
//! - \ref AON_EVENT_AUX_COMPB_ASYNC : Comparator B triggered. Asynchronous signal directly from the AUX Comparator B
//! - \ref AON_EVENT_AUX_COMPB_ASYNC_N : Comparator B not triggered. Asynchronous signal directly from the AUX Comparator B
//! - \ref AON_EVENT_NONE : No event, always low
//!
//! \sa AONEventMcuWakeUpSet()
//
//*****************************************************************************
extern uint32_t AONEventMcuWakeUpGet(uint32_t ui32MCUWUEvent);
//*****************************************************************************
//
//! \brief Select event source for the specified AUX wake-up programmable event.
//!
//! The AON event fabric has a total of three programmable events that can
//! wake-up the AUX domain.
//!
//! \note The three programmable event sources are effectively OR'ed together
//! to form a single wake-up event.
//!
//! \param ui32AUXWUEvent is one of three programmable AUX wake-up event sources.
//! - \ref AON_EVENT_AUX_WU0
//! - \ref AON_EVENT_AUX_WU1
//! - \ref AON_EVENT_AUX_WU2
//! \param ui32EventSrc is an event sources for the event AON fabric.
//! - AON_EVENT_DIO0 : Edge detect on DIO0. See hw_device.h
//! - ...
//! - AON_EVENT_DIO31 : Edge detect on DIO31. See hw_device.h
//! - \ref AON_EVENT_IO : Edge detect on any DIO. Edge detect is enabled and configured in IOC.
//! - \ref AON_EVENT_RTC_CH0 : RTC channel 0
//! - \ref AON_EVENT_RTC_CH1 : RTC channel 1
//! - \ref AON_EVENT_RTC_CH2 : RTC channel 2
//! - \ref AON_EVENT_RTC_CH0_DLY : RTC channel 0 - delayed event
//! - \ref AON_EVENT_RTC_CH1_DLY : RTC channel 1 - delayed event
//! - \ref AON_EVENT_RTC_CH2_DLY : RTC channel 2 - delayed event
//! - \ref AON_EVENT_RTC_COMB_DLY : RTC combined delayed event
//! - \ref AON_EVENT_RTC_UPD : RTC Update Tick (16 kHz signal, i.e. event line toggles value every 32 kHz clock period)
//! - \ref AON_EVENT_JTAG : JTAG generated event
//! - \ref AON_EVENT_AUX_SWEV0 : AUX Software triggered event #0
//! - \ref AON_EVENT_AUX_SWEV1 : AUX Software triggered event #1
//! - \ref AON_EVENT_AUX_SWEV2 : AUX Software triggered event #2
//! - \ref AON_EVENT_AUX_COMPA : Comparator A triggered (synchronized in AUX)
//! - \ref AON_EVENT_AUX_COMPB : Comparator B triggered (synchronized in AUX)
//! - \ref AON_EVENT_AUX_ADC_DONE : ADC conversion completed
//! - \ref AON_EVENT_AUX_TDC_DONE : TDC completed or timed out
//! - \ref AON_EVENT_AUX_TIMER0_EV : Timer 0 event
//! - \ref AON_EVENT_AUX_TIMER1_EV : Timer 1 event
//! - \ref AON_EVENT_BATMON_TEMP : BATMON temperature update event
//! - \ref AON_EVENT_BATMON_VOLT : BATMON voltage update event
//! - \ref AON_EVENT_AUX_COMPB_ASYNC : Comparator B triggered. Asynchronous signal directly from the AUX Comparator B
//! - \ref AON_EVENT_AUX_COMPB_ASYNC_N : Comparator B not triggered. Asynchronous signal directly from the AUX Comparator B
//! - \ref AON_EVENT_NONE : No event, always low
//!
//! \return None
//!
//! \sa AONEventAuxWakeUpGet()
//
//*****************************************************************************
extern void AONEventAuxWakeUpSet(uint32_t ui32AUXWUEvent,
uint32_t ui32EventSrc);
//*****************************************************************************
//
//! \brief Get event source for the specified AUX wake-up programmable event.
//!
//! The AON event fabric has a total of three programmable events that can
//! wake-up the AUX domain.
//!
//! \param ui32AUXWUEvent is one of three programmable AUX wake-up event sources.
//! - \ref AON_EVENT_AUX_WU0
//! - \ref AON_EVENT_AUX_WU1
//! - \ref AON_EVENT_AUX_WU2
//!
//! \return Returns the event source for the event AON fabric.
//! - AON_EVENT_DIO0 : Edge detect on DIO0. See hw_device.h
//! - ...
//! - AON_EVENT_DIO31 : Edge detect on DIO31. See hw_device.h
//! - \ref AON_EVENT_IO : Edge detect on any DIO. Edge detect is enabled and configured in IOC.
//! - \ref AON_EVENT_RTC_CH0 : RTC channel 0
//! - \ref AON_EVENT_RTC_CH1 : RTC channel 1
//! - \ref AON_EVENT_RTC_CH2 : RTC channel 2
//! - \ref AON_EVENT_RTC_CH0_DLY : RTC channel 0 - delayed event
//! - \ref AON_EVENT_RTC_CH1_DLY : RTC channel 1 - delayed event
//! - \ref AON_EVENT_RTC_CH2_DLY : RTC channel 2 - delayed event
//! - \ref AON_EVENT_RTC_COMB_DLY : RTC combined delayed event
//! - \ref AON_EVENT_RTC_UPD : RTC Update Tick (16 kHz signal, i.e. event line toggles value every 32 kHz clock period)
//! - \ref AON_EVENT_JTAG : JTAG generated event
//! - \ref AON_EVENT_AUX_SWEV0 : AUX Software triggered event #0
//! - \ref AON_EVENT_AUX_SWEV1 : AUX Software triggered event #1
//! - \ref AON_EVENT_AUX_SWEV2 : AUX Software triggered event #2
//! - \ref AON_EVENT_AUX_COMPA : Comparator A triggered (synchronized in AUX)
//! - \ref AON_EVENT_AUX_COMPB : Comparator B triggered (synchronized in AUX)
//! - \ref AON_EVENT_AUX_ADC_DONE : ADC conversion completed
//! - \ref AON_EVENT_AUX_TDC_DONE : TDC completed or timed out
//! - \ref AON_EVENT_AUX_TIMER0_EV : Timer 0 event
//! - \ref AON_EVENT_AUX_TIMER1_EV : Timer 1 event
//! - \ref AON_EVENT_BATMON_TEMP : BATMON temperature update event
//! - \ref AON_EVENT_BATMON_VOLT : BATMON voltage update event
//! - \ref AON_EVENT_AUX_COMPB_ASYNC : Comparator B triggered. Asynchronous signal directly from the AUX Comparator B
//! - \ref AON_EVENT_AUX_COMPB_ASYNC_N : Comparator B not triggered. Asynchronous signal directly from the AUX Comparator B
//! - \ref AON_EVENT_NONE : No event, always low
//!
//! \sa AONEventAuxWakeUpSet()
//
//*****************************************************************************
extern uint32_t AONEventAuxWakeUpGet(uint32_t ui32AUXWUEvent);
//*****************************************************************************
//
//! \brief Select event source for the specified programmable event forwarded to the
//! MCU event fabric.
//!
//! The AON event fabric has a total of three programmable events that can
//! be forwarded to the MCU event fabric.
//!
//! \note The three programmable event sources are forwarded to the MCU Event
//! Fabric as:
//! - AON_PROG0
//! - AON_PROG1
//! - AON_PROG2
//!
//! \param ui32MCUEvent is one of three programmable events forwarded to the
//! MCU event fabric.
//! - \ref AON_EVENT_MCU_EVENT0
//! - \ref AON_EVENT_MCU_EVENT1
//! - \ref AON_EVENT_MCU_EVENT2
//! \param ui32EventSrc is an event source for the event AON fabric.
//! - AON_EVENT_DIO0 : Edge detect on DIO0. See hw_device.h
//! - ...
//! - AON_EVENT_DIO31 : Edge detect on DIO31. See hw_device.h
//! - \ref AON_EVENT_IO : Edge detect on any DIO. Edge detect is enabled and configured in IOC.
//! - \ref AON_EVENT_RTC_CH0 : RTC channel 0
//! - \ref AON_EVENT_RTC_CH1 : RTC channel 1
//! - \ref AON_EVENT_RTC_CH2 : RTC channel 2
//! - \ref AON_EVENT_RTC_CH0_DLY : RTC channel 0 - delayed event
//! - \ref AON_EVENT_RTC_CH1_DLY : RTC channel 1 - delayed event
//! - \ref AON_EVENT_RTC_CH2_DLY : RTC channel 2 - delayed event
//! - \ref AON_EVENT_RTC_COMB_DLY : RTC combined delayed event
//! - \ref AON_EVENT_RTC_UPD : RTC Update Tick (16 kHz signal, i.e. event line toggles value every 32 kHz clock period)
//! - \ref AON_EVENT_JTAG : JTAG generated event
//! - \ref AON_EVENT_AUX_SWEV0 : AUX Software triggered event #0
//! - \ref AON_EVENT_AUX_SWEV1 : AUX Software triggered event #1
//! - \ref AON_EVENT_AUX_SWEV2 : AUX Software triggered event #2
//! - \ref AON_EVENT_AUX_COMPA : Comparator A triggered (synchronized in AUX)
//! - \ref AON_EVENT_AUX_COMPB : Comparator B triggered (synchronized in AUX)
//! - \ref AON_EVENT_AUX_ADC_DONE : ADC conversion completed
//! - \ref AON_EVENT_AUX_TDC_DONE : TDC completed or timed out
//! - \ref AON_EVENT_AUX_TIMER0_EV : Timer 0 event
//! - \ref AON_EVENT_AUX_TIMER1_EV : Timer 1 event
//! - \ref AON_EVENT_BATMON_TEMP : BATMON temperature update event
//! - \ref AON_EVENT_BATMON_VOLT : BATMON voltage update event
//! - \ref AON_EVENT_AUX_COMPB_ASYNC : Comparator B triggered. Asynchronous signal directly from the AUX Comparator B
//! - \ref AON_EVENT_AUX_COMPB_ASYNC_N : Comparator B not triggered. Asynchronous signal directly from the AUX Comparator B
//! - \ref AON_EVENT_NONE : No event, always low
//!
//! \return None
//!
//! \sa AONEventMcuGet()
//
//*****************************************************************************
extern void AONEventMcuSet(uint32_t ui32MCUEvent, uint32_t ui32EventSrc);
//*****************************************************************************
//
//! \brief Get source for the specified programmable event forwarded to the MCU event
//! fabric.
//!
//! The AON event fabric has a total of three programmable events that can
//! be forwarded to the MCU event fabric.
//!
//! \param ui32MCUEvent is one of three programmable events forwarded to the
//! MCU event fabric.
//! - \ref AON_EVENT_MCU_EVENT0
//! - \ref AON_EVENT_MCU_EVENT1
//! - \ref AON_EVENT_MCU_EVENT2
//!
//! \return Returns the event source for the event AON fabric.
//! - AON_EVENT_DIO0 : Edge detect on DIO0. See hw_device.h
//! - ...
//! - AON_EVENT_DIO31 : Edge detect on DIO31. See hw_device.h
//! - \ref AON_EVENT_IO : Edge detect on any DIO. Edge detect is enabled and configured in IOC.
//! - \ref AON_EVENT_RTC_CH0 : RTC channel 0
//! - \ref AON_EVENT_RTC_CH1 : RTC channel 1
//! - \ref AON_EVENT_RTC_CH2 : RTC channel 2
//! - \ref AON_EVENT_RTC_CH0_DLY : RTC channel 0 - delayed event
//! - \ref AON_EVENT_RTC_CH1_DLY : RTC channel 1 - delayed event
//! - \ref AON_EVENT_RTC_CH2_DLY : RTC channel 2 - delayed event
//! - \ref AON_EVENT_RTC_COMB_DLY : RTC combined delayed event
//! - \ref AON_EVENT_RTC_UPD : RTC Update Tick (16 kHz signal, i.e. event line toggles value every 32 kHz clock period)
//! - \ref AON_EVENT_JTAG : JTAG generated event
//! - \ref AON_EVENT_AUX_SWEV0 : AUX Software triggered event #0
//! - \ref AON_EVENT_AUX_SWEV1 : AUX Software triggered event #1
//! - \ref AON_EVENT_AUX_SWEV2 : AUX Software triggered event #2
//! - \ref AON_EVENT_AUX_COMPA : Comparator A triggered (synchronized in AUX)
//! - \ref AON_EVENT_AUX_COMPB : Comparator B triggered (synchronized in AUX)
//! - \ref AON_EVENT_AUX_ADC_DONE : ADC conversion completed
//! - \ref AON_EVENT_AUX_TDC_DONE : TDC completed or timed out
//! - \ref AON_EVENT_AUX_TIMER0_EV : Timer 0 event
//! - \ref AON_EVENT_AUX_TIMER1_EV : Timer 1 event
//! - \ref AON_EVENT_BATMON_TEMP : BATMON temperature update event
//! - \ref AON_EVENT_BATMON_VOLT : BATMON voltage update event
//! - \ref AON_EVENT_AUX_COMPB_ASYNC : Comparator B triggered. Asynchronous signal directly from the AUX Comparator B
//! - \ref AON_EVENT_AUX_COMPB_ASYNC_N : Comparator B not triggered. Asynchronous signal directly from the AUX Comparator B
//! - \ref AON_EVENT_NONE : No event, always low
//!
//! \sa AONEventMcuSet()
//
//*****************************************************************************
extern uint32_t AONEventMcuGet(uint32_t ui32MCUEvent);
//*****************************************************************************
//
//! \brief Select event source forwarded to AON Real Time Clock (RTC).
//!
//! A programmable event can be forwarded to the AON real time clock
//! for triggering a capture event on RTC channel 1.
//!
//! \param ui32EventSrc is an event source for the event AON fabric.
//! - AON_EVENT_DIO0 : Edge detect on DIO0. See hw_device.h
//! - ...
//! - AON_EVENT_DIO31 : Edge detect on DIO31. See hw_device.h
//! - \ref AON_EVENT_IO : Edge detect on any DIO. Edge detect is enabled and configured in IOC.
//! - \ref AON_EVENT_RTC_CH0 : RTC channel 0
//! - \ref AON_EVENT_RTC_CH1 : RTC channel 1
//! - \ref AON_EVENT_RTC_CH2 : RTC channel 2
//! - \ref AON_EVENT_RTC_CH0_DLY : RTC channel 0 - delayed event
//! - \ref AON_EVENT_RTC_CH1_DLY : RTC channel 1 - delayed event
//! - \ref AON_EVENT_RTC_CH2_DLY : RTC channel 2 - delayed event
//! - \ref AON_EVENT_RTC_COMB_DLY : RTC combined delayed event
//! - \ref AON_EVENT_RTC_UPD : RTC Update Tick (16 kHz signal, i.e. event line toggles value every 32 kHz clock period)
//! - \ref AON_EVENT_JTAG : JTAG generated event
//! - \ref AON_EVENT_AUX_SWEV0 : AUX Software triggered event #0
//! - \ref AON_EVENT_AUX_SWEV1 : AUX Software triggered event #1
//! - \ref AON_EVENT_AUX_SWEV2 : AUX Software triggered event #2
//! - \ref AON_EVENT_AUX_COMPA : Comparator A triggered (synchronized in AUX)
//! - \ref AON_EVENT_AUX_COMPB : Comparator B triggered (synchronized in AUX)
//! - \ref AON_EVENT_AUX_ADC_DONE : ADC conversion completed
//! - \ref AON_EVENT_AUX_TDC_DONE : TDC completed or timed out
//! - \ref AON_EVENT_AUX_TIMER0_EV : Timer 0 event
//! - \ref AON_EVENT_AUX_TIMER1_EV : Timer 1 event
//! - \ref AON_EVENT_BATMON_TEMP : BATMON temperature update event
//! - \ref AON_EVENT_BATMON_VOLT : BATMON voltage update event
//! - \ref AON_EVENT_AUX_COMPB_ASYNC : Comparator B triggered. Asynchronous signal directly from the AUX Comparator B
//! - \ref AON_EVENT_AUX_COMPB_ASYNC_N : Comparator B not triggered. Asynchronous signal directly from the AUX Comparator B
//! - \ref AON_EVENT_NONE : No event, always low
//!
//! \return None
//!
//! \sa AONEventRtcGet()
//
//*****************************************************************************
__STATIC_INLINE void
AONEventRtcSet(uint32_t ui32EventSrc)
{
uint32_t ui32Ctrl;
// Check the arguments.
ASSERT(ui32EventSrc <= AON_EVENT_NONE);
ui32Ctrl = HWREG(AON_EVENT_BASE + AON_EVENT_O_RTCSEL);
ui32Ctrl &= ~(AON_EVENT_RTCSEL_RTC_CH1_CAPT_EV_M);
ui32Ctrl |= (ui32EventSrc & 0x3f) << AON_EVENT_RTCSEL_RTC_CH1_CAPT_EV_S;
HWREG(AON_EVENT_BASE + AON_EVENT_O_RTCSEL) = ui32Ctrl;
}
//*****************************************************************************
//
//! \brief Get event source forwarded to AON Real Time Clock (RTC).
//!
//! A programmable event can be forwarded to the AON real time clock
//! for triggering a capture event on RTC channel 1.
//!
//! \return Returns the event source to the event AON fabric.
//! - AON_EVENT_DIO0 : Edge detect on DIO0. See hw_device.h
//! - ...
//! - AON_EVENT_DIO31 : Edge detect on DIO31. See hw_device.h
//! - \ref AON_EVENT_IO : Edge detect on any DIO. Edge detect is enabled and configured in IOC.
//! - \ref AON_EVENT_RTC_CH0 : RTC channel 0
//! - \ref AON_EVENT_RTC_CH1 : RTC channel 1
//! - \ref AON_EVENT_RTC_CH2 : RTC channel 2
//! - \ref AON_EVENT_RTC_CH0_DLY : RTC channel 0 - delayed event
//! - \ref AON_EVENT_RTC_CH1_DLY : RTC channel 1 - delayed event
//! - \ref AON_EVENT_RTC_CH2_DLY : RTC channel 2 - delayed event
//! - \ref AON_EVENT_RTC_COMB_DLY : RTC combined delayed event
//! - \ref AON_EVENT_RTC_UPD : RTC Update Tick (16 kHz signal, i.e. event line toggles value every 32 kHz clock period)
//! - \ref AON_EVENT_JTAG : JTAG generated event
//! - \ref AON_EVENT_AUX_SWEV0 : AUX Software triggered event #0
//! - \ref AON_EVENT_AUX_SWEV1 : AUX Software triggered event #1
//! - \ref AON_EVENT_AUX_SWEV2 : AUX Software triggered event #2
//! - \ref AON_EVENT_AUX_COMPA : Comparator A triggered (synchronized in AUX)
//! - \ref AON_EVENT_AUX_COMPB : Comparator B triggered (synchronized in AUX)
//! - \ref AON_EVENT_AUX_ADC_DONE : ADC conversion completed
//! - \ref AON_EVENT_AUX_TDC_DONE : TDC completed or timed out
//! - \ref AON_EVENT_AUX_TIMER0_EV : Timer 0 event
//! - \ref AON_EVENT_AUX_TIMER1_EV : Timer 1 event
//! - \ref AON_EVENT_BATMON_TEMP : BATMON temperature update event
//! - \ref AON_EVENT_BATMON_VOLT : BATMON voltage update event
//! - \ref AON_EVENT_AUX_COMPB_ASYNC : Comparator B triggered. Asynchronous signal directly from the AUX Comparator B
//! - \ref AON_EVENT_AUX_COMPB_ASYNC_N : Comparator B not triggered. Asynchronous signal directly from the AUX Comparator B
//! - \ref AON_EVENT_NONE : No event, always low
//!
//! \sa AONEventRtcSet()
//
//*****************************************************************************
__STATIC_INLINE uint32_t
AONEventRtcGet(void)
{
uint32_t ui32EventSrc;
// Return the active event.
ui32EventSrc = HWREG(AON_EVENT_BASE + AON_EVENT_O_RTCSEL);
return ((ui32EventSrc & AON_EVENT_RTCSEL_RTC_CH1_CAPT_EV_M) >>
AON_EVENT_RTCSEL_RTC_CH1_CAPT_EV_S);
}
//*****************************************************************************
//
// Support for DriverLib in ROM:
// Redirect to implementation in ROM when available.
//
//*****************************************************************************
#if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN)
#include "../driverlib/rom.h"
#ifdef ROM_AONEventMcuWakeUpSet
#undef AONEventMcuWakeUpSet
#define AONEventMcuWakeUpSet ROM_AONEventMcuWakeUpSet
#endif
#ifdef ROM_AONEventMcuWakeUpGet
#undef AONEventMcuWakeUpGet
#define AONEventMcuWakeUpGet ROM_AONEventMcuWakeUpGet
#endif
#ifdef ROM_AONEventAuxWakeUpSet
#undef AONEventAuxWakeUpSet
#define AONEventAuxWakeUpSet ROM_AONEventAuxWakeUpSet
#endif
#ifdef ROM_AONEventAuxWakeUpGet
#undef AONEventAuxWakeUpGet
#define AONEventAuxWakeUpGet ROM_AONEventAuxWakeUpGet
#endif
#ifdef ROM_AONEventMcuSet
#undef AONEventMcuSet
#define AONEventMcuSet ROM_AONEventMcuSet
#endif
#ifdef ROM_AONEventMcuGet
#undef AONEventMcuGet
#define AONEventMcuGet ROM_AONEventMcuGet
#endif
#endif
//*****************************************************************************
//
// Mark the end of the C bindings section for C++ compilers.
//
//*****************************************************************************
#ifdef __cplusplus
}
#endif
#endif // __AON_EVENT_H__
//*****************************************************************************
//
//! Close the Doxygen group.
//! @}
//! @}
//
//*****************************************************************************