Skip to main content

Maskrom Mode

The ROCK 3C supports Maskrom mode, which is a special operation mode where the CPU receives commands through the USB OTG port. This guide will instruct you how to operate the ROCK 3C in Maskrom mode.

Preparation

  • ROCK 3C SBC
  • Type-C power adapter
  • USB-A to USB-A adapter cable
  • Male-to-male DuPont cable or other wire
  • eMMC module or microSD card (optional)

Steps

  1. Install the development tool

    Use RKDevTool for Windows, please refer to RKDevTool Guide for installation and tutorial.

  2. Remove eMMC module microSD card etc.

  3. Connect one port of the USB-A to USB-A cable to the host port and the other port to the OTG port of the ROCK 3C (which is located on top of the USB 3.0 port), as shown below

    OTG connection

  4. Connect the SPI port

    Connect SPI Pin

  5. Power on the device and check if it has successfully entered Maskrom mode by using the corresponding tool, the following is an example of the correct entry.

    Connect SPI Pin

Special Circumstances

Due to the logical limitation of the SoC design, after flashing the SPI image in the SPI Flash, it may be possible to enter the Maskrom mode directly when booting from eMMC or microSD card. In this case, you need to disconnect the SPI to enter the system, and erase the SPI to recover.

Erase the SPI Flash via RKDevTool:

  • Remove system storage media
  • Power on and enter Maskrom mode
  • Download the loader file: Annotation 1 to select the loader file, Annotation 2 to download the loader file
  • Erase All: Annotation 3 Erase All, Annotation 4 Erase Complete
  • Reboot the device: Annotation 5 Reboot the device

Erase All

In particular, if you still cannot access the system by shorting the reserved SPI shorting hole and you need to access the system, you can power on the system by grounding the clk pin of the SPI Flash directly, as follows.

  • Install the eMMC or microSD card with the system programmed on it
  • Use the female connector of a male-to-female DuPont cable to connect to the ground pin of the 40-pin connector, which is marked in black on the connector
  • Use the male end of the male-to-female DuPont cable to connect to the clk pin of the SPI Flash, which is shown in the following figure on the ROCK 3C
  • Power on
  • Disconnect after the serial port log indicates booting to U-Boot

Power up and power on SPI clk connect

After entering the system, you can execute the following command to view the SPI Flash block number:

    ls /dev/mtdblock*
# Typically, the block number of SPI Flash is as follows, which can be confirmed by the partition size
/dev/mtd0

Afterwards, the SPI Flash can be cleared with the following command:

    sudo erase_flashall /dev/mtd0