Extreme low-power mode on NRF5340
This is not so much an issues as a discussion, before we start implementation, since I couldn't find a forum for this.
We would like to completely disable Nimble and the net-core on the NRF5340 for long periods. When needed, the Nimble stack (and Net-core) should be restarted and used for communications. Nimble itself doesn't appear to have deinit() functions (yet).
What we plan to do is:
- Net-core: wait for Radio to be idle and then disable the Radio (and all other used peripherals). Then signal app-core
- App-core: wait until net-core is done with shutdown and then really shut it down.
- App-core Nimble stack: stop tasks, stop timer, remove queues (or clear), reset some static global structs to zero.
The idea is that we dont have to modify the init steps this way, so future merges remain easy.
Am I missing something with this approach?
This should probably have some "generic" support in host ie ble_hs_disable()/ble_hs_enabled(), and support in HCI transport interface
But... have you measured power savings? ie how much reinitialize would cost comparing to just idling? ie, when not used radio is disabled, we go tickless on idle on networking core etc so it should be quite low power already
Are any special configuration settings needed for this? I'm using the default Peripheral app for testing now, but it seems to use around 6.3 mA on avg (with energy 2 spikes per second).