nRF5340, fastest possible time to disable/re-enable network core

I found out nrf_reset_network_force_off() can be used to turn on/off the network core in firmware, per the example in NCS v2.5.0, samples/subsys/ipc/ipc_service/icmsg. I would like to use it in optimizing power in a project that needs to wirelessly transmit data every 3ms. From testing out the function in my project, it seems like it takes just about 3ms total to turn off and on the core.

My findings show these approximate times:

Operation Function Call Time (us)
Turn On Network Core (total) 2869.8
ipc_service_deregister_endpoint()
10.12
k_sem_init()
1.04
ipc_service_register_endpoint()
26.88
nrf_reset_network_force_off(NRF_RESET, false)
9.72
k_sem_take(&bound_sem, K_FOREVER) 2820
Turn Off Network Core (total) 86.84
nrf_reset_network_force_off(NRF_RESET, true)
86.84

I had the following questions:

  1. Is there something I can do to have k_sem_take() finish quicker? I'm working on this at the moment, but am open to other tips.
  2. Is this more or less the expected time to perform these operations?
  3. Are there faster, but less power-efficient ways to lower the power consumption on the network core i.e., put to sleep instead of FORCE OFF?

Thank you in advance for your help!

Parents Reply Children
Related