Hi all,
I am trying to use “portCONFIGURE_TIMER_FOR_RUN_TIME_STATS” to check the execution time of the task its active state time etc.
#define configUSE_TRACE_FACILITY 1
#define configGENERATE_RUN_TIME_STATS 1
But when I use below fuction
vPortRTOSRunTimeISR
data abort exception occurs, can you please guide me to fix the issue.
The related code is as below,
extern void RTOS_AppConfigureTimerForRuntimeStats(void);
#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() RTOS_AppConfigureTimerForRuntimeStats()
extern uint32_t RTOS_AppGetRuntimeCounterValueFromISR(void);
#define portGET_RUN_TIME_COUNTER_VALUE() RTOS_AppGetRuntimeCounterValueFromISR()
void RTOS_AppConfigureTimerForRuntimeStats(void)
{
RTOS_RunTimeCounter = 0;
}
uint32_t RTOS_AppGetRuntimeCounterValueFromISR(void)
{
return RTOS_RunTimeCounter; /* increment runtime counter */
}
void vPortRTOSRunTimeISR(void)
// void rtiNotification(rtiBASE_t *rtiREG, uint32 notification)
{
/* Clear interrupt flag.*/
//rtiREG1->INTFLAG = 2U;
// *((volatile uint32_t *) 0xFFFFFC88) = 2U;
RTOS_RunTimeCounter++; /* increment runtime counter */
}
Another timer setup to measure task execution time.
portRTI_CNT0_COMP1_REG = ( configCPU_CLOCK_HZ / 2 ) / (configTICK_RATE_HZ*10);
portRTI_CNT0_UDCP1_REG = ( configCPU_CLOCK_HZ / 2 ) / (configTICK_RATE_HZ)*10;
/* Clear interrupts. */
portRTI_INTFLAG_REG = 0x0007000FU;
portRTI_CLEARINTENA_REG = 0x00070F0FU;
/* Enable the compare 0 interrupt. */
portRTI_SETINTENA_REG = 0x00000001U;
portRTI_SETINTENA_REG |= 0x00000002U;
Data exception register values
Thank you very much,
Regards,
Kishor