Programming Firmware Image Using the SEC Tool
In this lab, you will use the MCUXpresso Secure Provisioning tool to update the image in ISP mode after the customer's product has entered mass production.
The Flash Programmer is a simple tool within the SEC. Flash Programmer is designed to read/write from the currently selected flash memory and supports all flash types including internal flash, external NOR and NAND flash, SD card, and eMMC. Flash Programmer can be accessed from Tools in the menu bar. The processor can be connected to the host using USB, UART, SPI, or I2C and must be in ISP mode. Flash Programmer can be used to prepare data for writing, or just to display or modify saved memory blocks even if no device is connected. The left side contains the action toolbar and the right side contains a buffer of the memory content in hexadecimal and ASCII formats. The tool has additional functionalities: “Auto erase” and “Auto verify”. To display memory value from some address, fill in the start address into the Address combo and required size (in Bytes) into the Size combo. Click Read and the value read from memory will be displayed. The result of the operation is displayed in the bottom-left corner. If the operation ends with failure, more detailed info about the encountered error is displayed in the tooltip. The settings of the flash programmer window are not saved into the workspace. They are discarded if the tool is closed.
This lab uses the Flash Programmer to program an image into the MCXN947.
Hardware Requirements
Software Requirements
Steps
1. Create a S-record binary image
To leverage the use of the MCUXpresso Secure Provisioning Tool we need to work with binary images, the first thing we need to do is to generate them. Luckily, MCUXPresso IDE has a set of functionalities that allow us to do this operation in very few mouse clicks.
“frdmmcxn947_led_blinky_peripheral_cm33_core0.axf”
Now we have the .s19file
2. Prepare the MCUXpresso Secure Provisioning environment for programming:
3. Make MCU boot in ISP mode
Press and hold the ISP button (SW3) on the board, and at the same time, connect the USB cable to the HS-USB port (J11). Then release the ISP button.
Use SPT tool test whether can connect with ISP mode. Click Target-> Connections…
The USB port will be automatically recognized. Then, click the "Test connection" button. If the result shows "OK", it means the connection is good.
Reset board, blinky demo start to run.
This is the video that shows all the detailed steps.