I am a new to the TI BLE stack and IAR, and am probably missing something very obvious. I am just trying to make the SimpleBLEPeripheral work, but it hangs. When I run it in the debugger, then I can see it reaches the GATTServApp_ProcessCharCfg() function call inside the function SimpleProfile_SetParameter() in simpleGATTprofile.c. But from somewhere inside that function call it jumps directly back to the start of main().
Anybody knows what is going on here?
This is such a strange behaviour, that I decided to reinstall the whole stack, and not do any of the changes needed for my own app. The behaviour is still the same. What I did specifically:
- Using IAR version 9.10.1; IAR common components 7.0.6.3257
- Using BLE_CC254x_140
- Opened the SimpleBLEPeripheral workspace in IAR, and let IAR "convert to current version"
- Choose "CC2541" configuration in IAR (I have a custom CC2541 board)
- Did the _NR_OF_VIRTUAL_REGISTERS replacement as described in: http://e2e.ti.com/support/wireless_connectivity/f/538/p/303921/1061642#1061642
- In the preprocessor macros, undefined POWER_SAVING, and redefined HAL_LCD=FALSE
- Note that I did not change any line of code anywhere in the software (except for the required _NR_OF_VIRTUAL_REGISTERS change).
The strangest thing about this is, that if I redefine HAL_LED=TRUE (instead of the default HAL_LED=FALSE), then the hang/loop goes away, and the device seems to be functioning correctly, except that it doesn't advertise (see my other question on that). This is very strange, because the HAL_LED seems to have nothing at all to do with the GATTServApp_ProcessCharCfg call.
Any help on this would be very much appreciated - I am missing something big, or the TI stack is extremely buggy.