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

Stuck on power down due to GPIO

Hello,

We are using a nRF52832(peripheral) on a custom board and connecting it to a nRF51822(Central). The nRF52 has one GPIO connected to a button which is used to power down and power on the chip and all the components of the board. In the function for powering down the board, another GPIO which is used to switch the power to the board is set. 

void shutdown()
{
    //Few lines of nrf_gpio_pi_set and clear to power down other components
    
    nrf_gpio_pin_set(PIN);//PIN here refers to the GPIO which switches the power. This line causes the issue.
    
    nrf_gpio_cfg_sense_input(BUTTON, NRF_GPIO_PIN_PULLUP, NRF_GPIO_PIN_SENSE_LOW);//To power on the board
    
    sd_power_system_off();
}

The power toggling works perfectly when the board is not connected to the nRF51822. After connecting the board to the nRF51, the power toggling works few times but after that it gets stuck. The board has to be reprogrammed or reset for it to continue working. On debugging the board, the program stops when a nrf_gpio_pin_set(PIN) is called. 

The code does not have any flash operations and I have read the FICR, UICR and Code sections before(when the board is working normally) and after(when the board is stuck) the issue. On running a diff, the files are identical.

Thank you

Gowtham

Parents Reply Children
No Data
Related