CC26xx Driver Library
[event.h] Event

Functions

static void EventRegister (uint32_t ui32EventSubscriber, uint32_t ui32EventSource)
 Connects an event to an event subscriber via Event Fabric. More...
 
static void EventSwEventSet (uint32_t ui32SwEvent)
 Sets software event. More...
 
static void EventSwEventClear (uint32_t ui32SwEvent)
 Clears software event. More...
 
static uint32_t EventSwEventGet (uint32_t ui32SwEvent)
 Gets software event status. 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 AON event fabric, see AON event API.

The MCU event fabric is a combinational router between event sources and event subscribers. Most event subscribers have statically routed event sources but several event subscribers have configurable event sources which is configured in the MCU event fabric through this API. Although configurable only a subset of event sources are available to each of the configurable event subscribers. This is explained in more details in the function EventRegister() which does all the event routing configuration.

MCU event fabric also contains four software events which allow software to trigger certain event subscribers. Each of the four software events is an independent event source which must be set and cleared in the MCU event fabric through the functions:

Function Documentation

§ EventRegister()

static void EventRegister ( uint32_t  ui32EventSubscriber,
uint32_t  ui32EventSource 
)
inlinestatic

Connects an event to an event subscriber via Event Fabric.

This function connects event sources to event subscribers.

It is not possible to read event status in this module (except software events). Event status must be read in the module that contains the event source. How a specific event subscriber reacts to an event is configured and documented in the respective modules.

For a full list of configurable and constant mapped event sources to event subscribers see the register descriptions for Event Fabric.

Defines for event subscriber argument (ui32EventSubscriber) have the format:

  • EVENT_O_[subscriber_name]

Defines for event source argument (ui32EventSource) must have the following format where valid event_enum values are found in the register description :

  • EVENT_[subscriber_name]_EV_[event_enum]

Examples of valid defines for ui32EventSource:

  • EVENT_CPUIRQSEL30_EV_AUX_TDC_DONE
  • EVENT_RFCSEL9_EV_AUX_COMPA
  • EVENT_GPT0ACAPTSEL_EV_AON_RTC_UPD
Note
Each event subscriber can only receive a sub-set of the event sources!
Switching the event source is not glitch free, so it is imperative that the subscriber is disabled for interrupts when switching the event source. The behavior is undefined if not disabled.
Parameters
ui32EventSubscriberis the configurable event subscriber to receive the event. Click the event subscriber to see the list of valid event sources in the register description.
  • EVENT_O_CPUIRQSEL30 : System CPU interrupt 30
  • EVENT_O_RFCSEL9 : RF Core event 9
  • EVENT_O_GPT0ACAPTSEL : GPT 0A capture event
  • EVENT_O_GPT0BCAPTSEL : GPT 0B capture event
  • EVENT_O_GPT1ACAPTSEL : GPT 1A capture event
  • EVENT_O_GPT1BCAPTSEL : GPT 1B capture event
  • EVENT_O_GPT2ACAPTSEL : GPT 2A capture event
  • EVENT_O_GPT2BCAPTSEL : GPT 2B capture event
  • EVENT_O_GPT3ACAPTSEL : GPT 3A capture event
  • EVENT_O_GPT3BCAPTSEL : GPT 3B capture event
  • EVENT_O_UDMACH9SSEL : uDMA channel 9 single request
  • EVENT_O_UDMACH9BSEL : uDMA channel 9 burst request
  • EVENT_O_UDMACH10SSEL : uDMA channel 10 single request
  • EVENT_O_UDMACH10BSEL : uDMA channel 10 burst request
  • EVENT_O_UDMACH11SSEL : uDMA channel 11 single request
  • EVENT_O_UDMACH11BSEL : uDMA channel 11 burst request
  • EVENT_O_UDMACH12SSEL : uDMA channel 12 single request
  • EVENT_O_UDMACH12BSEL : uDMA channel 12 burst request
  • EVENT_O_UDMACH14BSEL : uDMA channel 14 single request
  • EVENT_O_AUXSEL0 : AUX
  • EVENT_O_I2SSTMPSEL0 : I2S
  • EVENT_O_FRZSEL0 : Freeze modules (some modules can freeze on CPU Halt)
ui32EventSourceis the specific event that must be acted upon.
  • Format: EVENT_[subscriber_name]_EV_[event_enum] (see explanation above)
