Problem after sending a few MQTT messages with FreeRTOS and LwIP on STM32F406VGTX
Hi Guys,
I would check if someone could help me here with a small projecting I'm trying to build.
I have project that sends MQTT (from LwIP) messages periodically using 3 CMSISv2 tasks (i send them with different time intervals, some with 1s and others with 5s).
The messages have approximately the following sizes: 9, 58 and 362 chars.
After sending some of them, all of them stop being sent :(
The piece of code where the code seems to occur is in the LwIP libraries, mqtt.c:
r = mqtt_create_request(client->req_list, LWIP_ARRAYSIZE(client->req_list), pkt_id, cb, arg);
if (r == NULL) {
return ERR_MEM;
}I tried to disable the task that sends the biggest message and seems to work fine (didn't tested for more than 1/2 hours)
I also added a Mutex to make sure only one task at time is sending a message (not sure if it helps).
Some more info regarding the configuration configure in CubeMX:
Thread Stack Sizes: 2048
FreeRTOS Heap Size: 30760
LwIP MEM SIZE: 16360.
Not sure what other values could be relevant to try help solve the problem.
Thanks in advance,
Leandro
