I am using the Coretex-M4 port of FreeRTOS, version 10.1.1, and I get a configASSERT when I use the function xTaskGetApplicationTaskTag within the traceTASK_SWITCHED_IN handler. This topic has already been discussed at:
However, no solution was supplied, other than a suggestion to comment out the offending configASSERT. Is there a plan to make a xTaskGetApplicationTaskTagFromISR function to solve this problem properly?
I would also like to point out that accessing pxCurrentTCB directly is no solution, as this pointer is statically defined in tasks.c. This is good data hiding practice, but does not help me in this instance.
Which assert are you hitting? I can’t see one in that function -
although there is one in taskENTER_CRITICAL() which is called from that
function - but that will only get hit if interrupt priorities are invalid.
@Richard Barry. Yes, I think a FromISR() version of xTaskGetApplicationTaskTag() would be helpful for me.
It is as you wrote in your second reply. The assert in taskENTER_CRITICAL() is being hit, because the OS is already in a critical section / in the ISR.