CC26xx Driver Library
[aon_event.h] AON Event

Functions

void AONEventMcuWakeUpSet (uint32_t ui32MCUWUEvent, uint32_t ui32EventSrc)
 Select event source for the specified MCU wake-up programmable event. More...
 
uint32_t AONEventMcuWakeUpGet (uint32_t ui32MCUWUEvent)
 Get event source for the specified MCU wake-up programmable event. More...
 
void AONEventMcuSet (uint32_t ui32MCUEvent, uint32_t ui32EventSrc)
 Select event source for the specified programmable event forwarded to the MCU event fabric. More...
 
uint32_t AONEventMcuGet (uint32_t ui32MCUEvent)
 Get source for the specified programmable event forwarded to the MCU event fabric. More...
 
static void AONEventRtcSet (uint32_t ui32EventSrc)
 Select event source forwarded to AON Real Time Clock (RTC). More...
 
static uint32_t AONEventRtcGet (void)
 Get event source forwarded to AON Real Time Clock (RTC). More...
 

Detailed Description

Introduction

The event fabric consists of two event modules. One in the MCU power domain (MCU event fabric) and the other in the AON power domain (AON event fabric). The MCU event fabric is one of the subscribers to the AON event fabric. For more information on MCU event fabric, see MCU event API.

The AON event fabric is a configurable combinatorial router between AON event sources and event subscribers in both AON and MCU domains. The API to control the AON event fabric configuration can be grouped based on the event subscriber to configure:

Function Documentation

uint32_t AONEventMcuGet ( uint32_t  ui32MCUEvent)

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.

