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

§ AONEventMcuGet()

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()
149 {
150  uint32_t ui32EventSrc;
151 
152  // Check the arguments.
153  ASSERT((ui32MCUEvent == AON_EVENT_MCU_EVENT0) ||
154  (ui32MCUEvent == AON_EVENT_MCU_EVENT1) ||
155  (ui32MCUEvent == AON_EVENT_MCU_EVENT2));
156 
157  ui32EventSrc = HWREG(AON_EVENT_BASE + AON_EVENT_O_EVTOMCUSEL);
158 
159  if(ui32MCUEvent == AON_EVENT_MCU_EVENT0)
160  {
161  return((ui32EventSrc & AON_EVENT_EVTOMCUSEL_AON_PROG0_EV_M) >>
162  AON_EVENT_EVTOMCUSEL_AON_PROG0_EV_S);
163  }
164  else if(ui32MCUEvent == AON_EVENT_MCU_EVENT1)
165  {
166  return((ui32EventSrc & AON_EVENT_EVTOMCUSEL_AON_PROG1_EV_M) >>
167  AON_EVENT_EVTOMCUSEL_AON_PROG1_EV_S);
168  }
169  else if(ui32MCUEvent == AON_EVENT_MCU_EVENT2)
170  {
171  return((ui32EventSrc & AON_EVENT_EVTOMCUSEL_AON_PROG2_EV_M) >>
172  AON_EVENT_EVTOMCUSEL_AON_PROG2_EV_S);
173  }
174 
175  // Should never get to this statement, but suppress warning.
176  ASSERT(0);
177  return(0);
178 }
#define AON_EVENT_MCU_EVENT2
Definition: aon_event.h:156
#define AON_EVENT_MCU_EVENT0
Definition: aon_event.h:154
#define ASSERT(expr)
Definition: debug.h:71
#define AON_EVENT_MCU_EVENT1
Definition: aon_event.h:155

§ AONEventMcuSet()

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()
111 {
112  uint32_t ui32Ctrl;
113 
114  // Check the arguments.
115  ASSERT((ui32MCUEvent == AON_EVENT_MCU_EVENT0) ||
116  (ui32MCUEvent == AON_EVENT_MCU_EVENT1) ||
117  (ui32MCUEvent == AON_EVENT_MCU_EVENT2));
118  ASSERT(ui32EventSrc <= AON_EVENT_NONE);
119 
120  ui32Ctrl = HWREG(AON_EVENT_BASE + AON_EVENT_O_EVTOMCUSEL);
121 
122  if(ui32MCUEvent == AON_EVENT_MCU_EVENT0)
123  {
124  ui32Ctrl &= ~(AON_EVENT_EVTOMCUSEL_AON_PROG0_EV_M);
125  ui32Ctrl |= (ui32EventSrc & 0x3f) << AON_EVENT_EVTOMCUSEL_AON_PROG0_EV_S;
126  }
127  else if(ui32MCUEvent == AON_EVENT_MCU_EVENT1)
128  {
129  ui32Ctrl &= ~(AON_EVENT_EVTOMCUSEL_AON_PROG1_EV_M);
130  ui32Ctrl |= (ui32EventSrc & 0x3f) << AON_EVENT_EVTOMCUSEL_AON_PROG1_EV_S;
131  }
132  else if(ui32MCUEvent == AON_EVENT_MCU_EVENT2)
133  {
134  ui32Ctrl &= ~(AON_EVENT_EVTOMCUSEL_AON_PROG2_EV_M);
135  ui32Ctrl |= (ui32EventSrc & 0x3f) << AON_EVENT_EVTOMCUSEL_AON_PROG2_EV_S;
136  }
137 
138  HWREG(AON_EVENT_BASE + AON_EVENT_O_EVTOMCUSEL) = ui32Ctrl;
139 }
#define AON_EVENT_NONE
Definition: aon_event.h:129
#define AON_EVENT_MCU_EVENT2
Definition: aon_event.h:156
#define AON_EVENT_MCU_EVENT0
Definition: aon_event.h:154
#define ASSERT(expr)
Definition: debug.h:71
#define AON_EVENT_MCU_EVENT1
Definition: aon_event.h:155

