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

Ways to drive nrf52840 Port0 Pin 9 (P0.9 NFC) as GPIO?

Are there any ways/workarounds/configurations to drive P0.9 on nrf52840 as an Input/Output instead of just being NFC pin.

Technically we should be able to drive this pin as an GPIO pin but there is not any output or input generated at this pin.

Any suggestions will really be appreciated.

Thanks in advance.

Note: Please do not suggest to just use another GPIO pins. I specifically want to know if there are any ways to drive the NFC pins as GPIOs.

Parents
  • Hi

    NFC can be disabled and GPIOs enabled by defining the CONFIG_NFCT_PINS_AS_GPIOS variable in the project settings. How you do this depends on what IDE you're using.

    • If you're using SEGGER Embedded Studios, go to Project>Edit Options>Cod>Preprocessor>Preprocessor Definitions and add the CONFIG_NFCT_PINS_AS_GPIOS variable.
    • If you're using Keil µvision, go to Project>Options for Target> C/C++>Preprocessor Symbols>Define and add the CONFIG_NFCT_PINS_AS_GPIOS variable.

    You can also check out these instructions for a more in-depth explanation.

    Best regards,

    Simon

Reply
  • Hi

    NFC can be disabled and GPIOs enabled by defining the CONFIG_NFCT_PINS_AS_GPIOS variable in the project settings. How you do this depends on what IDE you're using.

    • If you're using SEGGER Embedded Studios, go to Project>Edit Options>Cod>Preprocessor>Preprocessor Definitions and add the CONFIG_NFCT_PINS_AS_GPIOS variable.
    • If you're using Keil µvision, go to Project>Options for Target> C/C++>Preprocessor Symbols>Define and add the CONFIG_NFCT_PINS_AS_GPIOS variable.

    You can also check out these instructions for a more in-depth explanation.

    Best regards,

    Simon

Children
  • This does not work..

    Im using a nrf52840 , Segger with the nrf SDK.

    How do I use the NFC pins as GPIO ? There must be a simple solution to this.

    Ive added #define CONFIG_NFCT_PINS_AS_GPIOS 1 to the sdk_config.h and also I added the CONFIG_NFCT_PINS_AS_GPIOS here

    When I check the nrfjprog --memrd 0x10001000 --n 512, Im getting all F's

Related