NXP

PN5180 DownloadLib Documentation

V1.0


Introduction


Overview

The Firmware Download Library is an ANSI-C library abstracting the Download Mode Interface of the PN5180. The library structure provides a modular way of performing the PN5180 firmware upgrade using the APIs in a specific sequence.


LayerModel

layer_model_public.png

Features

Features supported by Firmware Download Library are:


Non-Features

Non-Features of Firmware Download Library are:


API Reference

Download Library


The Donwload Library implements the API's required to perform firmware Update.


Information about the Integration

The Download Library can be integrated into the User application to perform the Firmware upgrade.

PN5180 embeds a firmware and its stored in FLASH and EEPROM. Platform setting in EEPROM contains all customer platform settings. The Download mode is used to push a new firmware release. Only NXP can sign a firmware release and deliver it.

NXP releases the firmware as Secure Binary that can be downloaded using the Download Library.

Prerequisites for using Download Library, to be handled in user application are:

During the download session, normal mode NFC functionality cannot be used. After a hard-reset, the PN5180 will either be in download mode if the DWL_REQ GPIO is raised or stalled in a halt mode if not.

After any failure or exception case during the download, the session is kept open until a full firmware update sequence has been successfully performed.

Functionality allows securing the firmware file with a signature against download of FW which is not signed by NXP.

A hash chain is implemented to assure that the predefined download order for a firmware image is maintained. The hash chain chosen allows for the verification of the data before applying and storing it in the PN5180.

Main scenario:
1. Host set the DWL_REQ GPIO to logical one for download mode.
2. Host performs an PN5180 reset (hard or soft).
3. Host reads the current hardware and firmware version from the PN5180.
a. Host checks session status if last download was completed.
b. Host applies the version checking rules to decide whether to start the download or exit download.
4. Host loads from a file the firmware binary code to be downloaded.
5. Host provides a first secured write commands that contains:
a. The version of the new firmware,
b. A digest value of the next frame,
c. The digital signature of the frame itself.
6. The Host loads the secure download protocol sequence to the PN5180 with secured write commands.
7. When the last secured write command has been send, the Host executes the CheckIntegrity command to check if the memories have been successfully written.
8. Host reads the new firmware version and check the session status if closed for reporting to the upper layer.
9. Host releases the DWL_REQ GPIO for download mode.
10. Host performs an PN5180 hard reset to re-boot the PN5180.

SequenceDiagram.png

To Perform Firmware download the API's needs to be used in a specific sequence mentioned below:

Note: The firmware update API does not change the mode of operation.


DISCLAIMER OF WARRANTIES:

YOU AGREE THAT NXP HAS MADE NO EXPRESS WARRANTIES TO YOU REGARDING THE
SOFTWARE AND THAT THE SOFTWARE IS BEING PROVIDED TO YOU "AS IS" WITHOUT
WARRANTY OF ANY KIND.
NXP DISCLAIMS ALL WARRANTIES WITH REGARD TO THE SOFTWARE, EXPRESS OR
IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF FITNESS
FOR A PARTICULAR PURPOSE, MERCHANTABILITY, MERCHANTABLE QUALITY OR
NONINFRINGEMENT OF THIRD PARTY RIGHTS.
Some states or jurisdictions do not allow the exclusion of implied warranties so the above
limitations or parts of it may not apply to you.

LIMITATION OF LIABILITY:

IN NO EVENT WILL NXP BE LIABLE TO YOU FOR ANY LOSS OF USE, INTERRUPTION OF
BUSINESS, OR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES OF ANY KIND (INCLUDING LOST PROFITS) REGARDLESS OF THE FORM OF
ACTION WHETHER IN CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT PRODUCT
LIABILITY OR OTHERWISE, EVEN IF ENDUSER HAS BEEN ADVISED OF THE POSSIBILITY
OF SUCH DAMAGES.
Some states or jurisdictions do not allow the exclusion or limitation of incidental or consequential
damages, so the above limitation, exclusion or parts of it may not apply to you.

Revision History

1.0 March 2016 First Release



NXP Semiconductors | PN5180 DownloadLib V1.0 | Generated: Thu Apr 7 2016