Pressing button fast leads to 20uA current consumption in system_on sleep mode.

Hello,

I use nRF52832 and SDK 17.02.

I use app_button library to detect and handle button pressing.

Everything works fine except that I have a testcase that is to press the button very fast like 2~3 times per second.

After handling the button event, it should get into the SYSTEM_ON sleep mode, which is about 2uA current consumption, which is normal for slow speed button pressing.

However, when pressing the button very fast, then when the system gets into SYSTEM_ON sleep mode, it can get higher current consumption, about 20uA.

I wonder what caused the 20uA current? 20uA seems to be some peripherals is enabled during the sleep, I wonder if it is GPIOTE in app_button?

Is it possible that the button_event_handler got nested entered, and something went wrong?

One more thing: I didn't use the external 32KHz LF clock, I used the internal 32KHz RC clock in this case.

Have you encountered the same problem? or if you have any ideas please share with me.

Thank you.

Jiayan

Parents Reply
  • Hi, I think I have found the problem, but I need the guide of how to fix it.

    What I have found is, the CPU gets into SYSTEM ON sleep while the EVENTS_COMPARE[0] register of RTC1 (app_button's timer) is set. (I have a screen shot of KEIL register viewer)

    Isn't it possible that app_button library doesn't clear the EVENTS_COMPARE[0] register under this case?

    And I wonder if there is a proper way to clear it? I have read the datasheet, the RTC's TASK_CLEAR only clear the RTC counter register.

    Thank you.

Children
Related