Quick access: MicroRead firmware, HOWTO
, Using configen.exe 
The Open NFC stack includes a function designed to load a new firmware into the NFC controller chipset:
WNFCControllerFirmwareUpdate(…)
The Core Edition also contains the source code of an example (for Win32, but it can be ported easily) demonstrating how to use this function. The source file of this example is:
core/porting/win32/win32_examples/test_firmware_update/win32_test_firmware_update.c
The effect of this function is strongly dependent on the NFC HAL module in use: it has no effect when used with the NFC Simulator for example.
When used with the MicroRead hardware, this function is capable of flashing the software on the controller. Despite the function name, it can be used to flash:
Please note that, as for any embedded software, wrong flashing (bad software for example) may have destructive effect on the hardware. Please make sure that your NFC HAL module provides appropriate verification mechanism before using this feature of the Open NFC stack. If you are using an official edition of NFC HAL for MicroRead, with official Firmware file for the MicroRead or SecuRead chipset, you are on the safe side.
Flashing the parameters mainly concerns the tuning of the radio frequency components; the correct set of parameters for specific MicroRead implementation will greatly depend on the hardware environment. Finding the correct set of parameters is a difficult task — please contact Inside Secure support if you need assistance on this matter.
Flashing the loader is usually not necessary; however it is possible with this mechanism. Note that after a new loader has been flashed, you will have to flash also the firmware code and the parameters (the firmware is erased during the operation).
Finally, it is of course possible to update the firmware code with this function, as the name indicates. Once a new firmware has been flashed, you will have to load the parameters, since their value / internal storage format can be modified by the new firmware version.
The WNFCControllerFirmwareUpdate function can be used to load independently the parameters, firmware, and loader into the chipset, or any combination of these components. However, only the following combination make sense:
The update operation can be achieved in one or several calls (example: update first the loader, then the firmware and parameters). However, before all components have been updated, the MicroRead chipset will not be usable for normal operation.
The NFC HAL for MicroRead release contains a folder /nfc_hal_microread/config with official firmware files for the MicroRead chipset. Note that the *.h files are equivalent to the .bin files, suitable for inclusion in source files.
The configen.exe tool provided in the NFC HAL for MicroRead Edition (under nfc_hal_microread/bin) allows the manipulation of loader and firmware files in order to generate new files. The tool is documented in “FRS_NFC_0910-129 Generator Tool for Microread Configuration File” but the following explanation should help you getting started.
The following files are provided as part of a standard NFC HAL for MicroRead Edition delivery (under nfc_hal_microread/config):
The configen.exe tool allows to create “bin” files from its input XML file with a simple command-line operation. (This tool has many more features, but we will focus on this here)
The input files format is documented in FRS_NFC_0910-129 Generator Tool for Microread Configuration File document. The tool allows creation of complex setups, with conditional flashing of the device and so on. However, we will take a simple example situation here.
Let’s assume you are a device integrator. You received the parameters for your device after a tuning session in laboratory, and these parameters were provided as file “device_parameters.xml”, with the following format:
<?xml version="1.0" encoding="UTF-8"?>
<configuration (...)>
<title>Parameters for device XXX</title>
<section>
<target hardware="000000" loader="000000" firmware="000000" interface="00"/>
<parameters type="firmware">
<param service=...
</parameters>
</section>
</configuration>
This file contains only one section. The target line identifies the conditions under which this section will be applied by Open NFC to the MicroRead. The “0″s act as a wildcard in this matter, i.e., this example section will be applied unconditionally. The remaining of the section contents is the list of firmware parameters to apply.
Note: in order for a MicroRead to be able to accept firmware parameters, a firmware must be already loaded and running on the device. In addition, every time you change the firmware version, it is advised to send the parameters again, as the new firmware might have a different management of these parameters.
Once a new Open NFC version is released, with a new official Loader and Firmware, you will probably want to generate a new “bin” file that combines these and also your customized parameters; so that the device can be flashed in one operation.
You need to have in one folder: the Loader and Firmware encrypted binary files, the configuration_file_v10.xsd, and a copy of your parameters xml file named “full_update.xml”; and the configen.exe and its DLL.
Then you have to edit “full_update.xml” and add the references to loader and firmware, copied from the loader.xml and fw_no_card_detect_no_bailout.xml (edit the file path) as follow:
<?xml version="1.0" encoding="UTF-8"?>
<configuration (...)>
<title>Complete upload for device XXX</title>
<section>
<target hardware="000000" loader="000000" firmware="000000" interface="00"/>
<!-- Official loader patcher (example) -->
<firmware version="070341" build="00" interface="000" file="Microread_ROM_3-40_LoaderPatcher_7.3.A Loader 7-OR-0B_30_FULL.XML" type="loader"/>
<!-- Official firmware (example) -->
<firmware version="070F41" build="208" interface="000031" file="v7.15A_(7-OR-00-208)_Card(B_Bp_A_15-3_NFC-T3)_Reader(B_NFC-T1_A_15-3_15-2_NFC-T3_B-3_BPrime_A-3)_.xml" type="firmware"/>
<parameters type="firmware">
<param service=...
</parameters>
</section>
</configuration>
Note: the lines in italic should be copied verbatim (except for the file path) from the official delivered files.
Once this new file is ready, open a command-line interpreter and type:
configen convert -i full_update.xml -o full_update.bin
This operation will generate a new “full_update.bin” file that you can use to flash your device: loader, firmware, and parameters in one operation. The win32 example “test_firmware_update” can be used as reference for flashing the device.