Example application for the STMicroelectronics X-NUCLEO-NFC05A1

Dependencies:   RFAL ST25R3911 BSP05

X-NUCLEO-NFC05A1 NFC Card Reader Expansion Board Firmware Package

Introduction

This firmware package includes Components Device Drivers, Board Support Package and example applications for STMicroelectronics X-NUCLEO-NFC05A1 NFC Card Reader Expansion Board based on the ST25R3911B.

Example Application

This program gives the user the possibility to read the URI information written on the expansion board. The LEDs will blink for few seconds to indicate that the board is initializing. As soon as it finishes, the device is ready to communicate with external NFC devices. LED6 will blink until an NFC device is close to it and ready to read the URI value.

Tested Platforms

This firmware has been tested on STM32 NUCLEO-F401RE

Committer:
DiegoOstuni
Date:
Thu Nov 14 14:57:00 2019 +0000
Revision:
3:9a152c93d7a2
Parent:
1:86504e1ac6b1
Example application for the STMicroelectronics X-NUCLEO-NFC05A1

Who changed what in which revision?

UserRevisionLine numberNew contents of line
DiegoOstuni 1:86504e1ac6b1 1 /******************************************************************************
DiegoOstuni 1:86504e1ac6b1 2 * @attention
DiegoOstuni 1:86504e1ac6b1 3 *
DiegoOstuni 1:86504e1ac6b1 4 * <h2><center>&copy; COPYRIGHT 2016 STMicroelectronics</center></h2>
DiegoOstuni 1:86504e1ac6b1 5 *
DiegoOstuni 1:86504e1ac6b1 6 * Licensed under ST MYLIBERTY SOFTWARE LICENSE AGREEMENT (the "License");
DiegoOstuni 1:86504e1ac6b1 7 * You may not use this file except in compliance with the License.
DiegoOstuni 1:86504e1ac6b1 8 * You may obtain a copy of the License at:
DiegoOstuni 1:86504e1ac6b1 9 *
DiegoOstuni 1:86504e1ac6b1 10 * http://www.st.com/myliberty
DiegoOstuni 1:86504e1ac6b1 11 *
DiegoOstuni 1:86504e1ac6b1 12 * Unless required by applicable law or agreed to in writing, software
DiegoOstuni 1:86504e1ac6b1 13 * distributed under the License is distributed on an "AS IS" BASIS,
DiegoOstuni 1:86504e1ac6b1 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
DiegoOstuni 1:86504e1ac6b1 15 * AND SPECIFICALLY DISCLAIMING THE IMPLIED WARRANTIES OF MERCHANTABILITY,
DiegoOstuni 1:86504e1ac6b1 16 * FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
DiegoOstuni 1:86504e1ac6b1 17 * See the License for the specific language governing permissions and
DiegoOstuni 1:86504e1ac6b1 18 * limitations under the License.
DiegoOstuni 1:86504e1ac6b1 19 *
DiegoOstuni 1:86504e1ac6b1 20 ******************************************************************************/
DiegoOstuni 1:86504e1ac6b1 21 /*
DiegoOstuni 1:86504e1ac6b1 22 * PROJECT:
DiegoOstuni 1:86504e1ac6b1 23 * $Revision: $
DiegoOstuni 1:86504e1ac6b1 24 * LANGUAGE: ANSI C
DiegoOstuni 1:86504e1ac6b1 25 */
DiegoOstuni 1:86504e1ac6b1 26
DiegoOstuni 1:86504e1ac6b1 27 /*! \file
DiegoOstuni 1:86504e1ac6b1 28 *
DiegoOstuni 1:86504e1ac6b1 29 * \author
DiegoOstuni 1:86504e1ac6b1 30 *
DiegoOstuni 1:86504e1ac6b1 31 * \brief serial output log declaration file
DiegoOstuni 1:86504e1ac6b1 32 *
DiegoOstuni 1:86504e1ac6b1 33 */
DiegoOstuni 1:86504e1ac6b1 34 /*!
DiegoOstuni 1:86504e1ac6b1 35 *
DiegoOstuni 1:86504e1ac6b1 36 * This driver provides a printf-like way to output log messages
DiegoOstuni 1:86504e1ac6b1 37 * via the UART interface. It makes use of the uart driver.
DiegoOstuni 1:86504e1ac6b1 38 *
DiegoOstuni 1:86504e1ac6b1 39 * API:
DiegoOstuni 1:86504e1ac6b1 40 * - Write a log message to UART output: #DEBUG
DiegoOstuni 1:86504e1ac6b1 41 */
DiegoOstuni 1:86504e1ac6b1 42
DiegoOstuni 1:86504e1ac6b1 43 #ifndef LOGGER_H
DiegoOstuni 1:86504e1ac6b1 44 #define LOGGER_H
DiegoOstuni 1:86504e1ac6b1 45
DiegoOstuni 1:86504e1ac6b1 46 /*
DiegoOstuni 1:86504e1ac6b1 47 ******************************************************************************
DiegoOstuni 1:86504e1ac6b1 48 * INCLUDES
DiegoOstuni 1:86504e1ac6b1 49 ******************************************************************************
DiegoOstuni 1:86504e1ac6b1 50 */
DiegoOstuni 1:86504e1ac6b1 51 #include "platform1.h"
DiegoOstuni 1:86504e1ac6b1 52
DiegoOstuni 1:86504e1ac6b1 53 /*
DiegoOstuni 1:86504e1ac6b1 54 ******************************************************************************
DiegoOstuni 1:86504e1ac6b1 55 * DEFINES
DiegoOstuni 1:86504e1ac6b1 56 ******************************************************************************
DiegoOstuni 1:86504e1ac6b1 57 */
DiegoOstuni 1:86504e1ac6b1 58 #define LOGGER_ON 1
DiegoOstuni 1:86504e1ac6b1 59 #define LOGGER_OFF 0
DiegoOstuni 1:86504e1ac6b1 60
DiegoOstuni 1:86504e1ac6b1 61 /*!
DiegoOstuni 1:86504e1ac6b1 62 *****************************************************************************
DiegoOstuni 1:86504e1ac6b1 63 * \brief Writes out a formated string via UART interface
DiegoOstuni 1:86504e1ac6b1 64 *
DiegoOstuni 1:86504e1ac6b1 65 * This function is used to write a formated string via the UART interface.
DiegoOstuni 1:86504e1ac6b1 66 *
DiegoOstuni 1:86504e1ac6b1 67 *****************************************************************************
DiegoOstuni 1:86504e1ac6b1 68 */
DiegoOstuni 1:86504e1ac6b1 69 extern void logUsartInit(UART_HandleTypeDef *husart);
DiegoOstuni 1:86504e1ac6b1 70
DiegoOstuni 1:86504e1ac6b1 71 /*!
DiegoOstuni 1:86504e1ac6b1 72 *****************************************************************************
DiegoOstuni 1:86504e1ac6b1 73 * \brief Writes out a formated string via UART interface
DiegoOstuni 1:86504e1ac6b1 74 *
DiegoOstuni 1:86504e1ac6b1 75 * This function is used to write a formated string via the UART interface.
DiegoOstuni 1:86504e1ac6b1 76 *
DiegoOstuni 1:86504e1ac6b1 77 *****************************************************************************
DiegoOstuni 1:86504e1ac6b1 78 */
DiegoOstuni 1:86504e1ac6b1 79 extern int logUsart(const char* format, ...);
DiegoOstuni 1:86504e1ac6b1 80
DiegoOstuni 1:86504e1ac6b1 81 /*!
DiegoOstuni 1:86504e1ac6b1 82 *****************************************************************************
DiegoOstuni 1:86504e1ac6b1 83 * \brief helper to convert hex data into formated string
DiegoOstuni 1:86504e1ac6b1 84 *
DiegoOstuni 1:86504e1ac6b1 85 * \param[in] data : pointer to buffer to be dumped.
DiegoOstuni 1:86504e1ac6b1 86 *
DiegoOstuni 1:86504e1ac6b1 87 * \param[in] dataLen : buffer length
DiegoOstuni 1:86504e1ac6b1 88 *
DiegoOstuni 1:86504e1ac6b1 89 * \return hex formated string
DiegoOstuni 1:86504e1ac6b1 90 *
DiegoOstuni 1:86504e1ac6b1 91 *****************************************************************************
DiegoOstuni 1:86504e1ac6b1 92 */
DiegoOstuni 1:86504e1ac6b1 93 extern char* hex2Str(unsigned char * data, size_t dataLen);
DiegoOstuni 1:86504e1ac6b1 94
DiegoOstuni 1:86504e1ac6b1 95 #endif /* LOGGER_H */
DiegoOstuni 1:86504e1ac6b1 96