Skip to content

Recovery

Intro

The following documentation describes the process of recovering hardware from the brick state with RTE and Dasharo open-source firmware.

Prerequisites

  1. Recovery with RTE:
  2. Recovery with spi1a recovery dongle:

Recovery with RTE

Connections

To prepare the stand for flashing follow the steps described below:

  1. Open the platform cover.
  2. Connect the 6-pin flash header to the SPI header on RTE.
SPI header J6 pin header
Vcc pin 1 (Vcc)
GND pin 2 (GND)
CS pin 3 (CS)
SCLK pin 4 (CLK)
MISO pin 5 (MISO)
MOSI pin 6 (MOSI)
                J6
              ______
          >  |      |
 Vcc 3.3V  ----1  2----  GND
             |      |
       CS  ----3  4----  CLK
             |      |
     MISO  ----5  6----  MOSI
             |      |
        X  ----7  8----  X
             |______|
SPI header J9 pin header
Vcc pin 1 (Vcc)
GND pin 2 (GND)
CS pin 3 (CS)
SCLK pin 4 (CLK)
MISO pin 5 (MISO)
MOSI pin 6 (MOSI)
                J9
              ______
          >  |      |
 Vcc 3.3V  ----1  2----  GND
             |      |
       CS  ----3  4----  CLK
             |      |
     MISO  ----5  6----  MOSI
             |      |
        X  ----7  8----  X
             |______|
SPI header J10 pin header
Vcc pin 1 (Vcc)
GND pin 2 (GND)
CS pin 3 (CS)
SCLK pin 4 (CLK)
MISO pin 5 (MISO)
MOSI pin 6 (MOSI)
               J10
              ______
          >  |      |
 Vcc 3.3V  ----1  2----  GND
             |      |
       CS  ----3  4----  CLK
             |      |
     MISO  ----5  6----  MOSI
             |      |
        X  ----7  8----  X
             |______|

Firmware flashing

To flash firmware follow the steps described below:

  1. Login to RTE via ssh or minicom.
  2. Turn on the platform by connecting the power supply.
  3. Wait at least 5 seconds.
  4. Turn off the platform by using the power button.
  5. Wait at least 3 seconds.
  6. Set the proper state of the SPI by using the following commands on RTE:

    # set SPI Vcc to 3.3V
    echo 1 > /sys/class/gpio/gpio405/value
    # SPI Vcc on
    echo 1 > /sys/class/gpio/gpio406/value
    # SPI lines ON
    echo 1 > /sys/class/gpio/gpio404/value
    
  7. Wait at least 2 seconds.

  8. Disconnect the power supply from the platform.
  9. Wait at least 2 seconds.
  10. Flash the platform by using the following command:

    flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=16000 -w [path_to_binary]
    

    Flashing with flashrom takes about 1 minute.

  11. Change back the state of the SPI by using the following commands:

    echo 0 > /sys/class/gpio/gpio404/value
    echo 0 > /sys/class/gpio/gpio406/value
    
  12. Turn on the platform by connecting the power supply.

The first boot of the platform after proceeding with the above procedure can take much longer than standard.

Recovery with spi1a dongle

  1. Power off the platform.
  2. Plug the spi1a into J6 (apu2) / J9 (apu3/4) / J10 (apu6) header, so that the thick white line on the dongle matches the thick line printed on board near J6 (apu2) / J9 (apu3/4) / J10 (apu6) header.
  3. Power on the platform.
  4. Boot to operating system, e.g. Dasharo Tools Suite.
  5. Remove the dongle.
  6. Perform Initial Deployment with the target firmware variant.

Do not keep the spi1a dongle plugged while in OS

Remove the dongle as soon as you boot the operating system to avoid accidental flashing of the dongle itself. The dongle is designed in a way that the SPI flash controller directs the SPI transactions to the dongle, instead of the on-board SPI flash. Be sure to remove the dongle, before you attempt to flash a new, working firmware image.