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

External Reset Pin

I have an issue with reseting the board using a hard reset via an external button. The onboard development kit reset works, but I am trying to perform the same task using an external push button. Below is how I have wired it. Note i think it should work as I can reset an arduino using its reset 

I have connected the switch pin to the reset pin on the development board pin. I am supplying the above circuit off 3.3V using the 1k and 10k as an active low push button.

I did some looking on the forums and checked my preprocessor definitions an CONFIG_GPIO_AS_PINRESET is in my definitions.

I am sure I am doing something wrong here, please advice.

Parents
  • Hello,

    I assume you have tried to measure the voltage on "Switch pin" when you hold the button and not. If not, please check that it is actually pulled down by the button press.

    The next thing you need to check is that in your project, the reset button is enabled to actually reset the device.

    Check the system_nrf52.c file in your project. (If you can't find it, what IDE do you use? Segger embedded studio?) As you see, this file will check if CONFIG_GPIO_AS_PINRESET is defined. So make sure that this is defined in your preprocessor definitions. If you are not sure how to check/add this, what IDE do you use?

    Finally. You should know that this file and function is only executed on power on. I don't remember the details on why. Or if it is executed on a normal reset as well. Either way, flash the application containing the CONIG_GPIO_AS_PINRESET in the preprocessor definitions, and try to power cycle the device. Does the reset button work then?

    Best regards,

    Edvin

  • Cheers Edvin,

    I have checked the voltage which does fall low on a button press. Note it also resets an arduino.

    I have attached the reset button wire to the pin labelled reset this is in between the two VDD pins. I have power cycled the board. I have also checked the preprocessor definitions it is included. I could not find a system_nrf52.c but did find a system_nrf52840.c this on line 168 has if defined ((CONFIG_GPIO_AS_PINRESET)) this is true. I am using Seeger.

    Should I try factory resetting the board and re uploading my firmware?

    Thanks

  • Thomas said:
    Should I try factory resetting the board and re uploading my firmware?

     What do you mean by factory resetting it? What kind of board is it? Does it come with a bootloader? Perhaps it doesn't set the reset pin properly?

    How would you normally upload your code to the chip? Perhaps this will shed some light on how this is set up.

    Thomas said:
    system_nrf52840.c

     Sorry, I missed the tag that said you were using the nRF52840.c. Yes. That is the file in that case.

    BR,

    Edvin

  • I upload the code to segger using build and run using segger. What I mean about factory resetting is using the cmd commands nrfjrog -e. I have looked in system_nrf52840.c and it is defined. Also tried cycling the power. Can you confirm the reset pin is active low?

  • The reset pin is active low, yes.

    Have you tried the same FW on the DK? Does the reset pin work there? Even if the rest of the application doesn't work with the DK (since it is adapted to the new PCB), perhaps you can strip it down to only test the reset behavior?

    BR,

    Edvin

Reply Children
Related