Hi,
I'm leveraging the ble_app_cli example program for my project. The primary reason for this is that I need BLE and I need to be able store and retrieve log data which needs to survive across power cycles. My plan is to use flashlog for this functionality. I see that the only way to retrieve the logs is using the CLI. Therefore, the ble_app_cli example seemed like a good place to start. If I build and run this example on my nRF52840 DK, it runs correctly some of the time. I always get the CLI menu when I press TAB, and the CLI commands are functional. But sometimes, the battery level simulation data does not get output. Other times it does. After leveraging this code into my own project, I see the same behavior. When the battery data does not get output, I tried setting a breakpoint in the call to NRF_LOG_PROCESS(), and I see that it doesn't get there. So it looks like the idle task stops running once the CLI task starts, at least some of the time.
Again, I'm able to see this behavior using the unmodified ble_app_cli example. Another thing I noticed is that if I do not make a BLE connection, the app shuts down after about 3 minutes. When this happens, all of the previous battery level updates are printed on the serial terminal. So the data is getting logged, it's just not getting output because NRF_LOG_PROCESS is not running, because the idle task is not running.
00:03:22.000,183] <info> app: Battery level update: 87
Logs dropped (1)
[00:03:24.000,183] <info> app: Battery level update: 88
Logs dropped (1)
[00:03:26.000,183] <info> app: Battery level update: 89
Logs dropped (1)
[00:03:28.000,183] <info> app: Battery level update: 90
Logs dropped (1)
[00:03:29.939,758] <info> pwr_mgmt: Shutdown request 0
Logs dropped (1)
[00:03:29.939,758] <info> pwr_mgmt: Shutdown started. Type 0
Logs dropped (1)
[00:03:29.939,758] <info> pwr_mgmt: SysOff handler 0x000355D1 => ready
Logs dropped (1)
[00:03:29.939,758] <info> pwr_mgmt: Shutdown complet
Any thoughts on how to fix this, or ideas for other approaches - possibly something that doesn't use task manager. I don't see it used much in other examples. Is it possible to use the CLI and BLE without task manager?
Thanks...
Brian