This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Optimizing consumption on nRF52 running TWI

Hi guys,

 

I'm thinking of implementing consumption optimization on a system that runs on nrf52832 with S132 SDK 16.

 

The idea is to call nrf_pwr_mgmt_run() to put our device into low power mode every time we can.

 

  1. The catch is that we’re using TWI functions, so, is it possible to call nrf_pwr_mgmt_run() right after a nrf_twi_mngr_schedule() call?
    1. From my understanding we should be able to, since it seems to be protected to wait for any pending event with sd_app_evt_wait()
  2. If its possible, the device will enter low power down mode after the end of the TWI translation(master->slave tx)?
  3. Will the mcu wake up to run the TWI callbacks (called when we have rx) without me creating a timer?
    1. Because I’ll be scheduling several TWI transactions on different addresses but ideally I only want to wake once (for the lowest consumption possible)

Cheers,

Jorge

Parents
  • Hi Jorge

    1. I don't see how this would make much sense, as the nrf_twi_mngr_schedule() call will start a new transaction if currently idle, so if it is idle it would immediately just start the TWI transaction. Then, when it is done, it would make sense to call the sd_app_evt_wait() function after the TWI transaction is completed.

    2. The device should indeed go to low power mode after the TWI transaction. But you need to wait for it to finish successfully before calling the sd_app_evt_wait().

    3. The device will/should be awake for the TWI transaction, and only go to sleep inbetween, when the device doesn't have anything to do (is idle).

    Best regards,

    Simon

Reply
  • Hi Jorge

    1. I don't see how this would make much sense, as the nrf_twi_mngr_schedule() call will start a new transaction if currently idle, so if it is idle it would immediately just start the TWI transaction. Then, when it is done, it would make sense to call the sd_app_evt_wait() function after the TWI transaction is completed.

    2. The device should indeed go to low power mode after the TWI transaction. But you need to wait for it to finish successfully before calling the sd_app_evt_wait().

    3. The device will/should be awake for the TWI transaction, and only go to sleep inbetween, when the device doesn't have anything to do (is idle).

    Best regards,

    Simon

Children
Related