Parameters
ui32MCUEventis one of three programmable events forwarded to the MCU event fabric.
Returns
Returns the event source for the event AON fabric.
See also
AONEventMcuSet()
151 {
152  uint32_t ui32EventSrc;
153 
154  // Check the arguments.
155  ASSERT((ui32MCUEvent == AON_EVENT_MCU_EVENT0) ||
156  (ui32MCUEvent == AON_EVENT_MCU_EVENT1) ||
157  (ui32MCUEvent == AON_EVENT_MCU_EVENT2));
158 
159  ui32EventSrc = HWREG(AON_EVENT_BASE + AON_EVENT_O_EVTOMCUSEL);
160 
161  if(ui32MCUEvent == AON_EVENT_MCU_EVENT0)
162  {
163  return((ui32EventSrc & AON_EVENT_EVTOMCUSEL_AON_PROG0_EV_M) >>
165  }
166  else if(ui32MCUEvent == AON_EVENT_MCU_EVENT1)
167  {
168  return((ui32EventSrc & AON_EVENT_EVTOMCUSEL_AON_PROG1_EV_M) >>
170  }
171  else if(ui32MCUEvent == AON_EVENT_MCU_EVENT2)
172  {
173  return((ui32EventSrc & AON_EVENT_EVTOMCUSEL_AON_PROG2_EV_M) >>
175  }
176 
177  // Should never get to this statement, but suppress warning.
178  ASSERT(0);
179  return(0);
180 }
#define AON_EVENT_MCU_EVENT2
Definition: aon_event.h:158
#define AON_EVENT_MCU_EVENT0
Definition: aon_event.h:156
#define ASSERT(expr)
Definition: debug.h:73
#define AON_EVENT_MCU_EVENT1
Definition: aon_event.h:157
void AONEventMcuSet ( uint32_t  ui32MCUEvent,
uint32_t  ui32EventSrc 
)

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
Parameters
ui32MCUEventis one of three programmable events forwarded to the MCU event fabric.
ui32EventSrcis an event source for the event AON fabric.
Returns
None
See also
AONEventMcuGet()
113 {
114  uint32_t ui32Ctrl;
115 
116  // Check the arguments.
117  ASSERT((ui32MCUEvent == AON_EVENT_MCU_EVENT0) ||
118  (ui32MCUEvent == AON_EVENT_MCU_EVENT1) ||
119  (ui32MCUEvent == AON_EVENT_MCU_EVENT2));
120  ASSERT(ui32EventSrc <= AON_EVENT_NONE);
121 
122  ui32Ctrl = HWREG(AON_EVENT_BASE + AON_EVENT_O_EVTOMCUSEL);
123 
124  if(ui32MCUEvent == AON_EVENT_MCU_EVENT0)
125  {
127  ui32Ctrl |= (ui32EventSrc & 0x3f) << AON_EVENT_EVTOMCUSEL_AON_PROG0_EV_S;
128  }
129  else if(ui32MCUEvent == AON_EVENT_MCU_EVENT1)
130  {
132  ui32Ctrl |= (ui32EventSrc & 0x3f) << AON_EVENT_EVTOMCUSEL_AON_PROG1_EV_S;
133  }
134  else if(ui32MCUEvent == AON_EVENT_MCU_EVENT2)
135  {
137  ui32Ctrl |= (ui32EventSrc & 0x3f) << AON_EVENT_EVTOMCUSEL_AON_PROG2_EV_S;
138  }
139 
140  HWREG(AON_EVENT_BASE + AON_EVENT_O_EVTOMCUSEL) = ui32Ctrl;
141 }
#define AON_EVENT_NONE
Definition: aon_event.h:131
#define AON_EVENT_MCU_EVENT2
Definition: aon_event.h:158
#define AON_EVENT_MCU_EVENT0
Definition: aon_event.h:156
#define ASSERT(expr)
Definition: debug.h:73
#define AON_EVENT_MCU_EVENT1
Definition: aon_event.h:157
uint32_t AONEventMcuWakeUpGet ( uint32_t  ui32MCUWUEvent)

Get event source for the specified MCU wake-up programmable event.

Parameters
ui32MCUWUEventis one of the programmable MCU wake-up event sources.
Returns
Returns the event source for the event AON fabric.
See also
AONEventMcuWakeUpSet()
90 {
91  uint32_t ui32Shift ;
92  uint32_t ui32RegAdr ;
93 
94  // Check the arguments.
95  ASSERT(( ui32MCUWUEvent >= AON_EVENT_MCU_WU0 ) && ( ui32MCUWUEvent <= AON_EVENT_MCU_WU7 ))
96 
97  ui32Shift = (( ui32MCUWUEvent & 3 ) << 3 );
98  ui32RegAdr = ( AON_EVENT_BASE + AON_EVENT_O_MCUWUSEL );
99  if ( ui32MCUWUEvent > 3 ) {
100  ui32RegAdr += 4;
101  }
102  return (( HWREG( ui32RegAdr ) >> ui32Shift ) & 0x3F );
103 }
#define AON_EVENT_MCU_WU7
Definition: aon_event.h:149
#define AON_EVENT_MCU_WU0
Definition: aon_event.h:142
#define ASSERT(expr)
Definition: debug.h:73
void AONEventMcuWakeUpSet ( uint32_t  ui32MCUWUEvent,
uint32_t  ui32EventSrc 
)

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.
Parameters
ui32MCUWUEventis one of the programmable MCU wake-up event sources.
ui32EventSrcis an event source for the event AON fabric.
Returns
None
See also
AONEventMcuWakeUpGet()
65 {
66  uint32_t ui32Shift ;
67  uint32_t ui32Mask ;
68  uint32_t ui32RegAdr ;
69 
70  // Check the arguments.
71  ASSERT(( ui32MCUWUEvent >= AON_EVENT_MCU_WU0 ) && ( ui32MCUWUEvent <= AON_EVENT_MCU_WU7 ))
72  ASSERT( ui32EventSrc <= AON_EVENT_NONE );
73 
74  ui32Shift = (( ui32MCUWUEvent & 3 ) << 3 );
75  ui32Mask = ( 0x3F << ui32Shift );
76  ui32RegAdr = ( AON_EVENT_BASE + AON_EVENT_O_MCUWUSEL );
77  if ( ui32MCUWUEvent > 3 ) {
78  ui32RegAdr += 4;
79  }
80  HWREG( ui32RegAdr ) = ( HWREG( ui32RegAdr ) & ( ~ui32Mask )) | ( ui32EventSrc << ui32Shift );
81 }
#define AON_EVENT_MCU_WU7
Definition: aon_event.h:149
#define AON_EVENT_MCU_WU0
Definition: aon_event.h:142
#define AON_EVENT_NONE
Definition: aon_event.h:131
#define ASSERT(expr)
Definition: debug.h:73
static uint32_t AONEventRtcGet ( void  )
inlinestatic

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.

Returns
Returns the event source to the event AON fabric.
See also
AONEventRtcSet()
511 {
512  uint32_t ui32EventSrc;
513 
514  // Return the active event.
515  ui32EventSrc = HWREG(AON_EVENT_BASE + AON_EVENT_O_RTCSEL);
516 
517  return ((ui32EventSrc & AON_EVENT_RTCSEL_RTC_CH1_CAPT_EV_M) >>
519 }
static void AONEventRtcSet ( uint32_t  ui32EventSrc)
inlinestatic

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.

Parameters
ui32EventSrcis an event source for the event AON fabric.
Returns
None
See also
AONEventRtcGet()
450 {
451  uint32_t ui32Ctrl;
452 
453  // Check the arguments.
454  ASSERT(ui32EventSrc <= AON_EVENT_NONE);
455 
456  ui32Ctrl = HWREG(AON_EVENT_BASE + AON_EVENT_O_RTCSEL);
457  ui32Ctrl &= ~(AON_EVENT_RTCSEL_RTC_CH1_CAPT_EV_M);
458  ui32Ctrl |= (ui32EventSrc & 0x3f) << AON_EVENT_RTCSEL_RTC_CH1_CAPT_EV_S;
459 
460  HWREG(AON_EVENT_BASE + AON_EVENT_O_RTCSEL) = ui32Ctrl;
461 }
#define AON_EVENT_NONE
Definition: aon_event.h:131
#define ASSERT(expr)
Definition: debug.h:73

Macro Definition Documentation

#define AON_EVENT_AUX_ADC_DONE   49
#define AON_EVENT_AUX_COMPA   47
#define AON_EVENT_AUX_COMPB   48
#define AON_EVENT_AUX_COMPB_ASYNC   55
#define AON_EVENT_AUX_COMPB_ASYNC_N   56
#define AON_EVENT_AUX_SWEV0   44
#define AON_EVENT_AUX_SWEV1   45
#define AON_EVENT_AUX_SWEV2   46
#define AON_EVENT_AUX_TDC_DONE   50
#define AON_EVENT_AUX_TIMER0_EV   51
#define AON_EVENT_AUX_TIMER1_EV   52
#define AON_EVENT_AUX_TIMER2_EV0   1
#define AON_EVENT_AUX_TIMER2_EV1   2
#define AON_EVENT_AUX_TIMER2_EV2   3
#define AON_EVENT_AUX_TIMER2_EV3   4
#define AON_EVENT_BATMON_BATT_LL   6
#define AON_EVENT_BATMON_BATT_UL   5
#define AON_EVENT_BATMON_COMBINED   9
#define AON_EVENT_BATMON_TEMP   53
#define AON_EVENT_BATMON_TEMP_LL   8
#define AON_EVENT_BATMON_TEMP_UL   7
#define AON_EVENT_BATMON_VOLT   54
#define AON_EVENT_IO   32
#define AON_EVENT_IOEV_MCU_WU   0
#define AON_EVENT_JTAG   43
#define AON_EVENT_MCU_EVENT0   0

Referenced by AONEventMcuGet(), and AONEventMcuSet().

#define AON_EVENT_MCU_EVENT1   1

Referenced by AONEventMcuGet(), and AONEventMcuSet().

#define AON_EVENT_MCU_EVENT2   2

Referenced by AONEventMcuGet(), and AONEventMcuSet().

#define AON_EVENT_MCU_WU0   0
#define AON_EVENT_MCU_WU1   1
#define AON_EVENT_MCU_WU2   2
#define AON_EVENT_MCU_WU3   3
#define AON_EVENT_MCU_WU4   4
#define AON_EVENT_MCU_WU5   5
#define AON_EVENT_MCU_WU6   6
#define AON_EVENT_MCU_WU7   7
#define AON_EVENT_NONE   63
#define AON_EVENT_RTC0   ( AON_EVENT_RTC_CH0 )
#define AON_EVENT_RTC_CH0   35
#define AON_EVENT_RTC_CH0_DLY   38
#define AON_EVENT_RTC_CH1   36
#define AON_EVENT_RTC_CH1_DLY   39
#define AON_EVENT_RTC_CH2   37
#define AON_EVENT_RTC_CH2_DLY   40
#define AON_EVENT_RTC_COMB_DLY   41
#define AON_EVENT_RTC_UPD   42