This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ChibiOS and Simplelink with CC3100

Other Parts Discussed in Thread: CC3100

I'm in progress of making simplelink driver to work with ChibiOs, on my own STM32F407 board with CC3100 module.

I did run in problems when my tcp and udp connections (server for both) crashed in "mid air", after 10 sec - few minutes of operation. When sending packets to udp and tcp simultaneously, it did crash almost immediately.

After enabling ChibiOS state checks, it was revealed that there was issue with mutex unlock order. ChibiOS wants that mutexes are unlocked in lock-reverse order.

ref http://chibios.sourceforge.net/html/group__mutexes.html - Constraints

With some debugging, i found out that this happens in driver.c, _SlDrvDataReadOp() and _SlDrvDataWriteOp() functions.

TxLockObj and GlobalLockObj were unlocked in wrong order.

(The TxLockObj was also left locked if bailing out if device restart was required)

My patch to the driver.c

https://github.com/kimmoli/telakone-fw/commit/7122772e7d6c63ad42acb848b418d9f3447c70d3

After this, the udp and tcp servers have been working simultaneously for ~60 minutes (which is a record now), both receiving a packet every 100ms.