Hi There,
I am using CC2541 with TI BLE stack version 1.3.2. In some cases after being connected to iPhone(not sure whether this is connection specific or random, but I am observing with iPhone) my device goes into infinite loop in function. It loops forever in while loop.
I have also attached a snapshot which says that srchTimer and srchTimer->next both points to same location and which is causing an infinite loop. Have anyone encountered the same issue anytime, if yes then what is the root cause of this?
/*********************************************************************
* @fn osalFindTimer
*
* @brief Find a timer in a timer list.
* Ints must be disabled.
*
* @param task_id
* @param event_flag
*
* @return osalTimerRec_t *
*/
osalTimerRec_t *osalFindTimer( uint8 task_id, uint16 event_flag )
{
osalTimerRec_t *srchTimer;
// Head of the timer list
srchTimer = timerHead;
// Stop when found or at the end
while ( srchTimer )
{
if ( srchTimer->event_flag == event_flag &&
srchTimer->task_id == task_id )
{
break;
}
// Not this one, check another
srchTimer = srchTimer->next;
}
return ( srchTimer );
}