I have a Nano BLE and I wish to make use of the NFC-A Tag feature of the nRF52840.
The store page Arduino Nano 33 BLE — Arduino Official Store makes mention of the feature "The main processor includes other amazing features like Bluetooth® pairing via NFC and ultra low power consumption modes."
But it does not mention NFC in the tech specs.
The pinout diagram does not show the underside of the board but the PDF full pinout diagram does.
Here on the PDF it tells me that... "Making a short circuit using the solder jumper allows only the function in the SJ Pin cells and also it changes the Pad connection of the pins D7 and D8 in P0.09 and P0.10."
Then what... I tried searching on the Arduino website and nothing comes up in terms of libraries, tips, advice etc. There is nothing on the getting started guide for the nano BLE board.
Is there any official or supported NFC Tag library that I can use?
I am also wondering if I soldered my shielded wire leads from my NFC Tag antenna directly onto the solder pads on the underside of the board, I assume I can use P0.09 and P0.10 in my code (this would free up D7/D8). If I can do so what would be the naming convention etc. that would be suitable for an Arduino library.
I went to Boards Manager and searched for "nRF52" devices.
I see there is an Arduino nRF52 Boards option (Arduino Primo).
When you download this board into the Arduino IDE, I see this offers an NFC library option as a core library for the Arduino Primo.
However, when I choose my Arduino Nano BLE 33 board this library is not shown. It does not even show up in the "Incompatible" option.
So, it sounds like most of the work has already been done, but the way the nRF52 boards and libraries are configured none of these show up for the new Nano BLE board.
gerrikoio:
I assume I can use P0.09 and P0.10 in my code (this would free up D7/D8). If I can do so what would be the naming convention etc. that would be suitable for an Arduino library.
These pins aren't defined as Arduino pins, so I think the only way to use them with Arduino IO functions would be to add those pins to the end of the g_APinDescription array in variant.cpp:
The Arduino pin number is the index of the array, so they can now be accessed as Arduino pins 34 and 35.
You also have the option of using the Mbed OS API to control these pins, which does not require any modifications to the Arduino nRF528x Boards (Mbed OS) platform source code. Here's an example of blinking P0.09:
Thanks for the feedback regarding the use of P0.09 and P0.10. That's really promising especially with this use of mbed.... I think I will start by trying use the mbed nfc library to avail of the nfc functionality, so this fits quite nicely.
I also discovered that I can use the "using namespace mbed;" option to make my code easier to read etc.
Another confusing bit for me is whether I need to define the path for the various components of the mbed nfc library, such as the ndef part.
I am trying to use the NFC library and examples as provided with the Nordic nRF52 SDK (using version 15.0).
I am getting loads of warnings such as: #warning No configuration for LF clock source. Xtal source will be used as a default configuration.
I have verbose compile setting on and so when it says "Linking everything together..."
I get an error saying that my code has this undefined reference to `nfc_t2t_setup' - this function is found within nRF52 SDK - t2t_lib/nfc_t2t_lib.h which I have included in my library src folder. This has an associated assembler (precompiled) file. So for some reason it does not like the "nfc_t2t_lib_gcc.a" file.
My library header is:
I've seen some libraries add additional settings to the "library.properties" file, such as a "precompile=true" and there other "make" files to resolve but this is too advanced for me.
I was looking at the Particle.io Argon/Xenon nRF52840 NFC code implementation. Their code works pretty well, so I know it doable but it does look rather involved.
Just to mention, I thought that the Particle.io code have implemented a great way of handling the callback event by inserting multiple callbacks for the different events. This allows you to create your own custom behaviour to any of the particular NFC standardised event attributes (as defined by nRF52840 library).
In my opinion, NFC code and examples should be part of the core NanoBLE library to avoid version control issues with the nRF52 SDK/library. In much the same way as Arduino did it for the old Primo board.