This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

active current TWI

Hello,

i am measuring the current on my nrf51822 board. While sending messages over I2C i have a current about 4.4 mA.

This should be correct? The CPU, 1v2, hfclk and i2c are using during the send/receive?

Greets Matthias

  • From the description of what you have running, then yes, you should see a current consumption around what you measure. If you need to lower it then perhaps you can shut down the MCU for longer periods or at least put into power down during transmissions.

  • I have the softdevice running with only wait_for_event(); in the rtc interrupt i enable the twi, read the value of the sensor, send command for measurement and disable the twi immediately after sending. can i reduce the current while sending? As the softdevice is handling the power management itself? Of course i like to reduce power, please tell me how i can reduce it. Tanks Matthias

  • Which code example and from what SDK and Softdevice are you using? In the recent SDK it's called sd_app_evt_wait(), but should be same behavior. Since you are using softdevice, yes, the softdevice will handle this on it's own. When you run sd_app_evt_wait() the MCU will power down if possible (no interrupts), but as you are doing the TWI, I guess this could occur fairly often/quick. Do you get a success back from your wait_for_event()? Are you able to monitor the current consumption with an oscilloscope to see if there MCU actually powers down?

  • i am using s110 softdevice. sd_app_evt_wait() is the right one and im using an oszilloskop to measure the voltage~current. only while the twi is active the current is as high as described and the rest of the time its okay. i use a self writte code because all the examples you offer are not power saving. Until now i used loops like below(of course the cpu is not shutting down then). i tried to insert the sd_app_evt_wait() but i dont know how to enable the events/interrupts while s110 is enabled which i asked here

    	{
    while(NRF_TWI1->EVENTS_TXDSENT != 0x1)
    {
    	//sd_app_evt_wait();
    }
    
    NRF_TWI1->EVENTS_TXDSENT = 0;
    
    }
    
Related