Demonstration of possible usage of the NFC EEPROM class (including support for ST25DV NFC chip)

Dependencies:   eeprom_driver

Committer:
apalmieri
Date:
Tue Jan 28 16:08:05 2020 +0000
Revision:
6:462737ad2938
Parent:
1:d3ec956b7957
Add ST25DV driver support

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 0:86f202e07059 1 # NFC EEPROM usage example
mbed_official 0:86f202e07059 2
mbed_official 0:86f202e07059 3 Demonstration of possible usage of the NFC EEPROM class.
mbed_official 0:86f202e07059 4
mbed_official 0:86f202e07059 5 The application will write an URL to the EEPROM of the NFC tag on your board. This will be able to be read by any NFC device capable of reading NFC tags.
mbed_official 0:86f202e07059 6
mbed_official 0:86f202e07059 7 The example needs to supply a driver to the eeprom. This example uses the M24SR driver on the DISCO\_L475VG\_IOT01A and target and the PN512 driver on the NUCLEO\_F401RE target. You may wish to add your own driver or update the configuration if you're using a different board.
mbed_official 0:86f202e07059 8
mbed_official 0:86f202e07059 9 # Running the application
mbed_official 0:86f202e07059 10
mbed_official 0:86f202e07059 11 ## Requirements
mbed_official 0:86f202e07059 12
mbed_official 0:86f202e07059 13 Verification of the sample application can be seen on any a smartphone with an NFC reader. After running you will be able to read the tag with an NFC tag reader application.
mbed_official 0:86f202e07059 14
mbed_official 0:86f202e07059 15 Information about activity is also printed over the serial connection - please have a client open. You may use:
mbed_official 0:86f202e07059 16
mbed_official 0:86f202e07059 17 - [Tera Term](https://ttssh2.osdn.jp/index.html.en)
mbed_official 0:86f202e07059 18
mbed_official 0:86f202e07059 19 You will also need to supply the driver for the EEPROM. This example is known to work on DISCO_L475VG_IOT01A which uses M24SR. The driver is downloaded during deployment step (`mbed deploy`). This is based on the contents of the `eeprom_driver.lib` file. The build process will pick up this library and build it as part of the mbed-os build. If you want to use a different driver, please update the contents of `eeprom_driver.lib` to point at the github repository containing the driver.
mbed_official 0:86f202e07059 20
mbed_official 0:86f202e07059 21 ## Building instructions
mbed_official 0:86f202e07059 22
mbed_official 0:86f202e07059 23 Clone the repository containing the collection of examples:
mbed_official 0:86f202e07059 24
mbed_official 0:86f202e07059 25 ```
mbed_official 0:86f202e07059 26 git clone https://github.com/ARMmbed/mbed-os-example-nfc.git
mbed_official 0:86f202e07059 27 ```
mbed_official 0:86f202e07059 28
mbed_official 0:86f202e07059 29 Using a command-line tool, navigate to the exmaple:
mbed_official 0:86f202e07059 30
mbed_official 0:86f202e07059 31 ```
mbed_official 0:86f202e07059 32 cd mbed-os-example-nfc
mbed_official 0:86f202e07059 33 cd NFC_EEPROM
mbed_official 0:86f202e07059 34 ```
mbed_official 0:86f202e07059 35
mbed_official 0:86f202e07059 36 Update the source tree:
mbed_official 0:86f202e07059 37
mbed_official 0:86f202e07059 38 ```
mbed_official 0:86f202e07059 39 mbed deploy
mbed_official 0:86f202e07059 40 ```
mbed_official 0:86f202e07059 41
mbed_official 0:86f202e07059 42 If your board is not a DISCO\_L475VG\_IOT01A or a NUCLEO\_F401RE you should indicate in the configuration which driver should be selected by the build system. Edit `mbed_app.json` which contains the configuration. In the `target_overrides` section add your target configuration. The drivers currently supported are `PN512` and `M24SR`.
mbed_official 0:86f202e07059 43
mbed_official 0:86f202e07059 44 ```json
mbed_official 0:86f202e07059 45 "<TARGET_NAME>": {
mbed_official 0:86f202e07059 46 "target.extra_labels_add": ["<DRIVER_NAME>"]
mbed_official 0:86f202e07059 47 }
mbed_official 0:86f202e07059 48 ```
mbed_official 0:86f202e07059 49
mbed_official 0:86f202e07059 50
mbed_official 0:86f202e07059 51 Run the build:
mbed_official 0:86f202e07059 52
mbed_official 0:86f202e07059 53 ```
mbed_official 0:86f202e07059 54 mbed compile -t <ARM | GCC_ARM> -m <YOUR_TARGET>
mbed_official 0:86f202e07059 55 ```
mbed_official 0:86f202e07059 56
mbed_official 1:d3ec956b7957 57 # Known issues
mbed_official 1:d3ec956b7957 58
mbed_official 1:d3ec956b7957 59 * This example doesn't work with IAR 7.80.