If you’ve ever looked closely at the Sabre Lite or Nitrogen6X boards, you’ll see that there are two DIP switches and some notation on the silk screen indicating their use.
- 00 – Fuses
- 01 – USB
- 10 – Internal
These switches can be used to override the normal boot flow and force a boot to the USB OTG port.
If you set the switches to the USB setting and reset the board or cycle power, you should see a “Freescale” device show up in lsusb
Bus 008 Device 002: ID 044e:3017 Alps Electric Co., Ltd BCM2046 Bluetooth Device
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
--> Bus 006 Device 012: ID 15a2:0054 Freescale Semiconductor, Inc.
Bus 006 Device 006: ID 06cd:0119 Keyspan USA-19QW PDA
Bus 006 Device 004: ID 04f2:0841 Chicony Electronics Co., Ltd
Combined with the right tools, this can be used to un-brick a board whose serial EEPROM has been trashed, or to program the serial EEPROM on a board which has never been programmed.
Freescale has a tool (the Manufacturing tool) that will do this. It will allow you to program not only the serial EEPROM on a board, but also SD cards, NAND, and NOR flash you might have attached to your device.
That’s pretty heavy-weight though. It also requires Windows, which isn’t present on many development machines, and it won’t run on an i.MX board.
To address these issues, we built our own, and made the sources available on GitHub:
This tool is much more lightweight. In normal use, it simply loads a named file into RAM and executes it. If you run it like so, you can launch a U-Boot binary directly.
~/imx_usb_loader$ ./imx_usb u-boot.imx
If you’re running the older U-Boot (2009.08 code base), you’ll need to specify u-boot.bin
~/imx_usb_loader$ ./imx_usb u-boot.bin
If everything goes as planned, you should see U-Boot launch (output on the serial console)
If you’ve gone through all of this, you might ask how this un-bricks the board.
It doesn’t. But once you have U-Boot running, you can use U-Boot to upgrade the serial EEPROM using the upgradeu
command as discussed in this blog post:
To run imx_usb
, you’ll need to have libusb installed on your machine.
If you’re using an Ubuntu or Debian machine, you should be able to do this:
~$ sudo apt-get install libusb-1.0-0
To compile it, you’ll need the libusb headers, which can be installed by grabbing the -dev
~$ sudo apt-get install libusb-1.0-0-dev