To tune the Near Field Communication (NFC) antenna with the varying the frequency method , the NFC module in the nRF52832 System on Chip (SoC) must be enabled, and the internal variable resistor RIN_OHM must be set to a fixed value using the register value RIN_REGVALUE.
It consists of running the following commands:
Nfc_settings.bat for nRF52832:
nrfjprog -f NRF52 --memwr 0x40005668 --val 15
nrfjprog -f NRF52 --memwr 0x40005650 --val 4
nrfjprog -f NRF52 --memwr 0x40005000 --val 1
Nfc_settings.bat for nRF52840 and nRF52833:
nrfjprog -f NRF52 --memwr 0x4000568C --val 0x38D48
nrfjprog -f NRF52 --memwr 0x40005000 --val 1
When the tuning is finished, RIN_REGVALUE has to be set to automatic again by disabling the overriding of RIN_REGVALUE. This can be done by power-cycling the device or by setting the override registers to "0".
nrfjprog –f NRF52 –memwr 0x40005668 --val 0
nrfjprog –f NRF52 –memwr 0x40005650 --val 0
The purpose of RIN_REGVALUE is to maximize the voltage between the pins NFC1 and NFC2, while not exceeding VDD. For a fixed swing, a large value of RIN_REGVALUE means high current in the LC-circuit and into the pins NFC1 and NFC2, and a small value of RIN_REGVALUE means low current.
When the NFC module is enabled, a DC voltage can be measured between the NFC1/NFC2 pins and ground. The following table shows the voltage between NFC1/NFC2 and ground when the NFC module is enabled and disabled:
NFC module | Voltage |
---|---|
Enabled (TASKS_ACTIVE) | Approximately 0.45 * VDD |
Disabled (TASKS_DISABLE) | Approximately 0 V |