Failed USB recovery on Apalis iMX6

Hello, I can’t recover Apalis iMX6 SoM after failed u-boot upgrade.

I can put SoM to recovery mode by shorting pads as described in the datasheet, but after invoking “./update.sh -m 0 -d”, it ends with “w3 in err=-7, last_trans=0 00 00 00 00”, like this:

root@galaxy:/home/stano/Desktop/Toradex/Apalis_iMX6_LinuxImageV2.6# ./update.sh -m 0 -d
Apalis iMX6 rootfs detected
config file <./imx_usb.conf>
vid=0x066f pid=0x3780 file_name=mx23_usb_work.conf
vid=0x15a2 pid=0x004f file_name=mx28_usb_work.conf
vid=0x15a2 pid=0x0052 file_name=mx50_usb_work.conf
vid=0x15a2 pid=0x0054 file_name=mx6_usb_work.conf
vid=0x15a2 pid=0x0061 file_name=mx6_usb_work.conf
vid=0x15a2 pid=0x0063 file_name=mx6_usb_work.conf
vid=0x15a2 pid=0x0071 file_name=mx6_usb_work.conf
vid=0x15a2 pid=0x007d file_name=mx6_usb_work.conf
vid=0x15a2 pid=0x0076 file_name=mx7_usb_work.conf
vid=0x15a2 pid=0x0041 file_name=mx51_usb_work.conf
vid=0x15a2 pid=0x004e file_name=mx53_usb_work.conf
vid=0x15a2 pid=0x006a file_name=vybrid_usb_work.conf
vid=0x066f pid=0x37ff file_name=linux_gadget.conf
config file <./mx6_usb_work.conf>
parse ./mx6_usb_work.conf
15a2:0054(mx6_qsb) bConfigurationValue =1
Interface 0 claimed
HAB security state: development mode (0x56787856)
== work item
filename ../apalis-imx6_bin/u-boot.imx-it
load_size 0 bytes
load_addr 0x00000000
dcd 1
clear_dcd 0
plug 1
jump_mode 2
jump_addr 0x00000000
== end work item
main dcd length 310
sub dcd length 30c
w3 in err=-7, last_trans=0  00 00 00 00
addr=0x021b001c, val=0x02888032
w4 in err=-7, last_trans=0  00 00 00 00
!!perform_dcd returned -7
HAB security state: development mode (0x00000000)

It seems very similar to this question, except I have Apalis SoM and can’t figure out which testpoints I could use to disable internal eMMC.

I use Ixora V1.1A board.

Hello sravas

Can you tell me which Software version and BSP you are using?

How did you arrive to this failed u-boot upgrade? Did you flashed the wrong software or your own software?
I will suggest you to put SoM to recovery mode by shorting pads as described in datasheet and powering it on (and not by resetting).

I flashed no-spl colibri-imx6 u-boot build to emmc by accident (in hurry) - so totally wrong - mismatching board configuration and wrong no-spl image. U-boot was my own build, I do it on daily basis, this was just accident.

I tried recovery with BSP V2.6 and V2.7.4.

I short the recovery pads, then turn on the power supply. I can see Freescale VID:PID on USB bus (lsusb), I can start update.sh, it sees the board too, but it fails while downloading u-boot image as written in my initial message.

Hi sravas

We are working on this issue. We will give you an update next week. Sorry for the delay.

Hi

Can you try to use the latest 2.8 image for recovery, if you get that U-Boot running in DDR you still can insert an SD card to do the ‘run setupdate; run update’ with a 2.6 image.

I flashed a colibri_imx6_nospl_defconfig 2016.11 U-Boot on an Apalis iMX6 and was able to recover from that module by forcing recovery mode and then using above procedure.


Alternatively you could try to use the attached patch on top U-Boot 2016.11 2.8b1. This will build U-Boot with SPL. Use apalis_imx6_defconfig + config changes as outlined in the patch. Put the Apalis in recovery and run
sudo ./imx_usb
(The SPL runs in i.MX internal RAM and is thus unaffected by a wrongly setup DDR RAM.)

This tries to delete the beginning of U-Boot, in my testing this sometimes fails with printing ERROR, so I had to execute it twice until I got an ‘OK’ output.

After that try to recover with the regular ‘update -d’.

A failed attempt looks as follows:

MMC erase: trying to erase IVT ...

Caution! Your devices Erase group is 0x400
The erase range would be change to 0x0~0x3ff

Timeout waiting for DAT0 to go high!
mmc erase failed
ERROR

SDP: initialize...
SDP: handle requests...

while a good one looks:

MMC erase: trying to erase IVT ...

Caution! Your devices Erase group is 0x400
The erase range would be change to 0x0~0x3ff

OK

SDP: initialize...
SDP: handle requests...

Max

Note that the test points are on the PCB backside, so in order to use them one would have to solder a wire there, add a short and release the short before updating. So that path is impractical.