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

Macros that record start/stop events for the execution statistic display. More...

Macros

#define EventStartA(slot)   EventRecord2 (0xEF00U+EventLevelError+(slot), ((uint32_t) __FILE__), __LINE__)
 
#define EventStartAv(slot, v1, v2)   EventRecord2 (0xEF10U+EventLevelError+((slot) & 0xFU), (v1), (v2))
 
#define EventStopA(slot)   EventRecord2 (0xEF20U+EventLevelError+((slot) & 0xFU), ((uint32_t) __FILE__), __LINE__)
 
#define EventStopAv(slot, v1, v2)   EventRecord2 (0xEF30U+EventLevelError+((slot) & 0xFU), (v1), (v2))
 
#define EventStartB(slot)   EventRecord2 (0xEF40U+EventLevelAPI+((slot) & 0xFU), ((uint32_t) __FILE__), __LINE__)
 
#define EventStartBv(slot, v1, v2)   EventRecord2 (0xEF50U+EventLevelAPI+((slot) & 0xFU), (v1), (v2))
 
#define EventStopB(slot)   EventRecord2 (0xEF60U+EventLevelAPI+((slot) & 0xFU), ((uint32_t) __FILE__), __LINE__)
 
#define EventStopBv(slot, v1, v2)   EventRecord2 (0xEF70U+EventLevelAPI+((slot) & 0xFU), (v1), (v2))
 
#define EventStartC(slot)   EventRecord2 (0xEF80U+EventLevelOp+((slot) & 0xFU), ((uint32_t) __FILE__), __LINE__)
 
#define EventStartCv(slot, v1, v2)   EventRecord2 (0xEF90U+EventLevelOp+((slot) & 0xFU), (v1), (v2))
 
#define EventStopC(slot)   EventRecord2 (0xEFA0U+EventLevelOp+((slot) & 0xFU), ((uint32_t) __FILE__), __LINE__)
 
#define EventStopCv(slot, v1, v2)   EventRecord2 (0xEFB0U+EventLevelOp+((slot) & 0xFU), (v1), (v2))
 
#define EventStartD(slot)   EventRecord2 (0xEFC0U+EventLevelDetail+((slot) & 0xFU), ((uint32_t) __FILE__), __LINE__)
 
#define EventStartDv(slot, v1, v2)   EventRecord2 (0xEFD0U+EventLevelDetail+((slot) & 0xFU), (v1), (v2))
 
#define EventStopD(slot)   EventRecord2 (0xEFE0U+EventLevelDetail+((slot) & 0xFU), ((uint32_t) __FILE__), __LINE__)
 
#define EventStopDv(slot, v1, v2)   EventRecord2 (0xEFF0U+EventLevelDetail+((slot) & 0xFU), (v1), (v2))
 

Description

Macros that record start/stop events for the execution statistic display.

This section describes the macros that call event recorder functions from the user application to record start/stop events for program execution statistics.

The start/stop events allow to measure execution times with different slots (0 - 15) in four different groups (G = A - D). The call to 'EventStart' starts a timer slot; the call to 'EventStop' stops the related timer. A call to EventStop with slot 15 stops the timers of all slots in the specific group.

The macros allow to record either:

The start/stop events are using The four event groups (G = A - D) that are available to the user are mapped to the level information in EventID and may be used for filtering. The mapping is as shown in the table below.

Start/stop group A B C D
Event level Error API Op Data
Parameter recording EventRecordError EventRecordAPI EventRecordOp EventRecordDetail

It is required to call the EventRecorderInitialize function before using start/stop events. The parameter recording from the table above can be used in the functions EventRecorderInitialize, EventRecorderEnable, and EventRecorderDisable. Event filtering may be used to change the settings in the debugger.

The following code shows the setup of the Event Recorder for start/stop events:

Code example

Macro Definition Documentation

◆ EventStartA

#define EventStartA (   slot)    EventRecord2 (0xEF00U+EventLevelError+(slot), ((uint32_t) __FILE__), __LINE__)

The macro EventStartA generates a start event for group A with the specified slot number. The Event Recorder stores filename and line number of the call.

Parameters
[in]slotslot number (up to 16 slots, 0..15)

◆ EventStartAv

#define EventStartAv (   slot,
  v1,
  v2 
)    EventRecord2 (0xEF10U+EventLevelError+((slot) & 0xFU), (v1), (v2))

The macro EventStartAv generates a start event for group A with the specified slot number. The Event Recorder stores the integer value parameters v1, v2.

Parameters
[in]slotslot number (up to 16 slots, 0..15)
[in]v1first data value
[in]v2second data value

◆ EventStopA

#define EventStopA (   slot)    EventRecord2 (0xEF20U+EventLevelError+((slot) & 0xFU), ((uint32_t) __FILE__), __LINE__)

The macro EventStopA generates a stop event for group A with the specified slot number. The Event Recorder stores filename and line number of the call.

Parameters
[in]slotslot number (up to 16 slots, 0..15)

◆ EventStopAv

#define EventStopAv (   slot,
  v1,
  v2 
)    EventRecord2 (0xEF30U+EventLevelError+((slot) & 0xFU), (v1), (v2))

