This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How can I disable RESET of P0.21

I have been working on a custom board that uses a taiyo yoden EYSHJNZXZ module. A tact switch is connected between P0.21 and GND. I want to use this switch simple input, but by pushing this switch always result in firmware reset.

Data sheet says that P0.21 is a nRESET pin. Both PSELRESET[0] and PSELRESET[1] have a default value of 0xffffffff, P0.21 is disconnected to nRESET.

I have confirmed that PSELRESET is 0xffffffff by the following commands:

nrfjprog -f NRF52 --eraseuicr
nrfjprog -f NRF52 --memrd 0x10001200 --n 8
0x10001200: FFFFFFFF FFFFFFF

then push a switch that connected to P0.21, that fires firmware reset.

When PSELRESET is 0x00000015 by the following commands:

nrfjprog -f NRF52 --memwr 0x10001200 --val 0x00000015
nrfjprog -f NRF52 --memwr 0x10001204 --val 0x00000015
nrfjprog -f NRF52 --memrd 0x10001200 --n 8
0x10001200: 00000015 00000015

of course, by passing a switch firmware resets.

How can I disable a firmware reset?

Parents
  • Hi,

    You can disable the reset on P0.21 by removing the CONFIG_GPIO_AS_PINRESET define. In Keil you can find the defines in "Options for Target.." -> C/C++ tab.

    Note: It's written into UICR, so remember to do a nrfjprog --eraseall first

  • Thanks.

    I can use P0.21 as a normal GPIO.

    I can not find CONFIG_GPIO_AS_PINRESET in C/C++ tab of uVision dialog, however a project file contains CONFIG_GPIO_AS_PINRESET. So I have deleted those using an text editor.

    I sometimes use Xcode to edit an uVison project file, so something may get wrong...

Reply
  • Thanks.

    I can use P0.21 as a normal GPIO.

    I can not find CONFIG_GPIO_AS_PINRESET in C/C++ tab of uVision dialog, however a project file contains CONFIG_GPIO_AS_PINRESET. So I have deleted those using an text editor.

    I sometimes use Xcode to edit an uVison project file, so something may get wrong...

Children
No Data
Related