Returns
None
141 {
142  // Check the arguments.
143  ASSERT(( ui32EventSubscriber == EVENT_O_CPUIRQSEL30 ) ||
144  ( ui32EventSubscriber == EVENT_O_RFCSEL9 ) ||
145  ( ui32EventSubscriber == EVENT_O_GPT0ACAPTSEL ) ||
146  ( ui32EventSubscriber == EVENT_O_GPT0BCAPTSEL ) ||
147  ( ui32EventSubscriber == EVENT_O_GPT1ACAPTSEL ) ||
148  ( ui32EventSubscriber == EVENT_O_GPT1BCAPTSEL ) ||
149  ( ui32EventSubscriber == EVENT_O_GPT2ACAPTSEL ) ||
150  ( ui32EventSubscriber == EVENT_O_GPT2BCAPTSEL ) ||
151  ( ui32EventSubscriber == EVENT_O_GPT3ACAPTSEL ) ||
152  ( ui32EventSubscriber == EVENT_O_GPT3BCAPTSEL ) ||
153  ( ui32EventSubscriber == EVENT_O_UDMACH9SSEL ) ||
154  ( ui32EventSubscriber == EVENT_O_UDMACH9BSEL ) ||
155  ( ui32EventSubscriber == EVENT_O_UDMACH10SSEL ) ||
156  ( ui32EventSubscriber == EVENT_O_UDMACH10BSEL ) ||
157  ( ui32EventSubscriber == EVENT_O_UDMACH11SSEL ) ||
158  ( ui32EventSubscriber == EVENT_O_UDMACH11BSEL ) ||
159  ( ui32EventSubscriber == EVENT_O_UDMACH12SSEL ) ||
160  ( ui32EventSubscriber == EVENT_O_UDMACH12BSEL ) ||
161  ( ui32EventSubscriber == EVENT_O_UDMACH14BSEL ) ||
162  ( ui32EventSubscriber == EVENT_O_AUXSEL0 ) ||
163  ( ui32EventSubscriber == EVENT_O_I2SSTMPSEL0 ) ||
164  ( ui32EventSubscriber == EVENT_O_FRZSEL0 ) );
165 
166  // Map the event source to the event subscriber
167  HWREG(EVENT_BASE + ui32EventSubscriber) = ui32EventSource;
168 }
#define ASSERT(expr)
Definition: debug.h:71

§ EventSwEventClear()

static void EventSwEventClear ( uint32_t  ui32SwEvent)
inlinestatic

Clears software event.

Parameters
ui32SwEventis the software event number.
  • 0 : SW Event 0
  • 1 : SW Event 1
  • 2 : SW Event 2
  • 3 : SW Event 3
Returns
None
215 {
216  // Check the arguments.
217  ASSERT( ui32SwEvent <= 3 );
218 
219  // Each software event is byte accessible
220  HWREGB(EVENT_BASE + EVENT_O_SWEV + ui32SwEvent) = 0;
221 }
#define ASSERT(expr)
Definition: debug.h:71

§ EventSwEventGet()

static uint32_t EventSwEventGet ( uint32_t  ui32SwEvent)
inlinestatic

Gets software event status.

Parameters
ui32SwEventis the software event number.
  • 0 : SW Event 0
  • 1 : SW Event 1
  • 2 : SW Event 2
  • 3 : SW Event 3
Returns
Returns current value of requested software event.
  • 0 : Software event is de-asserted.
  • 1 : Software event is asserted.
240 {
241  // Check the arguments.
242  ASSERT( ui32SwEvent <= 3 );
243 
244  // Each software event is byte accessible
245  return( HWREGB(EVENT_BASE + EVENT_O_SWEV + ui32SwEvent));
246 }
#define ASSERT(expr)
Definition: debug.h:71

§ EventSwEventSet()

static void EventSwEventSet ( uint32_t  ui32SwEvent)
inlinestatic

Sets software event.

Setting a software event triggers the event if the value was 0 before.

Note
The software event must be cleared manually after the event has triggered the event subscriber.
Parameters
ui32SwEventis the software event number.
  • 0 : SW Event 0
  • 1 : SW Event 1
  • 2 : SW Event 2
  • 3 : SW Event 3
Returns
None
See also
EventSwEventClear()
192 {
193  // Check the arguments.
194  ASSERT( ui32SwEvent <= 3 );
195 
196  // Each software event is byte accessible
197  HWREGB(EVENT_BASE + EVENT_O_SWEV + ui32SwEvent) = 1;
198 }
#define ASSERT(expr)
Definition: debug.h:71