NFC Framework and NT3H1201 Device Driver v1.1

Similar documents
ARROW ARIS Board Software User s Guide 27/07/2016

Si7013 Temperature Humidity Driver v1.2

ARROW ARIS EDGE Board Software User s Guide 12/05/2017

ARROW ARIS EDGE Board User s Guide 27/09/2017

ARROW ARIS EDGE S3 Board User s Guide 21/02/2018

ARROW ARIS EDGE LCD Shield User s Guide 03/05/2018

ATWINC15X0 Wi-Fi Add-on Component

ATWINC15X0 Wi-Fi Add-on Component

Renesas PE-HMI1 Synergy S7 with Clarinox SPP Application

BASICS OF THE RENESAS SYNERGY TM

BASICS OF THE RENESAS SYNERGY PLATFORM

Dweet Library VSA User s Guide

BASICS OF THE RENESAS SYNERGY PLATFORM

CONNECTING SERVICES IN IOT DESIGN

6L00IA - Introduction to Synergy Software Package Short Version (SSP v1.2.0) Renesas Synergy Family - S7 Series

BASICS OF THE RENESAS SYNERGY TM

BASICS OF THE RENESAS SYNERGY PLATFORM

BASICS OF THE RENESAS SYNERGY PLATFORM

Quick Start Guide (V1.0 May2015) Dynamic NFC tag expansion board based on M24SR for STM32 NUCLEO (X-NUCLEO-NFC01A1)

SPI Framework Module Guide

BASICS OF THE RENESAS SYNERGY PLATFORM

Kinetis SDK Freescale Freedom FRDM-KL03Z Platform User s Guide

Getting started with the FP-SNS-ALLMEMS1 Bluetooth low energy and sensors software expansion for STM32Cube

Quick Start Guide. STM32 ODE Function Pack for connecting 6LoWPAN IoT Nodes to smartphone through a BLE interface (FP-NET-6LPBLE1)

Getting started with STEVAL-IDB007V1 and STEVAL-IDB008V1 evaluation boards

Quick Start Guide. Dynamic NFC/RFID tag IC expansion board based on ST25DV04K for STM32 Nucleo (X-NUCLEO-NFC04A1) Version 1.

RENESAS SYNERGY PLATFORM

ITM-MKR680. User s Guide. Document ITM-MKR680 User s Guide 02/11/2018

RX Smart Configurator

Renesas DALI Framework Quick Start Guide

Quick Start Guide. Bluetooth Low Energy expansion board based on SPBTLE-RF module for STM32 Nucleo (X-NUCLEO-IDB05A1) Version 1.

HEALTHCARE SOLUTIONS WITH RENESAS SYNERGY PLATFORM

Power Profiles V2 Framework Module Guide

SSP Module Development Guide

AN4869 Application note

ArduCAM CC3200 UNO board

Device to Cloud. Software Hardware Know How

mbed OS Update Sam Grove Technical Lead, mbed OS June 2017 ARM 2017

Hands-On Workshop: ARM mbed

μez Software Quickstart Guide

Quick Start Guide. Long distance ranging ToF sensor expansion board based on VL53L1X for STM32 Nucleo (X-NUCLEO-53L1A1) Version (February 20, 2018)

Getting started with the FP-NET-6LPBLE1 function pack for 6LoWPAN IoT node connection to a smartphone via BLE interface

STM32 Open Development Environment

SSP Module Development Guide

Quick Start Guide. Bluetooth low energy, sensors and NFC tag software for STM32Cube (BLUEMICROSYSTEM3) Version (September 15, 2016)

HEXIWEAR COMPLETE IOT DEVELOPMENT SOLUTION

ARM mbed mbed OS mbed Cloud

Enabling IoT OSs for Intel Quark MCU Platforms: the fast way. OpenIoT Summit Europe Andre Guedes

Getting Started with Thermostat Application for S7G2 and S5D9

User s Guide IoT Microcontroller Development Kit

UM2194. Getting started with MotionAW activity recognition for wrist library in X-CUBE-MEMS1 expansion for STM32Cube. User manual.

EMBEDDED SYSTEMS READY TO USE LECTURE MATERIALS FOR UNDERGRADUATES

