I have define CONFIG_NFCT_PINS_AS_GPIOS, but the pin is always low, even if the OUT register is high.
>nrfjprog --memrd 0x1000120C 0x1000120C: FFFFFFFF |....|
I have read 0x1000120C(NFCPINS), it is FFFFFFFF, what's wrong with it?
I have define CONFIG_NFCT_PINS_AS_GPIOS, but the pin is always low, even if the OUT register is high.
>nrfjprog --memrd 0x1000120C 0x1000120C: FFFFFFFF |....|
I have read 0x1000120C(NFCPINS), it is FFFFFFFF, what's wrong with it?
Hi,
You should get the UICR configured correctly if you build your firmware with CONFIG_NFCT_PINS_AS_GPIOS. Did you remember to do a reset after programming the firmware? That is required as the UICR is only read during reset.
1. Firmware can reset by itself, isn't it?

2.If P0.10 have a external pull up, does it have influence?

3.Does DK board can validate this?
When I use DK board(PCA10056), read 0x1000120C(NFCPINS), it is FFFFFFFF;
I use my custom board, read 0x1000120C(NFCPINS), it is FFFFFFFE, Through the reg is right, but the pin is always in low level.
Hi,
great-master said:1. Firmware can reset by itself, isn't it?
Regarding the DK you are right that the firmware should reset the device after writing to NFCPINS. Perhaps the code snippet is never run? Did you define CONFIG_NFCT_PINS_AS_GPIOS for the project (so that it applies to all files), or did you by a mistake define it in just a single file?
great-master said:2.If P0.10 have a external pull up, does it have influence?
The pull-up should not be relevant. If the pin is configured as a GPIO input, it would pull the pin high. But the pull is so low that it would not matter much for the state when the pin is output.
great-master said:3.Does DK board can validate this?
What do you mean? The way you an check from firmware if NFCPINS are enabled is to read the NFCPINS register. And this can be done on the DK or any other board.
Overall, regarding the DK, it is expected that the pins does not work if you read FFFFFFFF from 0x1000120C (NFCPINS). However, on the custom board where you read FFFFFFFE this should work. So there seems to be two issues here, which may or may not have a common cause. Can you share the code you use to configure the pin as output and set it high?
the pin configure code is:
nrf_gpio_cfg_output(9); nrf_gpio_pin_set(9);
I have define CONFIG_NFCT_PINS_AS_GPIOS in Keil MDK C/C++ Preprocessor Symbols
I see. Perhaps there is another issue with your project for instance using the wrong MDK fiels (for instance not using modules\nrfx\mdk\system_nrf52833.c). Perhaps you can upload your project here so that I can take a look? Also, which SDK version do you use?
I see. Perhaps there is another issue with your project for instance using the wrong MDK fiels (for instance not using modules\nrfx\mdk\system_nrf52833.c). Perhaps you can upload your project here so that I can take a look? Also, which SDK version do you use?
I have push it on github jinxiangwzh/nfc_pin_as_gpio_test (github.com)
The project file is in /examples/peripheral/blinky/pca10100e/blank/arm5_no_packs/,the CHIP is 52833
Thanks for you test
Hi,
I looked at your project and did not see any issues with regard to this. Also, when I test it works as expected.
See here from first run after programming, where the pins are NFC as expected:
then I let execution continue and the UICR is updated and reset occurs, and the same breakpoint is hit again:
So far it is as expected. Also, when I check with nrfjprog I get:
C:\Users\eith>nrfjprog --memrd 0x1000120C 0x1000120C: FFFFFFFE |....|
I am not able to explain why you saw 0xFFFFFFFF at 0x1000120C on the DK.
There is one thing though. Assuming this is correctly configured, you still need to do HW modifications to use the pins on the DK, adding a zero ohm resistor as described under NFC antenna interface.
Perhaps there is a similar issue with your custom HW as well, that the GPIO pin is not routed out to where you measure? Can you double check your layout?