I am using nRF52832 and want to include BLE-NFC pair feature in the application that i am trying to develop. I am using SDK v14.2, Segger embedded studio as compiler and Softdevice version v5.0 on a windows platform.
Setup: Initially, i tried example ble_app_hrs_nfc_pairing and included ble nus service to it on nrf52 DK (PCA10040, v1.2.1). It worked perfectly well. So now, having tested the functionality i tried porting the same on to my custom board to evaluate the ble-nfc pairing feature.
Problem: There is no error during compilation. But when i try to bring a smartphone near to the board to test the pairing, NFC is not at all working. While debugging, i see that the NFC_IRQHandler is not called, so seems like NFC field is not detected so as to start sensing and pairing.
I checked the peak to peak differential threshold voltage to see if the voltage level is too low for NFC to sense the field, but that is also fine (around 2.4 V, once i bring in the smartphone near to the NFC antenna).
Could anyone of you please let me know what could be the reasons that NFC is not able to work? Or any configurations/ macros i might have missed to support the feature?
Any help is appreciated.
Hi, i have also set CLOCK_ENABLED to 1 as mentioned in some of the forums here, but still NFC is not detected.
Have you seen this? http://infocenter.nordicsemi.com/pdf/nwp_026.pdf It could be as easy as the antenna isn't resonating at the correct frequency.
Thank you ketiljo for that link. However, after discussing this with the electronics design guy, he told that we are using the same values for the capacitance as those on the nRF52 DK (PCA10040 board). We are using the same antenna which comes with DK too.
Will it not show the same behavior if we are going to use exactly the same values and antenna? Please advise.
Another question that i had here is that if the antenna frequency is not tuned, then when we bring the smartphone in the NFC range, should there be any spike in the voltage? I ask this because i see a spike in the voltage level on the oscilloscope when i try to pair via NFC :(
Do you have a 32 kHz crystal on your board? The DK has one so if you don't and haven't configured your FW to use the 32 kHz RC oscillator, it will fail.
If the antenna is identical, you could use the same capacitor values
Yes, we have 32KHz crystal on our board. And looking at the sdk.config.h file, it's using XTAL clock source.
// <0=> NRF_CLOCK_LF_SRC_RC // <1=> NRF_CLOCK_LF_SRC_XTAL // <2=> NRF_CLOCK_LF_SRC_SYNTH
#ifndef NRF_SDH_CLOCK_LF_SRC#define NRF_SDH_CLOCK_LF_SRC 1#endif
If i change the value to 0 to have RC clock source, ble_stack_init() throws an Invalid param error. :(
Looking into the ble_app_hrs_nfc_pairing example, i found the value of LF_SRC to be 1 too.