Updating Transceiver firmware

This chapter discusses the procedure required to update the Crimson TNG transceiver firmware. Broadly speaking, Crimson TNG has two primary firmware sources: the FPGA firmware (containing the Linux file system and FPGA firmware), and the MCU firmware (the Atmel processor code used to control and configure the radio and time boards)


More information on the architecture behind Crimson TNG may be found in the section on System Architecture.

This chapter explains the procedure to update the MCU firmware, and configure the FPGA firmware to program the MCU.

MCU Firmware

The MCU code is responsible for controlling the various components on each radio board. When a command is issued from the digital board, the MCU interprets the command and configures or adjusts the various components on the board to the desired mode of operation.

The capability exists to update this code through the existing UART interface; the optimal update method takes advantage of the exposed SATA headers to directly update the Atmel Controller. The following provides the recommended procedure to update the MCU firmware.

Automatic MCU Update

Automatic MCU Update Pre-requisites

In order to automatically update from Crimson TNG, you require;

  1. Firmware binaries (eg; rx.hex, tx.hex)
    • The actual MCU firmware and binaries are available from Per Vices. If you are updating from the MCU, you only require the application binaries (rx.hex, tx.hex, synth.hex). Please contact us for more information.
  2. A client terminal with SSH and SCP installed.

Automatic MCU Update Procedure

For the automatic update instructions, see this page on github.

FPGA Firmware

The FPGA firmware used by Crimson TNG is stored on the provided Crimson TNG SD card and is loaded onto the FPGA during boot. This procedure describes how to replace or update the FPGA code stored on the SD card.

It is also possible to update the FPGA firmware using the command line, or directly over JTAG using a USB Blaster.


Updating firmware using the USB Blaster is not recommended if you are also using the SoC, as it may adversely impact SoC operation.

FPGA Update

FPGA Update Pre-requisites

You require the following items prior to updating the FPGA firmware stored on the FPGA firmware:

  1. FPGA Binaries (soc_system.rbf)
    • This contains the FPGA firmware as a raw binary file (rbf) named soc_system.rbf. If you are compiling from source, or from within Quartus 2, you will have to convert the default output file (with an .sof extension - SRAM object file) to an appropriate RBF file. To do this, you must first compile the project. After compiling the project, open the Convert Programmer menu (File » Convert Programming Files) and use the settings.
  2. Crimson TNG SD Card
    • The SD Card shipped with your Crimson TNG platform.
  3. Mini SD Card Reader
    • All Crimson TNG transceivers ship with a USB card reader.
    • Alternatively, you may use your own.
  4. A computer to copy over the SD Card.
    • In order to copy over the SD Card, you will need a computer to copy the updated or generated FPGA firmware to the SD Card.

Figure 9.2: Quartus 2 IDE Convert Programming Files GUI.

The settings illustrate the conversion of the default (.sof) file format to the desired raw binary file (.rbf), with a mode of Passive Parallel x16, and an output filename of soc_system.rbf.

FPGA Update Procedure

  1. If you are generating from your own Quartus Project, ensure that you have converted the newly generated source code to a Raw Binary File.

  2. Confirm the file name is:


  1. Power down Crimson TNG, and remove the mini SD Card.

  2. Insert the SD Card into the provided USB mini-SD Card reader, and insert the assembly into a computer.

  3. Identify the partition containing the existing soc_system.rbf file. The SD Card contains three partitions. Depending on your operating system, the number of viewable partitions may vary. Using a reasonable operating system, you should be able to view three partitions. For example:

      sdX1 - partition 1- type b - W95 FAT32 partition (This contains the RBF file!)
      sdX2 - partition 2 - type 83 - Linux ext3 partition (Contains SoC file system)
      sdX2 - partition 3 - type a3 - UBOOT and boot loader (It's best not to touch this)
  4. Once you identify the correct partition, replace the existing RBF file with the new one, and cleanly unmount the partition.


You must ensure you cleanly unmount the partition. You risk corrupting the firmware image (and possibly even Crimson TNG) if you simply remove the USB key without first unmounting (safely removing) the USB key! For added security, type sync to flush file system buffers prior to removing the SDCard.

  1. Remove the USB mini-SD Card adapter from your computer and pull out the mini-SD Card. Insert the bare SD card back into the Crimson TNG mini-SD Card receptacle.

  2. Congratulations! You should have successfully updated the Crimson TNG FPGA code.