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

Parents
  • 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 {
        gpio-as-nreset;
    };

    You can use the <YOUR_NCS_FOLDER>\zephyr\boards\arm\nrf52840dk_nrf52840\nrf52840dk_nrf52840.dts as reference here.
    Best regards,
    Simon
Reply
  • 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 {
        gpio-as-nreset;
    };

    You can use the <YOUR_NCS_FOLDER>\zephyr\boards\arm\nrf52840dk_nrf52840\nrf52840dk_nrf52840.dts as reference here.
    Best regards,
    Simon
Children
  • 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.

Related