I recently had the need to communicate with a device over I2C. I'm using the nRF52 as the master. Everything works fine, but power is a concern. I am putting the processor into the ON low power mode. Currently, I'm typically running at around 120 uA, as measured with a Current Ranger. I'm measuring the current at the external power input to the PCA10040 board (P21). I wrote my own I2C driver, as I have with all my drivers.
I have a timer (RTC) that periodically (3-30 seconds, depending on various factors) initiates a communication with the external part over the TWIM interface. The actual communication exchange takes no longer than 60 ms at 400 KHz bus speed. I'm switching this external part on and off using a GPIO pin around the exchange. The first exchange happens 10 seconds after power up.
Before the first communication, my current consumption is about 120 uA. After the first communication, the power consumption is about 400 or so uA higher and it remains there. It certainly seems like after turning on the TWIM instance and then turning it off, it is not returning to the same state. I'm turning the TWIM on and off using the ENABLE register.
Is there something I need to do with the EasyDMA that I need to know about? I'll post a couple of code snippets.