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

nRF52 reset behaviour on GPIO output pins

Hi. I have a board here based on the nRF52832, using SD 132 and SDK 13.0.0, with a modem on it that I'd like to keep powered on even when the Nordic is in system off mode. Power to the modem is controlled by a GPIO output pin on the Nordic:

nrf_gpio_cfg_output(MODEM_PWR_EN);
nrf_gpio_pin_set(MODEM_PWR_EN); // Active high.

Some time later I then go into sys off by running:

nrf_pwr_mgmt_shutdown(NRF_PWR_MGMT_SHUTDOWN_GOTO_SYSOFF);

and continuing to run the scheduler after that call.

What I'm seeing is that the modem does indeed stay powered up while I'm in sys off. But I also have an accelerometer hooked up to wake the Nordic on motion:

nrf_gpio_cfg_sense_input(ACCELEROMETER_INTERRUPT, NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_SENSE_HIGH);

and the minute that happens, on the reset, the modem loses its power. If I run the debugger, I know that sys off is only simulated and so perhaps I can expect to see confusing behaviour there, but I've been able to see the same thing happening with the debugger detached.

Other devzone questions imply that the reset behaviour is different when coming from sys off than for other resets, and that this shouldn't happen. When does this pin go low and why?

Parents
  • Any chance to catch the sequence on that GPIO line with fast logical analyzer or oscilloscope? If it realy goes HIGH/LOW/HIGH during wake-up of nRF5x from SYSTEM_OFF then for how long? You can detect this in FW through RESETREAS or GPREGRET registers so then during init sequence of your GPIO output PIN you can avoid certain steps (if they cause change of GPIO line state).

Reply
  • Any chance to catch the sequence on that GPIO line with fast logical analyzer or oscilloscope? If it realy goes HIGH/LOW/HIGH during wake-up of nRF5x from SYSTEM_OFF then for how long? You can detect this in FW through RESETREAS or GPREGRET registers so then during init sequence of your GPIO output PIN you can avoid certain steps (if they cause change of GPIO line state).

Children
No Data
Related