cancel
Showing results for 
Search instead for 
Did you mean: 

SPC570S MCU running FreeRTOS freeze upon receiving CAN messages

NBula.1
Associate III

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

1 ACCEPTED SOLUTION

Accepted Solutions
Erwan YVIN
ST Employee

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

View solution in original post

3 REPLIES 3
PChia.2237
Senior

Have you try disable preempition?

Erwan YVIN
ST Employee

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

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