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

Prevent GPIO change in bootloader

My custom nRF52840 board uses the STmicro STM6601 push-button controller. To keep the nRF powered, the PSHOLD line must be kept high. I have a GPIO set as an output for that.

I am trying to incorporate the Open bootloader in my code.

Obviously using a reset (hard or soft) will change that GPIO to an input, causing the PSHOLD line to go low.

I can successfully call the boot loader directly without a reset, but it seems to reset the GPIO pin to an input anyway.

I would like a suggestion on how to keep that GPIO set through the bootloader initialization.

Where in the Open bootloader process does it reset the GPIOs?

Parents Reply
  • Sorry for a late response, I was on vacation. 

    When the pin set to input (the default state after reset), it's floating so it can be low. Have you tried to connect it to a pull up resistor or a capacitor ? 

    The reset pin is not bidirectional. You can check if which reset reason was the last reset by reading RESETREAS register. Please refer to chapter 18 in the nRF52832 product spec. 

Children
Related