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

Which GPIO is used to wake up NRF52832 from System_Off

Hi,

I use a board from Adafruit with NRF52832 to make a POC (Proff Of Concept) (Adafruit Feather nRF52 Bluefruit LE - nRF52832 - PRODUCT ID: 3406).

I use the Arduino IDE and a library "LOW POWER" for NRF52832 (https://github.com/mristau/Arduino_nRF5x_lowPower).

I have 5 push buttons connected to the GPIO pins : 16,15, 7, 11 and 27 which supports interrupts.

Today I use the "deep sleep mode" of the NRF52832 (System_Off) and I attach interrupts to the GPIO ports 16,15,7,11,27 to wake up the module NRF52832. And all running very well.

But now I need to go further, and I need to read/know what GPIO port has been used to wake up the system, the 16, 15,7, 11 or 27?

I tried to read the state of this digital port, but it runs only if you keep the button pushed a "long time" (the necessary time to wake up and setup the NRF52832). And in the real life, for my POC, it's not possible to keep the button pushed.

I need your help to know if it's possible with NFR52832 to know what GPIO:interrupt wake up the system when the device is in POWER_MODE_OFF?

And if it's possible, can you send me samples code to help me?

Thank you very much for your hepl.

Best regards.

Parents
  • Hi,

    There is no way to know this except to check the state of the GPIO after wakeup/reset. The startup time from OFF to CPU is 16.5 us, you should have a quick hand to release the button before you are able to check the state. What kind of startup time are you seeing? Maybe you need to move the GPIO checking earlier in the program? I'm not sure what kind of startup delay the Arduino libraries will add to the chip startup time.

    Best regards,
    Jørgen

  • Hi Jorgen,

    Thanks a lot for your reply and your help. I don't have a bionic hand ;o). I already move my GPIOs checking at the beginning of my software. The result is the same. You're right, I also think that the problem is with the embedded "bootloader" of Arduino. This bootloader must certainly extend the boot time. I don't exactly measure the boot time, but around between 1 or 2 seconds...
    I newbie and I don't know now if I can use another way to read quickly the GPIOs state. If I read directly the register "RESETREAS" and latch on the Gpio, it will run.
    Other way, learn to use and program with another IDE like KEIL and SDK. But I need to make quickly a proof of concept...

    Best regards,

    Chris

Reply
  • Hi Jorgen,

    Thanks a lot for your reply and your help. I don't have a bionic hand ;o). I already move my GPIOs checking at the beginning of my software. The result is the same. You're right, I also think that the problem is with the embedded "bootloader" of Arduino. This bootloader must certainly extend the boot time. I don't exactly measure the boot time, but around between 1 or 2 seconds...
    I newbie and I don't know now if I can use another way to read quickly the GPIOs state. If I read directly the register "RESETREAS" and latch on the Gpio, it will run.
    Other way, learn to use and program with another IDE like KEIL and SDK. But I need to make quickly a proof of concept...

    Best regards,

    Chris

Children
No Data
Related