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

NRF52840 unable to use reset pin (P0.18) as GPIO

Hi!

I'm working with a custom board, where pin p0.18 is connected to an external button.

I've read several posts, including this one which say that one must remove the 'CONFIG_GPIO_AS_PINRESET' flag from the preprocessor configuration and then reset the board and flash it again.
This does not seem to work.

What I did:

1. Measure voltage on P0.18 with CONFIG_GPIO_AS_PINRESET --> it is 'high'.

2. Remove the 'CONFIG_GPIO_AS_PINRESET' flag from the preprocessor, clear the board with nrfjprog -e and/or nrfjprog -f nrf52 --recover

3. recompile and re-flash the board with the newly compiled code

What I see:

1. Default voltage to P0.18 is now 'low', which is good. it indicates some change to the pin behavior.

2. Setting pullup or pull down does not affect default pin voltage. The voltage remains 'low' regardless of pull direction defined in the configuration.

3. BSP example with P0.18 set as one of the buttons does not work either.

4. Other GPIOs do work when placed in the BSP example, without any other change being done.

What needs to be done to P0.18 so it can be used as GPIO? What limitations are there on this pin both in 'reset mode' and 'GPIO mode'?

Can it be used with both pull up and pull down in both these states?
I understand it can only be used as Active low when in 'reset mode'- I just want to make sure this correct.
Can it be used as active high if in 'GPIO mode'?

Thanks!

Parents Reply Children
No Data
Related