It’s probably not a problem, but instead of
in your ISR better use the appropriate macro
portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
Since your MCU has a Cortex-M0 core there are 2 stack pointers: MSP and PSP (main and process stack pointer). PSP is used for task stacks and MSP is used by startup code and ISRs (see below). The FreeRTOS stack tracing macros only take care of the task stacks i.e. PSP.
Main stack is usually defined by linker script (usually a *.ld
file) and it’s start address is the first entry in the vector or exception table right before the Reset_Handler entry.
It’s not managed by FreeRTOS and it’s up to application writers to define it appropriately.
In a FreeRTOS application main stack is used during program startup: Reset_Handler, CRT init, … until the scheduler is started in main()
which in turn starts the first task. Afterwards the main stack is the ISR stack and it’s size should be large enough to cover your ISR code.
I guess the traced stack usage of 93% is the maximum task stack usage (derived from the FreeRTOS stack watermarks).
Try to find the linker script file and check/verify the (main) stack related definitions just to be sure.