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
  • It's on a development board where I don't have good access to the pin, at least not with all the motion I need to subject the board to in order to get it to wake from sys off, so it's not going to be possible to hook up my logic analyser. But I do have an LED on the board showing the state of the pin and whether the modem has power. If I run gdb and let it break at the top of main, the pin has already gone low by then. None of my code has executed, so it's not something I'm doing in my code that has set it low.

Reply
  • It's on a development board where I don't have good access to the pin, at least not with all the motion I need to subject the board to in order to get it to wake from sys off, so it's not going to be possible to hook up my logic analyser. But I do have an LED on the board showing the state of the pin and whether the modem has power. If I run gdb and let it break at the top of main, the pin has already gone low by then. None of my code has executed, so it's not something I'm doing in my code that has set it low.

Children
No Data
Related