The macro EventStopAv generates a stop event for group A with the specified slot number. The Event Recorder stores the integer value parameters v1, v2.

Parameters
[in]slotslot number (up to 16 slots, 0..15)
[in]v1first data value
[in]v2second data value

◆ EventStartB

#define EventStartB (   slot)    EventRecord2 (0xEF40U+EventLevelAPI+((slot) & 0xFU), ((uint32_t) __FILE__), __LINE__)

The macro EventStartB generates a start event for group B with the specified slot number. The Event Recorder stores filename and line number of the call.

Parameters
[in]slotslot number (up to 16 slots, 0..15)

◆ EventStartBv

#define EventStartBv (   slot,
  v1,
  v2 
)    EventRecord2 (0xEF50U+EventLevelAPI+((slot) & 0xFU), (v1), (v2))

The macro EventStartBv generates a start event for group B with the specified slot number. The Event Recorder stores the integer value parameters v1, v2.

Parameters
[in]slotslot number (up to 16 slots, 0..15)
[in]v1first data value
[in]v2second data value

◆ EventStopB

#define EventStopB (   slot)    EventRecord2 (0xEF60U+EventLevelAPI+((slot) & 0xFU), ((uint32_t) __FILE__), __LINE__)

The macro EventStopB generates a stop event for group B with the specified slot number. The Event Recorder stores filename and line number of the call.

Parameters
[in]slotslot number (up to 16 slots, 0..15)

◆ EventStopBv

#define EventStopBv (   slot,
  v1,
  v2 
)    EventRecord2 (0xEF70U+EventLevelAPI+((slot) & 0xFU), (v1), (v2))

The macro EventStopBv generates a stop event for group B with the specified slot number. The Event Recorder stores the integer value parameters v1, v2.

Parameters
[in]slotslot number (up to 16 slots, 0..15)
[in]v1first data value
[in]v2second data value

◆ EventStartC

#define EventStartC (   slot)    EventRecord2 (0xEF80U+EventLevelOp+((slot) & 0xFU), ((uint32_t) __FILE__), __LINE__)

The macro EventStartC generates a start event for group C with the specified slot number. The Event Recorder stores filename and line number of the call.

Parameters
[in]slotslot number (up to 16 slots, 0..15)

◆ EventStartCv

#define EventStartCv (   slot,
  v1,
  v2 
)    EventRecord2 (0xEF90U+EventLevelOp+((slot) & 0xFU), (v1), (v2))

The macro EventStartCv generates a start event for group C with the specified slot number. The Event Recorder stores the integer value parameters v1, v2.

Parameters
[in]slotslot number (up to 16 slots, 0..15)
[in]v1first data value
[in]v2second data value

◆ EventStopC

#define EventStopC (   slot)    EventRecord2 (0xEFA0U+EventLevelOp+((slot) & 0xFU), ((uint32_t) __FILE__), __LINE__)

The macro EventStopC generates a stop event for group C with the specified slot number. The Event Recorder stores filename and line number of the call.

Parameters
[in]slotslot number (up to 16 slots, 0..15)

◆ EventStopCv

#define EventStopCv (   slot,
  v1,
  v2 
)    EventRecord2 (0xEFB0U+EventLevelOp+((slot) & 0xFU), (v1), (v2))

The macro EventStopCv generates a stop event for group C with the specified slot number. The Event Recorder stores the integer value parameters v1, v2.

Parameters
[in]slotslot number (up to 16 slots, 0..15)
[in]v1first data value
[in]v2second data value

◆ EventStartD

#define EventStartD (   slot)    EventRecord2 (0xEFC0U+EventLevelDetail+((slot) & 0xFU), ((uint32_t) __FILE__), __LINE__)

The macro EventStartD generates a start event for group D with the specified slot number. The Event Recorder stores filename and line number of the call.

Parameters
[in]slotslot number (up to 16 slots, 0..15)

◆ EventStartDv

#define EventStartDv (   slot,
  v1,
  v2 
)    EventRecord2 (0xEFD0U+EventLevelDetail+((slot) & 0xFU), (v1), (v2))

The macro EventStartDv generates a start event for group D with the specified slot number. The Event Recorder stores the integer value parameters v1, v2.

Parameters
[in]slotslot number (up to 16 slots, 0..15)
[in]v1first data value
[in]v2second data value

◆ EventStopD

#define EventStopD (   slot)    EventRecord2 (0xEFE0U+EventLevelDetail+((slot) & 0xFU), ((uint32_t) __FILE__), __LINE__)

The macro EventStopD generates a stop event for group D with the specified slot number. The Event Recorder stores filename and line number of the call.

Parameters
[in]slotslot number (up to 16 slots, 0..15)

◆ EventStopDv

#define EventStopDv (   slot,
  v1,
  v2 
)    EventRecord2 (0xEFF0U+EventLevelDetail+((slot) & 0xFU), (v1), (v2))

The macro EventStopDv generates a stop event for group D with the specified slot number. The Event Recorder stores the integer value parameters v1, v2.

Parameters
[in]slotslot number (up to 16 slots, 0..15)
[in]v1first data value
[in]v2second data value