§ AONEventMcuWakeUpGet()

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()
88 {
89  uint32_t ui32Shift ;
90  uint32_t ui32RegAdr ;
91 
92  // Check the arguments.
93  ASSERT(( ui32MCUWUEvent >= AON_EVENT_MCU_WU0 ) && ( ui32MCUWUEvent <= AON_EVENT_MCU_WU7 ))
94 
95  ui32Shift = (( ui32MCUWUEvent & 3 ) << 3 );
96  ui32RegAdr = ( AON_EVENT_BASE + AON_EVENT_O_MCUWUSEL );
97  if ( ui32MCUWUEvent > 3 ) {
98  ui32RegAdr += 4;
99  }
100  return (( HWREG( ui32RegAdr ) >> ui32Shift ) & 0x3F );
101 }
#define AON_EVENT_MCU_WU7
Definition: aon_event.h:147
#define AON_EVENT_MCU_WU0
Definition: aon_event.h:140
#define ASSERT(expr)
Definition: debug.h:71

§ AONEventMcuWakeUpSet()

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()
63 {
64  uint32_t ui32Shift ;
65  uint32_t ui32Mask ;
66  uint32_t ui32RegAdr ;
67 
68  // Check the arguments.
69  ASSERT(( ui32MCUWUEvent >= AON_EVENT_MCU_WU0 ) && ( ui32MCUWUEvent <= AON_EVENT_MCU_WU7 ))
70  ASSERT( ui32EventSrc <= AON_EVENT_NONE );
71 
72  ui32Shift = (( ui32MCUWUEvent & 3 ) << 3 );
73  ui32Mask = ( 0x3F << ui32Shift );
74  ui32RegAdr = ( AON_EVENT_BASE + AON_EVENT_O_MCUWUSEL );
75  if ( ui32MCUWUEvent > 3 ) {
76  ui32RegAdr += 4;
77  }
78  HWREG( ui32RegAdr ) = ( HWREG( ui32RegAdr ) & ( ~ui32Mask )) | ( ui32EventSrc << ui32Shift );
79 }
#define AON_EVENT_MCU_WU7
Definition: aon_event.h:147
#define AON_EVENT_MCU_WU0
Definition: aon_event.h:140
#define AON_EVENT_NONE
Definition: aon_event.h:129
#define ASSERT(expr)
Definition: debug.h:71

§ AONEventRtcGet()

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()
509 {
510  uint32_t ui32EventSrc;
511 
512  // Return the active event.
513  ui32EventSrc = HWREG(AON_EVENT_BASE + AON_EVENT_O_RTCSEL);
514 
515  return ((ui32EventSrc & AON_EVENT_RTCSEL_RTC_CH1_CAPT_EV_M) >>
516  AON_EVENT_RTCSEL_RTC_CH1_CAPT_EV_S);
517 }

§ AONEventRtcSet()

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()
448 {
449  uint32_t ui32Ctrl;
450 
451  // Check the arguments.
452  ASSERT(ui32EventSrc <= AON_EVENT_NONE);
453 
454  ui32Ctrl = HWREG(AON_EVENT_BASE + AON_EVENT_O_RTCSEL);
455  ui32Ctrl &= ~(AON_EVENT_RTCSEL_RTC_CH1_CAPT_EV_M);
456  ui32Ctrl |= (ui32EventSrc & 0x3f) << AON_EVENT_RTCSEL_RTC_CH1_CAPT_EV_S;
457 
458  HWREG(AON_EVENT_BASE + AON_EVENT_O_RTCSEL) = ui32Ctrl;
459 }
#define AON_EVENT_NONE
Definition: aon_event.h:129
#define ASSERT(expr)
Definition: debug.h:71

Macro Definition Documentation

§ AON_EVENT_AUX_ADC_DONE

#define AON_EVENT_AUX_ADC_DONE   49

§ AON_EVENT_AUX_COMPA

#define AON_EVENT_AUX_COMPA   47

§ AON_EVENT_AUX_COMPB

#define AON_EVENT_AUX_COMPB   48

§ AON_EVENT_AUX_COMPB_ASYNC

#define AON_EVENT_AUX_COMPB_ASYNC   55

§ AON_EVENT_AUX_COMPB_ASYNC_N

#define AON_EVENT_AUX_COMPB_ASYNC_N   56

§ AON_EVENT_AUX_SWEV0

#define AON_EVENT_AUX_SWEV0   44

§ AON_EVENT_AUX_SWEV1

#define AON_EVENT_AUX_SWEV1   45

