Firmware update application
You can use the
mca_fw_updater command line application to update the firmware that runs on the Micro Controller Assist (MCA) of the ConnectCore 8X.
The flash memory of the MCA is divided into two regions: program flash and NVRAM. Before writing the new firmware, this application completely erases the contents of the program flash through the MCA bootloader. By default, the NVRAM is also erased.
|The MCA firmware is a critical part of the system. If you are not sure of the origin of your new firmware image or the benefits of updating it, do not proceed.|
|The bootloader must restart the MCA to re-run the application stored in flash, and this involves restarting the complete system.|
Check the latest MCA firmware version available
Your ConnectCore 8X system-on-module ships from factory with a pre-programmed firmware on the MCA. Digi, however, ships fixes and updates of the MCA firmware on the support web site.
Digi recommends you verify the current firmware version of the MCA and check for a more recent version on the Digi support site.
Go to the ConnectCore 8X product support page to check for the latest available MCA firmware version.
Check the current MCA firmware version
Verify the current MCA firmware on your SOM by reading it on the U-Boot banner:
U-Boot SPL dub-2020.04-r2.2 (Jan 18 2021 - 15:54:04 +0000) Normal Boot Trying to boot from MMC1 Primary set selected Load image from MMC/SD 0x5f400 U-Boot dub-2020.04-r2.2 (Jan 18 2021 - 15:54:04 +0000) CPU: NXP i.MX8QXP RevB A35 at 1200 MHz at 25C DRAM: 2 GiB MCA: HW_VER=1 FW_VER=1.01 MMC: FSL_SDHC: 0, FSL_SDHC: 1 In: serial Out: serial Err: serial Model: Digi International ConnectCore 8X SBC Pro Board. ConnectCore 8X SOM variant 0x02: 2 GiB LPDDR4, Wi-Fi, Bluetooth, MCA, Crypto-auth Board version 3, ID 135 Boot: MMC0 BuildInfo: - SCFW 56682d58, SECO-FW 0e4b9cee, IMX-MKIMAGE 8da5cd23, ATF c949a88 - U-Boot dub-2020.04-r2.2 flash target is MMC:0 Net: eth0: ethernet@5b040000 [PRIME], eth1: ethernet@5b050000 Fastboot: Normal Normal Boot Hit any key to stop autoboot: 0 =>
On a running system, you can check the MCA firmware version by running the
Compatibility with MCA firmware
MCA firmware v0.11 or higher required. Previous versions are not supported and should be updated using a debugger. See Program the MCA firmware.
Command line options
|Command line option||Action|
Show the current version of the tool
Show the available options
Erase the flash completely and update firmware with file FILE
Update firmware but keep current NVRAM contents
-f erases both program and NVRAM flash sectors before installing the new firmware.
If this option is used together with
-k, the NVRAM will not be erased.
-k alone is not valid; it performs no action.
Update MCA firmware
The firmware must be contained in a binary file, with read permissions for the user.
When the program is invoked with option
-f, it starts the update process:
# mca_fw_updater -f mca_cc8x_vX.XX.bin The update process may take 20 seconds or more During this process the chip drivers become unresponsive and you may see I2C communication error messages on the console. These error messages are expected and don’t interfere with the firmware update process. DO NOT POWER OFF OR RESET the device. DO NOT CTRL+C OR ABORT this operation.
The program sends a message to the MCA firmware with the byte sequence for calling the bootloader and then checks that the bootloader is running. Then it performs the selected operations (update firmware, erase NVRAM). The process may take longer than 20 seconds, and the console displays a spinning bar. During this time, the system must be kept powered to successfully complete the update. Once the new firmware is written, resetting the MCA takes five seconds. Note that during the MCA reset process, the program appears to perform no action. The i.MX8QXP CPU then reboots together with the MCA.
|Do not abort the firmware update process. If the process is interrupted during the write phase, the MCA could be left in an inconsistent state. If the process fails you can retry manually, but success is not guaranteed. In this case, you can only recover the MCA by flashing the firmware with a debugger probe.|
Digi recommends you use the
Detect invalid firmware images
The tool has a limited capability of detecting if a firmware can cause irreversible damage to the MCA flash. Consequently, it will not install firmware that:
Does not fit in the program flash memory, or
Can overwrite critical flash settings and prevent further updates (for example: lock flash against erasing or change clock settings).
# mca_fw_updater -f bad_binary INVALID FIRMWARE - it can damage the MCA. Update aborted # du -h a_very_big_file 4.9M a_very_big_file # ./mca_fw_updater -f a_very_big_file The firmware image does not fit in flash. Update aborted.
If an invalid image that still passes these filters is written to flash, the functionality of the system will be lost. If this happens, you must use a debugger to flash a valid MCA firmware image. The application cannot re-program an MCA that contains invalid firmware; bootloader mode is required to program new firmware, and invalid MCA firmware cannot set the MCA to bootloader mode.
To avoid problems that may arise from flashing an invalid firmware image:
Only write firmware provided by Digi International Inc., designed for the MCA and fully supported by other software components.
Check the file name before pressing Enter.
Following Linux convention, the application returns
0for success and a negative error code otherwise. Upon error, you can check the return code with
If the update process fails unexpectedly but the application does not complain about the binary file size or format, retry the process. If this still does not work, the MCA firmware can still be updated with a debugger probe.
If you are able to enter U-Boot, you can use the following commands to probe the devices connected to the I2C0 bus (bus index 0):
=> i2c dev 0 Setting bus to 0 => i2c probe Valid chip addresses: 60 63
The MCA has the slave address 0x63. This means the MCA is present and running the firmware. If the address 0x10 is shown instead, the MCA is running the bootloader. If none of them is present, the MCA is faulty. If the MCA is running either the firmware or the bootloader, you can boot to Linux and try to update again.