Reset Pin as GPIO

I am working on a custom nRF552832 board. I need to use the reset pin (p0.21) as GPIO input.

I am using the NRFConnect plugin on VSCode to develop and program the board.

The issue i am having is that the reset pin is refusing to be disabled so i can use it as GPIO.

In my custom board defconfig i have CONFIG_GPIO_AS_PINRESET=n and when I build the project the .config file has CONFIG_GPIO_AS_PINRESET commented out.

However when i flash the board my VSCode terminal says "Enabling pin reset" and "Applying pin reset".

I am not sure how to get around this any advice is welcome.
Parents
  • Hi Michael - I've been having this same problem with my nRF52840 on its reset pin (0.18). I just found an older ticket that helped me - apparently  the tool that VSCode uses when programming (west flash or whatever) ends up turning it back on.

    I found that if I use JFlash for programming in the merged.hex file from my \build\zephyr directory that suddenly my pin works.

    It's not a great solution, but at least I know my board isn't broken and I can move on. Hope that helps!

    Here's the thread I found:

    devzone.nordicsemi.com/.../

  • Ah - I found a better solution here: https://nrfconnect.github.io/vscode-nrf-connect/guides/build_bind_tasks.html

    About halfway down the page it talks about adding a "softreset" option to the build. It says to add it to your settings.json, but the thing I clicked on when I found this info (somewhere in the VSCode settings) opened up my local project .code-workspace file. Maybe that becomes the settings.json file when you've saved off your workspace as a file like I do.

    Anyway, there was  a part of the file that looked like this:

       "settings": {

          "nrf-connect.applications": [
    I stuck the code in to turn on soft reset between those two lines as follows:
       "settings": {
          "nrf-connect.applicationOptions": {
             "${workspaceFolder}": {
               "flash": {
                 "softreset": true,
               }
             }
           },
          "nrf-connect.applications": [
Reply
  • Ah - I found a better solution here: https://nrfconnect.github.io/vscode-nrf-connect/guides/build_bind_tasks.html

    About halfway down the page it talks about adding a "softreset" option to the build. It says to add it to your settings.json, but the thing I clicked on when I found this info (somewhere in the VSCode settings) opened up my local project .code-workspace file. Maybe that becomes the settings.json file when you've saved off your workspace as a file like I do.

    Anyway, there was  a part of the file that looked like this:

       "settings": {

          "nrf-connect.applications": [
    I stuck the code in to turn on soft reset between those two lines as follows:
       "settings": {
          "nrf-connect.applicationOptions": {
             "${workspaceFolder}": {
               "flash": {
                 "softreset": true,
               }
             }
           },
          "nrf-connect.applications": [
Children
Related