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

Problem by waking up from Power Off

During Power Off mode the nRF52 GPIOs stay retained. But by waking up on a external Pin we can see another Pin toggles for approx. 600ns. It seems this happens during the reset. The Pin which toggles is configured as output. The Pin toggles before the startup code is reached!?

Setup: Device: nRF52 Preview Development kit Soft device: s132_nrf52_1.0.0-3.alpha_softdevice.hex Used Pins: SRDY = (SPI Slave Ready): 8 MRDY (SPI Master Ready): 7

I think we do configure the Pins in a correct way.

/* Configure SRDY as Output with init HIGH */ nrf_drv_gpiote_out_config_t out_config_SRDY = GPIOTE_CONFIG_OUT_SIMPLE(true); err_code = nrf_drv_gpiote_out_init(SRDY_OUT_PIN, &out_config_SRDY); APP_ERROR_CHECK(err_code);

=>S0S1 and pin which one wakes the nRF52:

/* Configure Input Pins ==> MRDY */ nrf_drv_gpiote_in_config_t in_config_MRDY = GPIOTE_CONFIG_IN_SENSE_TOGGLE(false); in_config_MRDY.pull = NRF_GPIO_PIN_PULLUP; err_code = nrf_drv_gpiote_in_init(MRDY_IN_PIN, &in_config_MRDY, SSSP_mrdy_in_pin_handler); APP_ERROR_CHECK(err_code);

I measured the behavior with a oscilloscope again. Attached are the pictures. So you can see the behavior in more detail. We tried it with different Pins but at every Pin we do have the same behavior as described. The behavior of the GPIOs are looking like discharge curves! Again this all happens before the first statement in the startup code. Maybe there is a bug in the preview hardware? I also measured the power supply, but the power supply is always constant. So there is no issue with the power supply!

image description

image description

Parents
  • Hi, The likely problem is that all peripherals except the GPIO is reset after system OFF. This is what happens:

    When you go to system off the pad will latch and retain configuration it get from the peripheral (which wins). This configuration will be kept as long as it’s in system off. When the system wakeup the peripheral will power up, and pad will also wakeup. Now, since the peripheral is reset, and no longer request the pad, the pin configuration will decide how the pad behave and the configuration will change.

    So our recommendation is to configure the GPIO pin configuration and level to the same configuration as you want the peripheral to use the pad before going to system off. That way when the system wakeup, it will will fall back to the GPIO configuration and level. So make sure to set PIN_CNF[] and OUTSET/OUTCLR to the same level as the peripheral using the pin before going to system off, for instance by using the api in nrf_gpio.h.

Reply
  • Hi, The likely problem is that all peripherals except the GPIO is reset after system OFF. This is what happens:

    When you go to system off the pad will latch and retain configuration it get from the peripheral (which wins). This configuration will be kept as long as it’s in system off. When the system wakeup the peripheral will power up, and pad will also wakeup. Now, since the peripheral is reset, and no longer request the pad, the pin configuration will decide how the pad behave and the configuration will change.

    So our recommendation is to configure the GPIO pin configuration and level to the same configuration as you want the peripheral to use the pad before going to system off. That way when the system wakeup, it will will fall back to the GPIO configuration and level. So make sure to set PIN_CNF[] and OUTSET/OUTCLR to the same level as the peripheral using the pin before going to system off, for instance by using the api in nrf_gpio.h.

Children
No Data
Related