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

nRF52832 P0.21/RESET pin

Hi,

How is the functionality of P0.21 in nRF52832? It is configured as RESET after turning on the device, right? Is there any way to change it in a way that that the chip starts working even when this pin is low?

-Vala

  • Yes it's in the manual. Set PSELRESET registers and reset the chip. They are retained and will disable reset.

  • Hi,

    Please tell me if I'm doing anything wrong with disabling the RESET. Using nrfjprog I erase the UICR and after that the all the registers including two PSELRESET registers are set to 0xFFFFFFFF:

    nrfjprog --eraseuicr --family nrf52 Erasing UICR flash area. Applying system reset.

    nrfjprog --memrd 0x10001200 --family nrf52 0x10001200: FFFFFFFF |....|

    nrfjprog --memrd 0x10001204 --family nrf52 0x10001204: FFFFFFFF |....|

    But when I restart the device it again does not start executing until I manually set the P0.21 pin. Any idea?

  • So if you read back the values are they still FFFFFFFF? If not then something must be rewriting them

    you probably have CONFIG_GPIO_AS_PINRESET defined.

  • Thanks for your answer RK. You are right. Here is what I get: nrfjprog --eraseuicr --family nrf52 Erasing UICR flash area. Applying system reset.

    nrfjprog --memrd 0x10001200 --family nrf52 0x10001200: FFFFFFFF |....|

    nrfjprog --memrd 0x10001204 --family nrf52 0x10001204: FFFFFFFF |....|

    nrfjprog --memwr 0x100010FC --val 0x00000001 --family nrf52 Parsing parameters. Writing.

    nrfjprog --memrd 0x100010FC --family nrf52 0x100010FC: 00000001 |....|

    nrfjprog -r --family nrf52 Applying system reset. Run.

    nrfjprog --memrd 0x10001204 --family nrf52 0x10001204: 00000015 |....|

    nrfjprog --memrd 0x100010FC --family nrf52 0x100010FC: 00000001 |....|

    After the reset the value of PSELRESET is again 0x00000015. It's interesting because I do not have anything more than a couple of lines for toggling the IOs in my code, which is a modification of the blinky example. Is there anything else I should check?

Related