antoine monmarché

S32K HardFault exception

Discussion created by antoine monmarché on May 15, 2019
Latest reply on May 23, 2019 by Jorge Antonio Alcala Vazquez



I'm having an issue with FreeRTOS on S32K.

The issue is very similar to what is describe here:


I am getting random HardFault issue in function uxListRemove.

Sometimes also "The processor has escalated a configurable-priority exception to HardFault. An instruction executed with an invalid EPSR.T or EPSR.IT field. Exception occured at: 0x0"
I'm using IAR compiler and IDE and it doesn't give me the callstack when the HardFault issue occurs.


My Freertos configuration is the same as in S32K SDK example:





My project uses UART interrupts, CAN interrupts and FreeRTOS xTimer along with 4 tasks and the IDLE task.

CAN bus (500kbps) is receiving 8 frames every 100ms and sending 1 frame every 100ms

UART is sending 13Bytes every 100ms (921kbps)


I'm using a 10ms timer to poll the UART reception. When this timer is disabled, the HardFault issue doesn't occur.

I tried to changed the FreeRTOS default timer configuration but it doesn't give any good result.


Do you have any advice on how to find the root cause of this issue?


Thank you.