@asyal
@Francis.duhaut
The fwupdate using the .cwe file does solve the roll-back issue.
That’s a positive step, and thanks for that suggestion.
Which enables me to see a new problem, that once the battery drops to a low enough charge, the firmware does not succeed in re-connecting once the device is plugged in.
By comparison, simply disconnecting and re-connecting a fully charged battery doesn’t present this problem, so I interpret that a brown-out or similar situation is part of the story.
When it gets into that state, and I then plug in to CF3 USB to recharge, our app is shown as running (still), but connections to A/V have stopped. This code is capable of re-connecting after a timer or shake wake from ULPM, so I have confidence that the code is capable of re-connecting, except in this situation where the battery was allowed to drop too low.
If, at that point, I issue these commands:
app stop myApp
app start myApp
a new connection is made and data begins to be sent once again.
I still suspect that the BQ24296 is not cutting off system power cleanly which makes me want to find a register to program that will act differently.
Thanks asyal for suggesting that I detect a battery state that is nearing the end of its charge, and put the device in ULPM to protect it. This might be part of the ultimate solution. Of course, there is always the case where the unit is not recharged for so long that even this trick doesn’t save us.
Along a similar vein, I have also considered perhaps when the battery begins to run low, having myApp start a separate app which only relies on the module/timer, and on that timer wakeup, stops and restarts the primary app, similar to what I did at the command line. This might get us out of the current “stuck after brownout”, and on to the next problem 
Any suggestions are welcome, and I will continue to report new findings.
Jim