Deadlock reboot - System Reset Problem
Hi ST community,
In my project I have created a task to post Data to AWC server.
the function call stack looks like below:
stack size is 70*12 words
AWC_Task()
{ GPRS_SetConnection() // establish connection
PH2_exeAWCcmnds()
}
PH2_exeAWCcmnds() // executed but not returned due to deadlock
{
ExecCommand() // below all functions are executing and able to POST data but after posting data I am getting System reset at this point(at the end ).
}
ExecCommand() //executed and returned
{
PH2_SerialiseAckPostJson()
}
PH2_SerialiseAckToJson() //executed and returned
{
// allocating global buffer using malloc
PI_postCommandExec()
PI_postCommandExec()
free()//releasing malloc buffer
}
PI_postCommandExec() //executed and returned
{
GPRS_POSTdataInit()
GPRS_POSTdataChunk() //set the awc url settings to post data
if(possting of datachunk success)
GPRS_POSTdataTerm() //termoinate
}
NOTE: Above function calls shows longest possible function call chain.
I have checked for Stack over flow(might be cause of Deadlock) for AWC_Task using the follow methods:
-> vApplicationStackOverflowHook function - as this functio is not executed, then there is no stack overflow
-> Increased stack size from 70*10 words to 70*12 - the deadlock problem not solved
-> uxTaskGetStackHighWaterMark() - at start i got 804 words free space(at start of AWC_Task Function) and
when i printed the remaining stack size i got 602 words.
I think the deadlock may not be due to Stack overflow.
I want to know what might be the other causes for deadlock?
Thank you,
Regards,
Sai Kiran