AM2612: Unnecessary critical sections in xTaskGetTickCount

Part Number: AM2612

Hi team,

I noticed that xTaskGetTickCount (in task.c) implements a critical section to protect the xTickCount variable:


/* Critical section required if running on a 16 bit processor. */
portTICK_TYPE_ENTER_CRITICAL();
{
    xTicks = xTickCount;
}
portTICK_TYPE_EXIT_CRITICAL();

 

Since xTickCount is a 32-bit variable and the Cortex-R5 is a 32-bit architecture, these locks appear unnecessary.
I noted that portTICK_TYPE_IS_ATOMIC=1 is defined in portmacro.h for the M4 to disable these locks, but this definition seems to be missing for the R5 in my current SDK version.
This is causing measurable latency in real-time applications.
 
Could you please confirm if this is an intended behavior or an oversight in the SDK? 
 
Best regards
Manuel