I'm working on a custom device using the CC2640 chip. My firmware started out based on the SimpleBLEPeripheral project, but has been expanded significantly since then. I have had several instances where I notice substantial performance degradations when I try to run the device on an external source (battery), so I am trying to figure out what the source of these differences is. I'm using the XDS110 debugger.
The device works well when I:
- Run the device in debug mode from CCS.
- Flash the device using Flash Programmer 2.
- Connect and disconnect from the device with Flash Programmer 2 (so that it resets the board)
- If I do any of these, and keep the board booted up, and remove the debug cable, it continues to perform well
However, then if I remove power and restore power, the device consistently performs differently.
Performance issues include:
- I have a line related to updating the advertising data within the main loop. If I remove that line, it will work fine when run as above, but the program will not run at all if I power cycle it without the debugger.
- I have a fixed-rate data transfer over a notification characteristic. If I run it as above, the data transfer completes perfectly. If I power cycle it without the debugger, it works fine until I try to transfer the data, then it transfers the first packet and then fails.
It's possible in each of these situations I've done something wrong, but then why would it run differently in the two boot-up conditions? What is different between a simple power-up vs a board reset through the debugger that could cause this kind of issue?
Thanks,
--Allen