Hi, i would like to implement a very low power counter and used the template from this post. I've modified the example and used TIMER2 in counter mode triggered by LPCOMP through PPI. This worked fine and results in 13uA for any number of counts. After this i've implemented a TWI sensor and the power consumption increases to 450uA, even when no sensor is connected to the DK.
I'm using a NRF52 DK and the Power Profiler Kit to measure the consumption. It makes no difference if i use TWI0 or TWI1. I've tested also in SPI Master mode on SPI1 without TWI1. It has the same effect. Changing from SPI1 to SPI2 solved the Problem with SPI. Unfortunatly i need to use SPI and TWI.
attached you will find the code for nRF5 SDK 11.0.0. timer_counter_mode_low_power_new.zip
In main() you may either comment out the line NRF_TIMER2->TASKS_START = 1; and keep the line I2CScanDEvices(); or vice versa to have a low consumption.
When you keep both lines active it results in the high consumption. Where does it come from? Do i need to start the timer in counter mode?