CMSIS-View  
Record program events, display status information, and analyze execution faults
 
Loading...
Searching...
No Matches
Event Data Recording

Functions that record events along with data information. More...

Content

 Event level
 Defines for parameter level for EventID.
 
 Component number
 Defines for parameter comp_no for EventID.
 

Macros

#define EventID(level, comp_no, msg_no)   ((level & 0x30000U) | ((comp_no & 0xFFU) << 8) | (msg_no & 0xFFU))
 Composed event id from level, component number and message number.
 

Functions

uint32_t EventRecord2 (uint32_t id, uint32_t val1, uint32_t val2)
 Record an event with two 32-bit data values.
 
uint32_t EventRecord4 (uint32_t id, uint32_t val1, uint32_t val2, uint32_t val3, uint32_t val4)
 Record an event with four 32-bit data values.
 
uint32_t EventRecordData (uint32_t id, const void *data, uint32_t len)
 Record an event with variable data size.
 

Description

Functions that record events along with data information.

This section describes the functions that are called from the user application or middleware libraries to record events.

Each event has an id that combines level, component number, and message number:

can have an additional event level that is used for filtering. The event level value is defined by EventLevelError, EventLevelAPI, EventLevelOp, or EventLevelDetail and added to the event ID number.

Note
Before using these functions, the Event Recorder must be initialized with EventRecorderInitialize.

Code example

Macro Definition Documentation

◆ EventID

#define EventID (   level,
  comp_no,
  msg_no 
)    ((level & 0x30000U) | ((comp_no & 0xFFU) << 8) | (msg_no & 0xFFU))

Composed event id from level, component number and message number.

Parameters
levelEvent level of the id
comp_nocomponent number of the id
msg_nomessage number of the id

The macro EventID generates an id value that combines level, component number, and message number. The level value should be set to EventLevelError, EventLevelAPI, EventLevelOp, or EventLevelDetail.

The id value is used by the functions EventRecordData, EventRecord2, and EventRecord4.

Function Documentation

◆ EventRecord2()

uint32_t EventRecord2 ( uint32_t  id,
uint32_t  val1,
uint32_t  val2 
)

Record an event with two 32-bit data values.

Parameters
[in]idevent identifier (level, component number, message number)
[in]val1first data value
[in]val2second data value
Returns
status (1=Success, 0=Failure)

Code Example

Note
The id may be defined using the macro EventID.

◆ EventRecord4()

uint32_t EventRecord4 ( uint32_t  id,
uint32_t  val1,
uint32_t  val2,
uint32_t  val3,
uint32_t  val4 
)

Record an event with four 32-bit data values.

Parameters
[in]idevent identifier (level, component number, message number)
[in]val1first data value
[in]val2second data value
[in]val3third data value
[in]val4fourth data value
Returns
status (1=Success, 0=Failure)

Code Example

EventRecord4 (2+EventLevelAPI, value1, 0, 0, value4);
Note
The id may be defined using the macro EventID.

◆ EventRecordData()

uint32_t EventRecordData ( uint32_t  id,
const void *  data,
uint32_t  len 
)

Record an event with variable data size.

Parameters
[in]idevent identifier (level, component number, message number)
[in]dataevent data buffer
[in]lenevent data length
Returns
status (1=Success, 0=Failure)

Code Example

char string[10] = "MyTest";
:
EventRecordData (3+EventLevelOp, string, sizeof(string));
Note
The id may be defined using the macro EventID.