Updating Module Firmware

This article describes several procedures to update firmware to a LL-RLP-20 or LL-RXR-27 module.

If you are trying to update/modify the firmware of a module mounted to an evaluation board, it is easiest to use Prelude's built-in firmware update capability.

At the time of manufacturing, the Renesas microcontroller (Renesas R5F5116ADNE) on the LL-RLP-20/RXR-27 is programmed with the most recent firmware release. During this process, each module is assigned a unique MAC address and encryption keys.  A bootloader is also loaded onto each MCU, to facilitate future firmware updates.

The preferred method to re-program a module is to flash firmware to the module via USB from a computer. To implement this method, the module's carrier board must include a USB-to-UART bridge. This allows the PC to interface with the module's UART bus. For example, the LL-RLP-20/RXR-27 evaluation board offered by Link Labs includes a Silicon Labs CP2104 USB-to-UART bridge.  

Bootload the module while attached to a computer

This method assumes the module can interface to a computer via a USB-to-UART bridge. For example, the LL-RLP-20/RXR-27 evaluation board includes a Silicon Labs CP2104 USB-to-UART bridge. The firmware update can be achieved using (Method 1) the bootloader_upload_firmware.py script provided by Link Labs or (Method 2) using a terminal like Tera Term.

Method 1: Using Python with bootloader_upload_firmware.py

Download the bootloader_upload_firmware.py Python script, provided by Link Labs.  This script uses the standard xmodem and pyserial libraries, so please ensure they are added to your Python installation. The script also uses ll_ifc.py, a Python wrapper for controlling a module from a computer.

Place the desired encrypted firmware file, for example rlp_multi_mac.bin.encrypted, in the appropriate file path. The latest release of rlp_multi_mac.bin.encrypted can be found here.

Connect the module to your computer via USB. Note which COM port the USB-to-UART bridge enumerates. For example, in the following picture, the USB-to-UART bridge of a Link Labs evaluation board has enumerated to COM21.

From the command terminal, execute the following command using the appropriate COM port and encrypted binary file path.

python bootloader_upload_firmware.py --device COMxx ~/path/to/encrypted/binary

For example, the command might look something like this:

Verify the following successful outcome is achieved:

Method 2: Using Tera Term

The bootloader on the LL-RLP-20/RXR-27 has a human-readable interface. You can view this interface by connecting a terminal to the module's UART.

Connect the module to your computer via USB and open a terminal. In this example, we're using Tera Term.

From Tera Term's Setup menu, select Serial Port. Verify the serial port is the correct COM port (in this example, COM21), with the following settings:

Boot the module in bootloader mode. This can be achieved using host interface commands, or by holding the BOOT pin low while rebooting the module. (This article describes how to place an LL-RLP-20/RXR-27 evaluation board in bootloader mode manually.) The Tera Term window will update with the following:

Link Labs Module Bootloader (RX111)
Release v0.10
Firmware is...OK
Enter a command:
 h - help
 u - upload encrypted firmware
 v - verify current firmware
 r - reset

Send the u character by typing 'u' while the Tera Term window is active. This will begin the bootloading process. Then immediately perform the following steps.

From Tera Term, select File > Transfer > XMODEM > Send. A file tree will appear; navigate to the appropriate encrypted binary file and click Send. (You can download the most recent release here.)Tera Term will send the new firmware to the module.

After successful completion, the Tera Term window will update with:

Verifying...OK
Activating...DONE

Any other response indicates an error in verifying the firmware image. Once the modules sends this response, the firmware has been validated and loaded, and you should send the r character to reboot the module into the new firmware.

0 Comments

Add your comment

E-Mail me when someone replies to this comment