XIAO BLE NFC doesnt work

  1. The Adafruit nRF52 bootloader does not include the XIAO BLE boards definition. You need to add them yourself. I took 0hotpotman0’s changes as a reference and applied it to the latest Adafruit nRF52 Bootloader version. See my git diff file below

    1. build with “make BOARD=xiao_nrf52840_ble_sense” (I assume you have the dependencies like gcc installed)
    2. Double reset the XIAO BLE board and copy the file _build/build-xiao_nrf52840_ble_sense/update-xiao_nrf52840_ble_sense_bootloader-0.7.0-32-g7210c39-dirty_nosd.uf2
  2. It is required to get a NFC Antenna and tune it with the correct capacitors (It won’t work without these capacitors!)

    1. I had a broken nRF52840-dk. So I took the antenna and the required 300pf capacitors from there.
  3. I am not sure here, but it seemed somehow my UICR were protected?? So I required? an eraseall using a SWD debugger. (more info below)

    1. See Nordic Devzone 82798 for more information

      1. Erase all

        1. nrfjprog --eraseall
      2. Check the NFC related UICR. It should return FFFFFFFF and not FFFFFFFE

        1. nrfjprog --memrd 0x1000120C --w 32 --n 4
      3. Flash the adafruit bootloader again after having erase all.

        1. nrfjprog -f nrf52 --verify --chiperase --program _build/build-xiao_nrf52840_ble_sense/xiao_nrf52840_ble_sense_bootloader-0.7.0-32-g7210c39-dirty_s140_7.3.0.hex --reset

Copied this from the Adafruit Feather nRF52840 Sense tutorial on the Adafruit page (Sorry cannot use more than 2 links per post). This made me think I need to eraseall

D2/NFC2: The D2 pin is uses the same pad as one-half of the NFC antenna pins. By default, the nRF52840 Feather ships with these pins configured for GPIO mode, which is done by writing a value to the UICR flash config memory. If you wish to use NFC, you will need to erase the UICR memory which requires erasing the entire chip, and you will need a
[Segger J-Link] to reflash the bootloader and firmware.

This is how my board looks like now.