...
The first step is to select a microcontroller model
Connect up to 8 devices to the USB ports and run a scan to identify the paths to the ports where the devices are connected. And check MCU connection after scan.
Add the files to be programmed:
Flashloader
Image (.bin, .s19 or .sb)
Fuses values programmed in OTP
Memory Configuration
Memory Erase
Memory Read & Verify
Table of Contents |
---|
Selecting target MCU
...
The first mandatory step is to select the microcontroller you want to program. The variants supplied can be found in the field MPU/MCU/Board Type:
...
In this method, connect one device at a time and press the "Add one USB" button.
...
Check MCU connection
...
After a successful scan, the "Target Device Programming Results" field in the main window is filled with "USB P.H No" according to the list obtained after the scan process. A next to USP P.H indicates that the connection is active.
...
If the device is disconnected, the automatic check will be indicated by the replacing by
...
To manually check the connection, check the "Enable" checkboxes and then click the "Connect" button. This option also helps to detect whether the Flashloader is already running on the microcontroller or not.
...
If the connection fails it will be indicated by in the "Final" column
...
Browsing for
...
firmware files
NXP Flasher allows programming of all file types (.bin, .s19, .sb) provided for the iMX.RT family of microcontrollers, including OTP memory. Programming of images and OTP can only be done by connecting to a preprogrammed bootloader application called "Flashloader".
Flashloader File
The MCU Flashloader is a specific implementation of the MCU bootloader. It provides a standard interface to the device using any of the peripherals supported by the bootloader on a given NXP device.
It is possible to use Flashloader in two options:
the default version of the Flashloader provided with the NXP Flasher
or to use your own
...
compiled version by providing the file path by clicking
button.
Default Flashloader
The default Flashloader image files are located in the NXP Flasher installation folder under the path ..... and are copies of the files provided by MCUXpresso Secure Provisioning.
User defined Flashloader
To use your own compiled version by providing the file path by using the button “Open Flashloader File“.
User defined Flasloader
...
In order to have a user Flashloader in the programming process, additional settings need to be made in the Setup -> Memory Options window.
...
To confirm the modification, press the "OK" button.
Loading Flashloader to MCU
After configuring the Flashloader loading options, check if it will load and run. After configuring the Flashloader setup, check if it will load and run. To do this, click button and wait for a response. Successful upload and run of Flashloader will be indicated by
in "Load", "In" and “Final“ columns.
...
Flashloader Reset
If the Flashloader is running it is possible to reset it and return to the primary MCU bootloader. To perform a Flashloader reset, click on the right side of the main window.
...
If the Flashloader was not started before the Reset command, the operation will fail.
...
Image File
MCU configuration and programming depends on the image file type selected: .bin, .s19 or .sb.
Binary Image File
Srecord Image File
...
A binary file only contains data that is not memory-mapped. To properly upload a .bin file, you must previously configure the memory and set the address of loading the file into memory.
S-record Image File
Secure Binary File
Writing Image
The write process of an image depends on the type of image file. The table below summarizes:
Operation | Binary File | S-record File | Secure Binary File |
---|---|---|---|
Memory Configuration | User defined | User defined | Included in file |
Image Load Address | User defined | Included in file | Included in file |
Erase range | User defined | Extracted from the file | Included in file |
OTP File
The OTP memory contains fuse bits that configure and protect the program loaded into the internal or external flash memory. In the iMX.RT 10xx family of microcontrollers, there is an OTP area of 64 32-bit words. Generating, modifying, and using fuse bit value files is possible in several ways:
Using MCUXpresso Secure Provisioning software, the resulting file is in .Json format (recommended option for consistency of OTP and image file values)
Using a dedicated "Setup -> OTP Configuration" window where the user can enter or modify OTP word values himself. (This option is recommended if you need to modify single words which were not set in MCUXpresso Secure Provisioning)
Using other software to generate binary files (not recommended)
Using MCUXpresso Secure Provisioning output .Json file
MCUXpresso Secure Provisioning provides a fully integrated software package that prepares the image file for production. This software enables the generation of a set of image encryption keys with which the image is secured and generates the appropriate fuse bit values.
...
After the image is loaded, keys are generated and signed, a set of fuse bit values is generated and exported to a .json file
...
Browsing OTP File
NXP Flasher for OTP programming accepts two file types:
.bin file of fixed size 256 bytes
.json file generated in the "OTP Configuration" window in MCUXpresso Secure Provisioning.
The OTP file is loaded by clicking the button. In the pop-up window, you can specify one of two file types.
...
If a .json file is selected then .json file is loaded, it is automatically converted into a 256 byte binary file. The resulting binary file is saved under the same name and path as the .json file.
...
Viewing and modifying an OTP file and viewing current MCU OTP status
After OTP file loading it is possible to preview and modify the fuse values in a dedicated window "Setup -> OTP Configuration". The window displays a list of fuse bits that are relevant to programming.
The "Current Value" column shows the fuse word values read from the selected target.
The "Required Value" column displays the fuse word values loaded from the OTP file
The window does not display all words at once, to view subsequent values, select the appropriate page by checking the checkbox "Page 1" or "Page 2".
...
Writing OTP
The configuration for writing and verifying values in OTP is in the "OTP Options" section.
...
The first step is to load the OTP data file by “Open OTP File“ button. Acceptable formats are .bin and .json. The .json file is parsed and its data is saved to the .bin file. The format of the .json file is the same as the output file from MCUxpresso Secure Provisioning software.
...
In the second step:
choose to unlock the “Write” button by “Button enable“ checkbox.
...
or allow OTP programming in the "Autoprogram" sequence.
...
In the third step, you can write the OTP values with the "Write" button if the Flashloader is loaded, or via the "Autoprogram" button
Locking MCU
MCU locking is accomplished by setting the fuse bits in the first word of the OTP memory area. This value is also in the OTP file, but is ignored when programming the OTP memory. Locking the processor is the last programming step and can be done manually or as the last "Autoprogram" procedure.
Manual MCU locking
Manual CPU locking is available in the "OTP Options" field in the main window. First, make sure that the OTP file is loaded and that the value of the first OTP word is non-zero. Then unlock the "Lock" button by checking the "Button Enable" checkbox.
...
MCU Locking in Autoprogram
The MCU lockout procedure can be invoked as the last step of the Auto Program sequence. In order to lock the processor it is necessary to check the "Lock in Autoprogram" checkbox.
...
Memory Configuration
Memory configuration is necessary for devices with external flash memory and must be done if .bin or .s19 files are to be written. The .sb files contain memory configuration commands, so it is possible to skip the memory configuration commands.
Setting the memory configuration words
Boot device
Address →
...
Running Configure memory
After setting the Configuration Words in the "Memory Configuration" window and starting Flashloader, you can configure the external memory by clicking the button
Checking memory configuration
The current status of the memory configuration can be displayed in the "Reports" field of the main window. To achieve this, click the button. Then the report will be displayed for the selected target:
...
Erase Memory
The NXP-flasher allows for whole memory or block erase. Settings of deleting operations are located in "Memory Options" window.
...
Info |
---|
For erase to be successful you must:
|
Read Memory
The memory reading range is defined in the "Memory Options" window.
There are two memory range options to choose from:
User: The user must specify the read starting and ending address.
...
File: The memory range defines the content and size of the file.
Verify Memory
Memory verification compares the memory contents with a file. Verification includes the memory range defined in "Memory Options".