Please enable javascript, or click here to visit my ecommerce web site powered by Shopify.
Jump to: navigation, search

Rock3/install/spi

< Rock3‎ | install
Revision as of 09:05, 27 December 2021 by Stephen (Talk | contribs)

    ROCK 3 >  Installation >   Install the image to SPI Nor Flash

Install the image to SPI Nor Flash from USB port

ROCK 3 supports Maskrom mode, which is a special operation mode for CPU to wait for USB OTG port command. The Linux/macOS PC tool we use to communicate with ROCK 3 in Maskrom mode are the rkdeveloptool and RKDevTool. We use tool rkdeveloptool in Linux/macOS and RKDevTool tool under Windows.

Available boards:

  • ROCK 3A

Here we do the test on ROCK 3A.

Requirement

  • ROCK 3A with SPI Nor Flash (You can find SPI Nor Flash from ROCK 3 Model A Main Board)
  • Power adapter
  • USB Male A to Male A cable(important) USB-C has been seen as not working, an adaptor for USB-C to USB-A has worked. See discussion.

Install Tools&Drivers

Please check this guide, Install rockchip flash tools under Windows/Linux/MacOS PC.

Boot the board to maskrom mode

To boot ROCK 3A into maskrom mode is simple:

  • Power off the board
  • Remove bootable devices like microSD card, eMMC module, etc
  • Plug the USB Male A to Male A cable to ROCK 3A OTG port(the upper USB3.0 port), the other side to PC
  • Short-circuit the following pins. See the left yellow hat.

Rock-3a-disable-spi-nor-flash.png

  • Power on the board
  • Take off the yellow hat.
  • See usb device
    • For macOS PC: lsusb result: Bus 000 Device 004: ID 2207:350a Fuzhou Rockchip Electronics Co., Ltd. Composite Device
    • For Linux PC: lsusb result: Bus 001 Device 112: ID 2207:350a Fuzhou Rockchip Electronics Company
    • For Windows: Open RKDevTool and you would see the device is in "maskrom mode".

Rkdevtool-found-one-maskrom-device.png

Alternatively, if you are running Android and can access ADB, you can reboot the device to loader mode 'adb reboot bootloader' then use the rkdeveloptool to reset the device into maskrom mode 'rkdeveloptool rd 3' or Windows RKDevTool Switch button to go to maskrom mode.

Get RK356X loader and U-Boot images

Write U-Boot images to SPI Nor Flash or erase SPI Nor Flash

Linux/macOS PC

Option one: Write U-Boot images to SPI Nor Flash

On PC, run command rkdeveloptool.

Confirm that ROCK 3A is in maskrom mode.

rkdeveloptool ld
DevNo=1	Vid=0x2207,Pid=0x350a,LocationID=104	Maskrom

Download the loader (flash helper) to init the ram and prepare the flashing environment etc.

rkdeveloptool db rk356x_spl_loader_ddr1056_v1.10.111.bin

Write bootloader

rkdeveloptool wl 64 idbloader.img
rkdeveloptool wl 16384 u-boot.itb

Reboot the device

rkdeveloptool rd

Now the device should boot on SPI Nor Flash. And the blue led is on.

Option two: Erase SPI Nor Flash

Please notice that when you want to erase SPI Nor Flash, fire these commands. Get zero.img from here.

rkdeveloptool db rk356x_spl_loader_ddr1056_v1.10.111.bin
rkdeveloptool wl 0 zero.img
rkdeveloptool rd

Windows PC

Option one: Write U-Boot images to SPI Nor Flash

Double click the RKDevTool.exe and click button Download Image.

Rkdevtool-write-uboot-to-spi-nor-flash.png

Step 1: Write config
# Address Name Path
1 0x00000000 Loader /path/to/rk356x_spl_loader_ddr1056_v1.10.111.bin
2 0x00000040 idbloader /path/to/idbloader.img
3 0x00004000 u-boot.itb /path/to/u-boot.itb
Step 2: Confirm "Found One Maskrom Device"

If your ROCK 3A is in maskrom mode and connects to PC, you can see that RKDevTool shows Found one MASKROM Device.

Step 3: Run

Finally, click the "run" button, and you will see the content on the right side. When RKDevTool shows Download image OK, the download job is completed.

Rkdevtool-write-rock-3a-u-boot-sucess-log.png

Option two: Erase SPI Nor Flash

Double click the RKDevTool.exe and click button "Advanced Function" to get into Advanced Function window.

Rkdevtool-erase-device-1.png

Step 1: Confirm "Found One Maskrom Device"

If your ROCK 3A is in maskrom mode and connects to PC, you can see that RKDevTool shows Found one MASKROM Device.

Step 2: Download RK356X Loader

Choose loader rk356x_spl_loader_ddr1056_v1.10.111.bin and download it.

Rkdevtool-erase-device-2.png

Step 3: Erase device

Click button "EraseAll" to erase device.

Rkdevtool-erase-device-3.png

Step 4: Reset device

Click button "ResetDevice" to reset device.

Rkdevtool-erase-device-4.png

Erasing job is done.

Troubleshooting