System is crashing when array size is changed. How to solve this issue and how to analyze thread OS_STACK_SIZE?

Hi,
I’m developing CAN message sending system. System scope is to merged function code (uint8_t) to the respective function to be executed.
message[17]. But it only sends 17 max function codes only. If I send 18 function codes message[18] system is crashed in run time. How do I solve this issue?

Also I tried to change Thread OS_STACK_SIZE 786 to 512. Then the system works. Why is that?

Hi,

sorry, I don’t understand the assignment. Try to make a new empty project and copy only affected code (with dummy messages), make a test (whether the problem is present) and then place the code here.

BR, Jan

1 Like