Skip to main content
NBula.1
Associate III
September 13, 2021
Solved

SPC570S MCU running FreeRTOS freeze upon receiving CAN messages

  • September 13, 2021
  • 2 replies
  • 1493 views

Hi,

I have a SPC570S MCU running FreeRTOS and is connected to a CAN bus. I came across an issue where the MCU freezes randomly, when there traffic in the CAN bus before is it switched on. Could someone help me in this matter. This happens randomly, and I have isolated the problem by uploading two code stacks, one with CAN and one without.

Nisal

    This topic has been closed for replies.
    Best answer by Erwan YVIN

    Hello ,

    you should check the state of your stack.

    Could you increase the stack size of your application ?

    check the registers before your crash R13,R14,PC with the debugger

    Best Regards

    Erwan

    2 replies

    PChia.2237
    Senior
    September 14, 2021

    Have you try disable preempition?

    Erwan YVIN
    Erwan YVINBest answer
    ST Employee
    September 14, 2021

    Hello ,

    you should check the state of your stack.

    Could you increase the stack size of your application ?

    check the registers before your crash R13,R14,PC with the debugger

    Best Regards

    Erwan

    NBula.1
    NBula.1Author
    Associate III
    September 14, 2021

    Hi Erwan,

    I will try this. Is it okay to use the FreeRTOS function uxTaskGetStackHighWaterMark() to check the size.

    I have 4 tasks running.

    Nisal