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

Putting the device in low power mode

I am developing code for nrf52832 to read data from a connected sensor on I2C. There are two scenarios I am trying to save power: 

1- During the initial power up, I have to enable the sensor (nrf52832 asserts sensor EN pin) and then wait 50ms for it to warm up and initialize itself. 

2- During reading sensor data, I have to send measurement command on I2C, and then wait ~2.4 seconds for sensor to assert nRDY pin. Then nrf52832 collects data from the bus. 

What is the best practice to save power during these wait periods. How can I sleep the device when it is waiting for the sensor instead of using nrf_delay_ms() to wait 50ms in the first scenario and 2.4s in second scenario.  

Parents
  • Hi

    1. I'm not sure I understand the question here, during initialization there's not much to do except waiting for the devices to initialize and get ready to transmit.

    2. When the device is going to wait for 2.4 seconds I think it would be best to go into IDLE mode during this time with and be in a sleep state "system ON" mode. This is done differently depending on what SDK you're using for development. Are you using the nRF5 SDK or the nRFConnect SDK? It might also be best to stop and uninitialize the I2C peripheral while in sleep mode as well, but you should test this to see what is the best procedure in your specific use case.

    Best regards,

    Simon

Reply
  • Hi

    1. I'm not sure I understand the question here, during initialization there's not much to do except waiting for the devices to initialize and get ready to transmit.

    2. When the device is going to wait for 2.4 seconds I think it would be best to go into IDLE mode during this time with and be in a sleep state "system ON" mode. This is done differently depending on what SDK you're using for development. Are you using the nRF5 SDK or the nRFConnect SDK? It might also be best to stop and uninitialize the I2C peripheral while in sleep mode as well, but you should test this to see what is the best procedure in your specific use case.

    Best regards,

    Simon

Children
Related