Hi community,
My system is based on cc2541 keyfob HW design and implements custom BT LE profile.
IAR 80.30.2
IPhone 4S, iOS version iOS 9.1.
BTLE stack Version 1.4.0
I have encounter very weird behavior of my system under following stress test:
-
iOS application connects to system and reads characteristics
-
System disconnects after 30 second timeout (no read/write inactivity from application)
-
System starts advertising
-
Go to (1)
The issue I see that system “freezes” after about 1 hour of operation. It means that:
- my application task stops to receive any events, including events generated by HAL as a results to buttons presses, timeouts, etc.
- my application outputs debug log messages over HW interface. This messages includes time obtained from OSAL.
- log shows that system freezes in GAP connected state after all characteristics are read and system waits TO to disconnect. I see in log that system reads couple of time RSS value. I have callback static gapRolesCBs_t WWAG_PeripheralCBs = {GAPStateCB, RSSIChangeCB,};
to receive RSSI updates with period of 5 seconds so last two messages before system freezes are log from RSSIChangeCB() callback function.
It looks like that simple TI scheduler of all tasks is also stuck, but the weird thing that system starts operating normally after 3 hours and from logged time I do not see 3 hour discontinuity.
Initially I suspected that I have incorrect loop somewhere in my code but after analysis was not able to find any suspicious code.
Issue is quite hard to reproduce.
I appreciate any hints that may help me.
BR//
ipozd