Part Number:CC3200MOD
Hello everyone,
I'm working on a custom board mounting the CC3200MOD with the latest service pack: 1.0.1.11-2.9.0.0
I'm using SDK1.3.0 and compiling with gcc. The system use FreeRTOS and has 4 tasks: main application, connectivity, mqtt broker and mqtt client. On startup it loads the binary application from the application_bootloader so it is able to perform OTA Update. The used peripheral are: gpio, pwm, analog in, i2c, spi and uart (for debug). The mqtt broker accepts unsecured connections while mqtt client opens a TLS V1.2 socket to a remote server.
My problem is that after several hours of normal operation it enters in the FaultISR trap and remains blocked there.
After many tries I found out that when the mqtt client is heavily stressed, sending and receiving around 10 messages per second, the fault shows up within minutes. But never after the same time (sometimes after mere seconds, others after more than 40 minutes) and don't seem to block in the same function as I added several debug messages in the mqtt_client functions.
I also experience the problem when limiting the execution to only 2 tasks: connectivity and mqtt client (only uart peripheral). After the initialization (wlan connection and mqtt connection) the only running task is to check if an incoming message has arrived and send several messages in reply. If another incoming message arrives while sending the reply messages, it is saved by the receiving task but later it is dumped by the sending task.
If I only send dummy messages without receive requests or receive messages without replying to them, the fault doesn't shows up.
I thought that the fault may be caused by the allocation of memory for the incoming message while sending another one, so I replaced the dynamic memory management with static allocation all over the system, but no luck.
I already triple checked the code to find memory leaks, zero divisions and bad array management.
Most of times the execution blocks after printing these lines from the mqtt client functions:
C: Msg w/ ID 0x0000, processing status: Good
C: Alloc for 0 20030de4
C: Alloc for 3 20030dc0
So my questions are:
1- Does anyone have experienced such problem and how it was fixed?
2- Is it possible that I'm facing a bug in the service pack or in the mqtt SDK?
3- Is there a way to find exactly where a fault is generated?