How to recover the MityDSP-L138F u-boot

From RidgeRun Developer Connection

Jump to:navigation, search

The following information was taken from Reprogramming_a_Dead_Board.

Description

This procedure will allow you to reprogram the User Boot Loader (UBL) and u-Boot image on a MityDSP-L138/MityARM-1808 module via the serial port AIS bootloader (via UART1, the console port for MityDSP-L138). The AIS bootloader is entered by holding the boot-option button down while resetting (or powering up) a board installed on the PROFIBUS Development kit board.

This procedure should only be needed if a user has corrupted the base of the SPI-NOR FLASH containing the factory installed user-boot-loader and boot image.

This procedure should not be used if a user can boot to the u-Boot prompt. Also, this procedure does not restore kernel/FPGA or root filesystem/NAND data.

Requirements

Procedure

1. Extract the files in the attached zip file mitudsp-serial-flash.zip to a directory on your PC.

2. Connect the PC serial port to the console port of the MityDSP-L138 host board.

3. Start a command line on the PC with Start-->Run "cmd"

4. Change directories to the location of the files extracted from the zip file.

5. Run the command:

  c:\yourlocation> sfh_OMAP-L138 -flash -v -p COMx UBL_SPI_MEM.ais u-boot.bin

Note: COMx should be replaced with the proper COM port number (e.g., COM1, COM3, etc.) of the serial port attached to the MityDSP-L138 host board.

6. While holding the 'boot me' button, apply power or reset the MityDSP-L138 host board. If successful, you should see text on the console similar to:

  (AIS Parse): BOOTME received!
  (AIS Parse): Performing Start-Word Sync...
  (AIS Parse): Performing Ping Opcode Sync...
  (AIS Parse): Processing command 0: 0x58535901.
  (AIS Parse): Performing Opcode Sync...
  (AIS Parse): Loading section...
  (AIS Parse): Loaded 8484-Byte section to address 0x80000000.
  (AIS Parse): Processing command 1: 0x58535901.
  (AIS Parse): Performing Opcode Sync...
  (AIS Parse): Loading section...
  (AIS Parse): Loaded 716-Byte section to address 0x80002124.
  (AIS Parse): Processing command 2: 0x58535906.
  (AIS Parse): Performing Opcode Sync...
  (AIS Parse): Performing jump and close...
  (AIS Parse): AIS complete. Jump to address 0x80000000.
  (AIS Parse): Waiting for DONE...
  (AIS Parse): Boot completed successfully

At this point, the user-boot-loader and the u-Boot image should be reprogrammed into the SPI-NOR flash. You should be able to launch your terminal program and reset the host board and see the u-Boot prompt as expected.


If you get a message:

Warning - bad CRC, using default environment

in the u-Boot startup, then the u-Boot environment has been reset. You will need to restore any environment settings you had added to your system, and the save the environment using "saveenv".


If you get a message

Error - Checksum on MityDSP-L138 Config Block Checksum Invalid.

You must set the config to FLASH to make permanent

in the u-Boot startup, then the OMAP peripheral configuration block (which selects which emac interface to use, ports to configure, etc.) must be reset and saved. For the industrial I/O board, the default settings should be OK. You can apply the settings be running (and just hitting return for all the prompts):

  U-Boot > config set
  Ethernet Config : 2  [default]
  UART - 0 Configuration ---
  Enable UART : 0  [default]
  UART - 1 Configuration ---
  Enable UART : 1  [default]
  Baud : 115200  [default]
  HW Flow Control : 0  [default]
  Is Console : 1  [default]
  UART - 2 Configuration ---
  Enable UART : 0  [default]
  SPI - 0 Configuration ---
  Enable SPI : 0  [default]
  SPI - 1 Configuration ---
  Enable SPI : 1  [default]
  CLK is Output : 1  [default]
  Chip Select [0] Enable : 01  [default]
  Chip Select [1] Enable : 00  [default]
  Chip Select [2] Enable : 00  [default]
  Chip Select [3] Enable : 00  [default]
  Chip Select [4] Enable : 00  [default]
  Chip Select [5] Enable : 00  [default]
  Chip Select [6] Enable : 00  [default]
  Chip Select [7] Enable : 00  [default]
  ENA ENable : 0  [default]
  CLK Rate : 30000000  [default]
  LCD Configuration  [default]
  LCD Enable : 0  [default]
  U-Boot > config save
  Configuration Saved


More information: Serial Boot and Flash Loading Utility for OMAP-L138

Navigation
Toolbox