The BlueNRG-1, BlueNRG-2 BLE OTA (over-the-air) firmware upgrade

Quick Start Guide. Stepper motor driver expansion board based on L6474 for STM32 Nucleo (X-NUCLEO-IHM01A1) Version 1.

Skkynet Embedded Toolkit for Renesas Synergy

Cypress PSoC 6 Microcontrollers

Quick Start Guide. Sound terminal expansion board based on STA350BW for STM32 NUCLEO (X-NUCLEO-CCA01M1) Version 1.1.

Getting started with MotionPM real-time pedometer library in X-CUBE-MEMS1 expansion for STM32Cube

BASICS OF THE RENESAS SYNERGY PLATFORM

UM2350. Getting started with MotionPW real-time pedometer for wrist library in X-CUBE-MEMS1 expansion for STM32Cube. User manual.

μez Software Quickstart Guide

User s Manual. Renesas Synergy e 2 studio v5.2 or Greater Getting Started Guide

Quick Start Guide. Dual-channel high side driver expansion board based on VPS2535H for STM32 Nucleo (X-NUCLEO-IPS02A1) Version 1.0 (Sept.

Skkynet Embedded Toolkit for Renesas Synergy

Console Framework Module Guide

Quick Start Guide. GNSS expansion board based on Teseo-LIV3F module for STM32 Nucleo (X-NUCLEO-GNSS1A1) Version 2.1 (Nov 9, 2018)

BASICS OF THE RENESAS SYNERGY PLATFORM

Quick Start Guide. NFC card reader expansion board based on ST25R3911B for STM32 Nucleo (X-NUCLEO-NFC05A1) Version (July 14 th, 2017)

Quick Start Guide. High power stepper motor driver expansion board based on powerstep01 for STM32 Nucleo (X-NUCLEO-IHM03A1)

Use of ISP1507-AL Evaluation Boards

Quick Start Guide. Bluetooth Low Energy expansion board based on BlueNRG for STM32 Nucleo (X-NUCLEO-IDB04A1) Version 1.

Version (Apr 28, 2016)

BLE WiFi Gateway. Model: G1. Version: V Contents. Contents Overview... 2

Wi-Fi Framework Module

UM2276. Getting started with MotionSD standing vs sitting desk detection library in X-CUBE-MEMS1 expansion for STM32Cube. User manual.

Getting started with the FP-CLD-AWS1 software package for IoT node with Wi-Fi and sensors, connected to Amazon AWS IoT cloud

Customizable Flashloader Solution for Synergy MCUs

UM1853 User manual. STM32CubeF1 Nucleo demonstration firmware. Introduction

Use of ISP1880 Accelero-Magnetometer, Temperature and Barometer Sensor

AD5669R - Microcontroller No-OS Driver

Getting started with FP-SNS-6LPNODE1 software for IoT sensor node connection to 6LoWPAN networks using sub-1ghz RF

Quick Start Guide. Bipolar stepper motor driver expansion board based on L6208 for STM32 Nucleo (X-NUCLEO-IHM05A1) Version 1.1.

Quick Start Guide SYG-S7G2-MDK. Copyright 2015, Future Designs, Inc., All Rights Reserved

RN2483_Silica Documentation

Rapid IoT prototyping kit: SLN-RPK-NODE

EMBEDDED SYSTEMS WITH ROBOTICS AND SENSORS USING ERLANG

NFC NUTSHELL KIT. MCU Modules USER MANUAL REVISION GMMC GmbH Keywords Abstract. Document information

TWR-KV10Z32 Sample Code Guide for IAR Board configuration, software, and development tools

STERLING-LWB TM STM EXPANSION BOARD USER GUIDE

Quick Start Guide. STM32Cube function pack for IoT sensor node with telemetry and device control applications for Amazon AWS Cloud (FP-CLD-AWS1)

Converting Firmware Projects to CoIde and IAR Embedded Workbench for ARM

RELEASE NOTE. RZ/T1 Group Encoder I/F HIPERFACE DSL application package. Summary. Device that HIPERFACE DSL functionality is checked

BASICS OF THE RENESAS SYNERGY PLATFORM

System Energy Efficiency Lab seelab.ucsd.edu

Use of ISP1807-LR Evaluation Boards

Quick Start Guide. Stepper motor driver expansion board based on L6474 for STM32 Nucleo (X-NUCLEO-IHM01A1) Version 1.2.

EVE2 BLE Datasheet. The EVE Platform features standardized IO, common OS and drivers and ultra-low power consumption.

Getting started with MotionPM real-time pedometer library in X CUBE-MEMS1 expansion for STM32Cube

AN4624 Application note

IAR Embedded Workbench

Transcription:

NFC Framework and NT3H1201 Device Driver v1.1 Quickstart Guide for ARIS board All information contained in these materials, including products and product specifications, represents information on the product at the time of publication and is subject to change by RELOC s.r.l. without notice. Doc: NFC Framework and NT3H1201 Device Driver - Quickstart Guide for ARIS board, Rev: 1.1 1 of 16

Outline 1. Introduction... 4 1.1. Description... 4 1.2. Content... 4 2. Getting started with ARIS board... 5 2.1. Prerequisites... 5 2.2. ARIS BSP... 5 2.3. Creating and building a new project... 5 3. NFC Framework and NT3H1201 Device Driver... 8 3.1. Files required... 8 3.2. Configuration... 9 3.3. Sample code... 13 3.4. Board configuration and connection... 15 3.5. Debugging the project... 16 Doc: NFC Framework and NT3H1201 Device Driver - Quickstart Guide for ARIS board, Rev: 1.1 2 of 16

Revisions REVISION DATE DESCRIPTION STATUS AUTHOR REVISER 0.1 18/07/2016 Document created draft L. Dal Bello 0.2 25/07/2016 Description for library integration draft L. Dal Bello 1.0 27/07/2016 Document released release L. Dal Bello A. Ricci 1.1 18/10/2016 Updates for partner project release L. Dal Bello A. Ricci Disclaimer All rights strictly reserved. Reproduction in any form is not permitted without written authorization from RELOC s.r.l. RELOC s.r.l. HEADQUARTERS Via Borsari, 23/A 43126 Parma (Italy) info@reloc.it www.reloc.it Land +39-0521-1913460 Fax +39-0521-1913461 Doc: NFC Framework and NT3H1201 Device Driver - Quickstart Guide for ARIS board, Rev: 1.1 3 of 16

1. Introduction 1.1. Description ARIS board, developed by RELOC for Arrow Electronics, is a ready-to-use Internet of Things (IoT) hardware and software platform that enables users to get their IoT applications up and running quickly, exploiting the Renesas Synergy development framework. Based on Renesas Synergy S7 MCU with 240 MHz ARM Cortex-M4 core, the ARIS board has a host of features that equip it for IoT operation. Communication with other devices and the cloud is enabled via Bluetooth Low Energy (BLE 4.1/4.2), Wi-Fi b/g/n support as well as an Ethernet 10/100 port. NFC tag functionality is also included along with a crypto bootloader and support for over-theair (OTA) firmware updates. Board sensing capabilities include motion detection, i.e. 3-axes accelerometer and 2-axes gyroscope, environmental temperature and humidity sampling. The Renesas Synergy Platform helps to accelerate IoT designs: a proven combination of hardware and software makes development easier and faster, thus encouraging innovation and product differentiation. The combination of Arrow ARIS board and Renesas Synergy software platform enables developers to reduce time to market and decreases the total cost of ownership of a product over its lifetime. 1.2. Content This document represents a quick start guide for the use of NFC Framework and NT3H1201 Device Driver, released as a Partner Project component, with ARIS board R1.1 (i.e. production release). Please refer to ARIS Hardware User s Guide document for additional information about the ARIS board. Doc: NFC Framework and NT3H1201 Device Driver - Quickstart Guide for ARIS board, Rev: 1.1 4 of 16

2. Getting started with ARIS board 2.1. Prerequisites The following development tools should be installed before trying to use any example based on ARIS board: e 2 studio v5.0.0.043 or later release Synergy Software Package v1.1.1 or later release Please refer to the Synergy Gallery website for more information and for obtaining the required software. 2.2. ARIS BSP ARIS Board Support Package (BSP) provides a default configuration for ARIS board peripherals. ARIS BSP is provided with ARIS software examples, and is available for download at the following link: http://www.reloc.it/download/products/aris/user.aris.1.1.1.zip In order to install it, please unzip the archive and copy the file user.aris.1.1.1.pack in the following directory: %e2_studio_install_dir%\internal\projectgen\arm\packs where %e2_studio_install_dir% is typically the folder C:\Renesas\e2_studio\ 2.3. Creating and building a new project To create a Synergy project with ARIS board as a target, please follow these steps within e 2 studio: Select: File New Synergy Project in the menu of e 2 studio Assign a new project name and select GCC toolchain A license file is required for using Synergy platform, an evaluation license is provided with SSP in the following directory: %e2_studio_install_dir%\internal\projectgen\arm\licenses Please refer to Synergy Gallery website for additional information about obtaining a custom license. Doc: NFC Framework and NT3H1201 Device Driver - Quickstart Guide for ARIS board, Rev: 1.1 5 of 16

Check that correct parameters are selected, according to the picture below: Doc: NFC Framework and NT3H1201 Device Driver - Quickstart Guide for ARIS board, Rev: 1.1 6 of 16

Select the aris BSP and confirm with Finish button: You should now be able to build the project by clicking on the Build button: Compilation should end without any error or warning. You can now start working on the project adding your own code to src hal_entry.c Doc: NFC Framework and NT3H1201 Device Driver - Quickstart Guide for ARIS board, Rev: 1.1 7 of 16

3. NFC Framework and NT3H1201 Device Driver Partner Project components made by RELOC are provided in the Synergy Gallery in binary form; the sample application contains all the required code to build and test the components. This chapter describes how to use the NFC Framework and NT3H1201 Device Driver as an example; all the steps required to include it into a new project will be discussed. 3.1. Files required Both the library (.a extension) and the header files containing the API interface are needed. Starting from the project created in previous chapter, please create two subfolder inside src directory with name nt3h1201_driver and nfc_framework, then copy all the required files. The following file structure should be visible within e 2 studio: Doc: NFC Framework and NT3H1201 Device Driver - Quickstart Guide for ARIS board, Rev: 1.1 8 of 16

3.2. Configuration In order to add the new component to an existing project, some configuration must be performed. Open configuration.xml and add a new thread to the project: You can change the name of the new thread and associated symbol in Properties panel; please change the values matching the following picture: In order to use a thread we need to enable the RTOS: select the BSP tab, property RTOS being used must be changed to ThreadX : Doc: NFC Framework and NT3H1201 Device Driver - Quickstart Guide for ARIS board, Rev: 1.1 9 of 16

Return back to the Threads tab and press the button in Sensor management Stacks to add a new Framework, selecting Connectivity I2C Framework Device on sf_i2c. Select the highlighted component to add a new I2C driver, New I2C Driver on r_riic : With the component still selected, change Channel to 1 (the chip is connected to I2C channel 1 on the ARIS board) and set Slave Address to 0x55 (unique identifier of the NFC tag on I2C bus). In ICU section of Threads tab, enable all interrupts giving them appropriate priority (10 in the example). Doc: NFC Framework and NT3H1201 Device Driver - Quickstart Guide for ARIS board, Rev: 1.1 10 of 16

Selecting the Framework Shared Bus, please adjust the Channel to 1 matching the parameters previously set. You can now save the modified configuration and press the Generate Project Content to update the Synergy files. Doc: NFC Framework and NT3H1201 Device Driver - Quickstart Guide for ARIS board, Rev: 1.1 11 of 16

Select the C/C++ Perspective, right click on the test project and select Properties: in C/C++ Build Settings Tool Settings Cross ARM C Compiler Includes, and press the Plus button to add the directories containing header files to the Include paths, like in the following picture: The folders nt3h1201_driver and nfc_framework should be added to Library search path (in Cross ARM C Linker Libraries section) and the specific library file should be added as well (please note that the library name should NOT contain lib in the beginning or.a extension in the end). Doc: NFC Framework and NT3H1201 Device Driver - Quickstart Guide for ARIS board, Rev: 1.1 12 of 16

3.3. Sample code The following code should be added in the beginning of nfc_thread_entry.c file in order to include the relevant files and additional variables: #include <nt3h1201_driver/nfc_device_api.h> #include <nt3h1201_driver/r_nt3h1201.h> #include <nt3h1201_driver/r_nt3h1201_api.h> #include "nfc_thread.h" #include "sf_nfc.h" /* Definition of a new ASSERT function and prototype for the implementation */ #define ASSERT(a) panic(a) void panic( bool condition ); /* Buffer length and buffers used for storing the email */ #define EMAIL_STRING1 "info@reloc.it?subject=aris board&body=this email is from ARIS!" #define WORKING_BUF_SIZE 1904 static uint8_t working_buf[working_buf_size]; /* Definition of control and configuration structures needed for management of the NFC framework */ r_nt3h1201_ctrl_t nfc_nt3h1201_ctrl; const r_nt3h1201_cfg_t nfc_nt3h1201_cfg = {.device = &g_sf_i2c_device0,.i2c_address = 0x55 }; nfc_device_ctrl_t nfc_device_ctrl; const nfc_device_cfg_t nfc_device_cfg = {.p_extend_cfg = (void*)&nfc_nt3h1201_cfg,.p_extend_ctrl = (void*)&nfc_nt3h1201_ctrl }; const nfc_device_instance_t nfc_device_instance = {.p_ctrl = &nfc_device_ctrl,.p_cfg = &nfc_device_cfg,.p_api = &g_r_nt3h1201_api }; sf_nfc_ctrl_t sf_nfc_ctrl; const sf_nfc_cfg_t sf_nfc_cfg = {.p_nfc_device_instance = &nfc_device_instance }; sf_nfc_instance_t sf_nfc_instance = { &sf_nfc_ctrl, &sf_nfc_cfg, &g_sf_nfc_api }; This sample code can be put inside nfc_thread_entry function to test the behavior: /* open function on driver and check of the return value */ ASSERT( sf_nfc_instance.p_api->open(sf_nfc_instance.p_ctrl, sf_nfc_instance.p_cfg) == SSP_SUCCESS); /* write an email structure into NFC memory */ ASSERT( sf_nfc_instance.p_api->writeemail(sf_nfc_instance.p_ctrl, (uint8_t*) EMAIL_STRING1, sizeof(email_string1), working_buf, WORKING_BUF_SIZE ) == SSP_SUCCESS); Doc: NFC Framework and NT3H1201 Device Driver - Quickstart Guide for ARIS board, Rev: 1.1 13 of 16

/* Verify with an external device */ /* close function on driver and check of the return value */ ASSERT( sf_nfc_instance.p_api->close(sf_nfc_instance.p_ctrl) == SSP_SUCCESS); while (1) { tx_thread_sleep (1); } Support Panic function can be defined at the end of sensor_thread_entry.c file. void panic( bool condition ) { if( condition == false ) { while(1); } } Saving the modified file and pressing the Build button will start the compilation that should end without any error or warning. Doc: NFC Framework and NT3H1201 Device Driver - Quickstart Guide for ARIS board, Rev: 1.1 14 of 16

3.4. Board configuration and connection J25 Connect ARIS board to your PC through the mini-usb port (J25): this connection will provide power supply to the board and will provide an interface for flashing and debug. J12 and J13 (populated in the default configuration) provide power to the Synergy MCU. They can also be used to measure the current consumption of the S7 device. Please refer to ARIS Hardware User s Guide for additional information about the power supply of the board. Doc: NFC Framework and NT3H1201 Device Driver - Quickstart Guide for ARIS board, Rev: 1.1 15 of 16

3.5. Debugging the project In order to check the correct behavior of the sample application, select the line of nfc_thread_entry.c with writeemail function and select Run Toggle Breakpoint from the menu: You can now start the Debug by selecting Run Debug from the menu; if there is not any error the sample application will be downloaded to ARIS board and the development environment will switch automatically to Debug Perspective. Click on Resume (F8) a couple of times and the execution should stop on the selected line: You can now click on Step Over (F6) and you should be able to read the e-mail address stored on NFC tag of the ARIS board with an external NFC reader (i.e. smartphone). Doc: NFC Framework and NT3H1201 Device Driver - Quickstart Guide for ARIS board, Rev: 1.1 16 of 16