xTraceSetISRProperties
traceHandle xTraceSetISRProperties(const char* name, uint8_t priority)
Stores a name and priority level for an Interrupt Service Routine, to allow for better visualization. Returns a traceHandle used by
vTraceStoreISRBegin.
Example:
#define PRIO_ISR_TIMER1 3 /* the hardware priority level */
...
traceHandle Timer1Handle = xTraceSetISRProperties("ISRTimer1", PRIO_ISR_TIMER1);
...
void ISR_handler()
{
vTraceStoreISRBegin(Timer1Handle);
...
vTraceStoreISREnd(0);
}
VTraceStoreISRBegin
void vTraceStoreISRBegin(traceHandle handle);
Registers the beginning of an Interrupt Service Routine, using a traceHandle provided by xTraceSetISRProperties.
Example:
#define PRIO_ISR_TIMER1 3 /* the hardware priority level */
...
traceHandle Timer1Handle = xTraceSetISRProperties("ISRTimer1", PRIO_ISR_TIMER1);
...
void ISR_handler()
{
vTraceStoreISRBegin(Timer1Handle);
...
vTraceStoreISREnd(0);
}
VTraceStoreISREnd
void vTraceStoreISREnd(int isTaskSwitchRequired)
Registers the end of an Interrupt Service Routine.
The parameter pendingISR indicates if the interrupt has caused a task-switch (= 1), e.g., by signaling a semaphore. Otherwise (= 0) the interrupt is assumed to return to the previous context.
Example:
#define PRIO_ISR_TIMER1 3 /* the hardware priority level */
...
traceHandle Timer1Handle = xTraceSetISRProperties("ISRTimer1", PRIO_ISR_TIMER1);
...
void ISR_handler()
{
signed BaseType_t xHigherPriorityTaskWoken;
vTraceStoreISRBegin(Timer1Handle);
/* Wakes up a pending task, causing a task-switch */
xSemaphoreGiveFromISR(xSemaphore, &xHigherPriorityTaskWoken);
vTraceStoreISREnd(xHigherPriorityTaskWoken);
}