CC13xx 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

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:

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.
ui32EventSourceis the specific event that must be acted upon.
  • Format: EVENT_[subscriber_name]_EV_[event_enum] (see explanation above)
Returns
None
143 {
144  // Check the arguments.
145  ASSERT(( ui32EventSubscriber == EVENT_O_CPUIRQSEL30 ) ||
146  ( ui32EventSubscriber == EVENT_O_RFCSEL9 ) ||
147  ( ui32EventSubscriber == EVENT_O_GPT0ACAPTSEL ) ||
148  ( ui32EventSubscriber == EVENT_O_GPT0BCAPTSEL ) ||
149  ( ui32EventSubscriber == EVENT_O_GPT1ACAPTSEL ) ||
150  ( ui32EventSubscriber == EVENT_O_GPT1BCAPTSEL ) ||
151  ( ui32EventSubscriber == EVENT_O_GPT2ACAPTSEL ) ||
152  ( ui32EventSubscriber == EVENT_O_GPT2BCAPTSEL ) ||
153  ( ui32EventSubscriber == EVENT_O_GPT3ACAPTSEL ) ||
154  ( ui32EventSubscriber == EVENT_O_GPT3BCAPTSEL ) ||
155  ( ui32EventSubscriber == EVENT_O_UDMACH9SSEL ) ||
156  ( ui32EventSubscriber == EVENT_O_UDMACH9BSEL ) ||
157  ( ui32EventSubscriber == EVENT_O_UDMACH10SSEL ) ||
158  ( ui32EventSubscriber == EVENT_O_UDMACH10BSEL ) ||
159  ( ui32EventSubscriber == EVENT_O_UDMACH11SSEL ) ||
160  ( ui32EventSubscriber == EVENT_O_UDMACH11BSEL ) ||
161  ( ui32EventSubscriber == EVENT_O_UDMACH12SSEL ) ||
162  ( ui32EventSubscriber == EVENT_O_UDMACH12BSEL ) ||
163  ( ui32EventSubscriber == EVENT_O_UDMACH14BSEL ) ||
164  ( ui32EventSubscriber == EVENT_O_AUXSEL0 ) ||
165  ( ui32EventSubscriber == EVENT_O_I2SSTMPSEL0 ) ||
166  ( ui32EventSubscriber == EVENT_O_FRZSEL0 ) );
167 
168  // Map the event source to the event subscriber
169  HWREG(EVENT_BASE + ui32EventSubscriber) = ui32EventSource;
170 }
#define ASSERT(expr)
Definition: debug.h:73
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
217 {
218  // Check the arguments.
219  ASSERT( ui32SwEvent <= 3 );
220 
221  // Each software event is byte accessible
222  HWREGB(EVENT_BASE + EVENT_O_SWEV + ui32SwEvent) = 0;
223 }
#define ASSERT(expr)
Definition: debug.h:73
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.
242 {
243  // Check the arguments.
244  ASSERT( ui32SwEvent <= 3 );
245 
246  // Each software event is byte accessible
247  return( HWREGB(EVENT_BASE + EVENT_O_SWEV + ui32SwEvent));
248 }
#define ASSERT(expr)
Definition: debug.h:73
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()
194 {
195  // Check the arguments.
196  ASSERT( ui32SwEvent <= 3 );
197 
198  // Each software event is byte accessible
199  HWREGB(EVENT_BASE + EVENT_O_SWEV + ui32SwEvent) = 1;
200 }
#define ASSERT(expr)
Definition: debug.h:73