The ConnectCore 8M Nano system-on-module contains an ultra-low power ARM Cortex-M0+ (NXP Kinetis KL17: MKL17Z64VFM4) Micro Controller Assist chip.

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 8M Nano.

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 8M Nano 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 8M Nano 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:36 +0000)
DDRINFO: start DRAM init
DDRINFO: DRAM rate 3000MTS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
Normal Boot
Trying to boot from BOOTROM
image offset 0x0, pagesize 0x200, ivt offset 0x0


U-Boot dub-2020.04-r2.2 (Jan 18 2021 - 15:54:36 +0000)

CPU:   i.MX8MNano Quad rev1.0 1400 MHz (running at 1200 MHz)
CPU:   Industrial temperature grade (-40C to 105C) at 36C
Reset cause: POR
DRAM:  1 GiB
MCA:   HW_VER=1  FW_VER=1.01
MMC:   FSL_SDHC: 1, FSL_SDHC: 0
In:    serial
Out:   serial
Err:   serial
Model: Digi ConnectCore 8M Nano Development Kit
ConnectCore 8M Nano SOM variant 0x01: 1 GiB LPDDR4, Wi-Fi, Bluetooth, MCA, Crypto-auth
  Board version 3, ID undefined
Boot:  MMC2

 BuildInfo:
  - ATF 9447098
  - U-Boot dub-2020.04-r2.2

flash target is MMC:0
Net:   eth0: ethernet@30be0000
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 sysinfo command.

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 MCA firmware.

Command line options

Command line option Action

mca_fw_updater -v, --version

Show the current version of the tool

mca_fw_updater -h, --help

Show the available options

mca_fw_updater -f FILE, --file

Erase the flash completely and update firmware with file FILE

mca_fw_updater -f FILE -k, --keep-nvram

Update firmware but keep current NVRAM contents

Option -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. Option -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 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 {cpu-family} 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.

For more information about the mca_fw_updater application, see MCA management application.

Program firmware with JTAG debugger

Digi recommends you use the mca_fw_updater application to update the MCA firmware, but you can also use a debugger.

To program the MCA firmware using a JTAG debugger, you need:

  • A hardware debugger such as a P&E USB multilink debugger or a standalone Cyclone programmer.

  • An accessible Serial Wire Debug (SWD) port on your carrier board.

  • An adapter cable between the hardware debugger and the SWD port.

MCA SWD port

The Digi ConnectCore 8M Nano Development Kit board has a tag connect footprint to access the SWD port of the MCA. Locate the SWD tag connect footprint on the labeled board image on the ConnectCore 8M Nano Development Kit Hardware Resource Manual.

Use the following pinout as reference to create a custom cable between your debugger and the tag-connect footprint on the carrier board.

Pin Line

1

VCC_MCA

2

MCA_SWD_DIO

3

GND

4

MCA_SWD_CLK

5

MCA_VCC

6

-

7

-

8

-

9

-

10

MCA_RESET

SWD port footprint

Use the pinout as reference to create a custom cable between your debugger and the tag-connect footprint on the carrier board.

The P&E USB Multilink debugger is a hardware debugger that you can drive from a host computer via USB.

To program firmware using this debugger:

  1. You need a GDB server running on the debugger. Download and install NXP Kinetis Design Studio, which contains a GDB server for the P&E multilink debugger.

  2. Download the ELF image from the ConnectCore 8M Nano product support page.

  3. Connect the debugger to the PC via USB, and to the designated SWD port on the carrier board with the adapter cable. See SWD port for more information. You must hold the cable to keep it connected during the programming process. (The following image is included for general reference and may not match your board.)

    USB multilink debugging
  4. Power on the board. Both LEDs on the debugger light up.

  5. Run the Linux command line version of Kinetis Design Studio on your host computer with two parameters:

    1. -startserver to start the P&E GDB server and

    2. -device=<model> to specify the Kinetis model you are connecting to (NXP_KL1x_KL14Z32M4 for the I/O Expander, KL17: MKL17Z64VFM4 for the MCA).

      $ /opt/KDS_v3/eclipse/plugins/com.pemicro.debug.gdbjtag.pne_2.4.1.201603202153/lin/pegdbserver_console -startserver -device=<model>

      The server runs, detects the hardware, and lists the ports it is running on.

  6. In another shell, source the Digi Embedded Yocto SDK environment:

    $ source /opt/dey/3.0-r4/ccimx8mn-dvk/environment-setup-aarch64-dey-linux
  7. Run the GDB client:

    $ aarch64-dey-linux-gdb
  8. At the GDB prompt, connect to the GDB server on the debugger (using one of the ports reported above):

    (gdb) target remote localhost:7224

    The server reports "Connection from "127.0.0.1" via 127.0.0.1"

  9. Load the ELF file you want to debug/program with:

    (gdb) load filename.elf

    This erases and programs the flash and loads it with the file.

  10. Continue execution of the loaded file with:

    (gdb) continue
  11. Quit the GDB server by pressing CTRL+C.

  12. The ELF file contains only the bootloader, not the full firmware. Once you install the bootloader, you can program the firmware using the application. See Update firmware.

  13. When finished programming, restart to load the new firmware. Use the command sysinfo to print the firmware version and verify correct programming.

Program firmware with standalone Cyclone programmer

The P&E stand-alone Cyclone programmer is designed for programming in a production environment.

The following instructions assume you have installed and configured your Cyclone programmer according to the manufacturer setup instructions.
  1. Download the desired SAP (Stand-Alone Programming) image from the ConnectCore 8M Nano product support page.

  2. Transfer the image to the Cyclone programmer. After this step is done, you no longer need the host PC and you can program the firmware with a button press.

  3. On the Cyclone programmer, use the screen menus to select the image to program.

  4. Connect the Cyclone programmer to the designated SWD port on the carrier board with the adapter cable. See SWD port for more information. You must hold the cable to keep it connected during the programming process. (The following image is included for general reference and may not match your board.)

    Cyclone programmer debugging
  5. Power on the board.

  6. Press the Start button on the Cyclone programmer and wait for the Success LED to light up.

  7. When finished programming, restart the device to load the new firmware. Use the command sysinfo to print the firmware version and verify correct programming.