Hardware reset doesn't work

Hi there,

I have a custom board featuring the nRF52840. This is the relevant part of the schematic.

When pressing SW1, the SoC doesn't get reset. Seemingly, it's as if I hadn't pushed the button. Why is that?

Thanks in advance!

- Laci

  • Hi

    What have you programmed your custom board with here? Your .dts or .overlay file will need to have the following set in your board file to set the GPIO as a reset pin, so that could be one explanation as to why it's not doing anything: 

    &uicr {

    You can use the <YOUR_NCS_FOLDER>\zephyr\boards\arm\nrf52840dk_nrf52840\nrf52840dk_nrf52840.dts as reference here.
    Best regards,
  • 2024-05-26 edit: gpio-as-nreset is still necessary! In the past, after using it, then removing it from the devicetree and reflashing the firmware, RESET worked without its presence, so I assumed it was redundant. But I've just tried new boards on which RESET didn't work without gpio-as-nreset being set previously. So when gpio-as-nreset is present, RESET gets enabled; when it's not, the UICR RESET flag is unchanged, which is by default false.

    Hi Simon,

    The behavior of RESET is independent of the provided device tree block. Is it possible that gpio-as-nreset is enabled by default?

    Luckily, I think I have found the cause. Hardware resets are always reliable after replacing the 10K resistor on the RESET line with a 0-ohm resistor.

    For comparison, this is the schematic of the nRF52840 USB dongle:

    nRF528-DK schematic:

    I don't know what made me add a 10K resistor, but I think it was unjustified. Do you agree that this is the cause of the issue?

    Should I add a capacitor according to the dongle schematic? My product seems to be reliable without it.

  • Hi

    Okay, glad to hear you were able to figure it out. Most likely you thought it's better to have a pull-up too many than too few and added it. I agree that it is not necessary and that your solution should work just fine. For our board files in the device tree, the gpio-as-nreset is indeed enabled by default. I was just thinking if you had made a board file or overlay on your own that this might have been missing.

    Let me know if this case can be closed then, or if you have any follow-up questions.

    Best regards,