Part Number: MSP430F5659
Tool/software: TI-RTOS
Hi support team,
Thanks for valuble support
In our firmware design, we have 4 task for communication, Data Handling , Diagnostic ,Watchdog.
Scheduling: Priority based pre-emptive scheduling
Inter task communication: Mailbox is used
Mailbox size: 90 character max
Stack size: 512 bytes
Firmware Design Analysis:
We checked the stack usage of all task which is in running state (at different stages ) and blocked state in debug mode.
1. So at first we run the device in debug mode and kept breakpoint in 4 places of the Communication task and observe stack peak of all task.
Stack Peak: Communication task - 370 , Data Manager -240 , Diagnostic -380 , Watchdog -122,
2. Then we run the device in debug mode and kept breakpoint in 2 places of the Data Manager and observe stack peak of all task.
Stack Peak: Communication task - 370/470 , Data Manager -240 , Diagnostic - 380, Watchdog -122,
Clarification Point:
1.If we kept breakpoint in Data Manager and run communication task in free running mode. Why communication task ,stack peak reaches 470 bytes?
2. Mailbox also uses stack allocated for the task ?
It is 90% of the stack maximum size allocated. We would like to understand the cause of this behavior.
Kindly provide valuable inputs on the behavior to improvise this condition to prevent unexpected behavior of firmware.
Thanks
Manoj