§ AON_EVENT_AUX_SWEV2

#define AON_EVENT_AUX_SWEV2   46

§ AON_EVENT_AUX_TDC_DONE

#define AON_EVENT_AUX_TDC_DONE   50

§ AON_EVENT_AUX_TIMER0_EV

#define AON_EVENT_AUX_TIMER0_EV   51

§ AON_EVENT_AUX_TIMER1_EV

#define AON_EVENT_AUX_TIMER1_EV   52

§ AON_EVENT_AUX_TIMER2_EV0

#define AON_EVENT_AUX_TIMER2_EV0   1

§ AON_EVENT_AUX_TIMER2_EV1

#define AON_EVENT_AUX_TIMER2_EV1   2

§ AON_EVENT_AUX_TIMER2_EV2

#define AON_EVENT_AUX_TIMER2_EV2   3

§ AON_EVENT_AUX_TIMER2_EV3

#define AON_EVENT_AUX_TIMER2_EV3   4

§ AON_EVENT_BATMON_BATT_LL

#define AON_EVENT_BATMON_BATT_LL   6

§ AON_EVENT_BATMON_BATT_UL

#define AON_EVENT_BATMON_BATT_UL   5

§ AON_EVENT_BATMON_COMBINED

#define AON_EVENT_BATMON_COMBINED   9

§ AON_EVENT_BATMON_TEMP

#define AON_EVENT_BATMON_TEMP   53

§ AON_EVENT_BATMON_TEMP_LL

#define AON_EVENT_BATMON_TEMP_LL   8

§ AON_EVENT_BATMON_TEMP_UL

#define AON_EVENT_BATMON_TEMP_UL   7

§ AON_EVENT_BATMON_VOLT

#define AON_EVENT_BATMON_VOLT   54

§ AON_EVENT_IO

#define AON_EVENT_IO   32

§ AON_EVENT_IOEV_MCU_WU

#define AON_EVENT_IOEV_MCU_WU   0

§ AON_EVENT_JTAG

#define AON_EVENT_JTAG   43

§ AON_EVENT_MCU_EVENT0

#define AON_EVENT_MCU_EVENT0   0

Referenced by AONEventMcuGet(), and AONEventMcuSet().

§ AON_EVENT_MCU_EVENT1

#define AON_EVENT_MCU_EVENT1   1

Referenced by AONEventMcuGet(), and AONEventMcuSet().

§ AON_EVENT_MCU_EVENT2

#define AON_EVENT_MCU_EVENT2   2

Referenced by AONEventMcuGet(), and AONEventMcuSet().

§ AON_EVENT_MCU_WU0

#define AON_EVENT_MCU_WU0   0

§ AON_EVENT_MCU_WU1

#define AON_EVENT_MCU_WU1   1

§ AON_EVENT_MCU_WU2

#define AON_EVENT_MCU_WU2   2

§ AON_EVENT_MCU_WU3

#define AON_EVENT_MCU_WU3   3

§ AON_EVENT_MCU_WU4

#define AON_EVENT_MCU_WU4   4

§ AON_EVENT_MCU_WU5

#define AON_EVENT_MCU_WU5   5

§ AON_EVENT_MCU_WU6

#define AON_EVENT_MCU_WU6   6

§ AON_EVENT_MCU_WU7

#define AON_EVENT_MCU_WU7   7

§ AON_EVENT_NONE

#define AON_EVENT_NONE   63

§ AON_EVENT_RTC0

#define AON_EVENT_RTC0   ( AON_EVENT_RTC_CH0 )

§ AON_EVENT_RTC_CH0

#define AON_EVENT_RTC_CH0   35

§ AON_EVENT_RTC_CH0_DLY

#define AON_EVENT_RTC_CH0_DLY   38

§ AON_EVENT_RTC_CH1

#define AON_EVENT_RTC_CH1   36

§ AON_EVENT_RTC_CH1_DLY

#define AON_EVENT_RTC_CH1_DLY   39

§ AON_EVENT_RTC_CH2

#define AON_EVENT_RTC_CH2   37

§ AON_EVENT_RTC_CH2_DLY

#define AON_EVENT_RTC_CH2_DLY   40

§ AON_EVENT_RTC_COMB_DLY

#define AON_EVENT_RTC_COMB_DLY   41

§ AON_EVENT_RTC_UPD

#define AON_EVENT_RTC_UPD   42