Recovery Mode on Apalis IMX6

Hi,

I’m trying to enter recovery mode and then flash a Demo Image on it.
I follow those steps :
Recovery Mode:

  • Have the module in recovery mode and
    load U-Boot over USB to the module’s
    RAM:
  • lsusb on host should show a
    15a2:0054 NXP/Freescale
    Semiconductor, Inc. device if the
    module is in recovery mode.
  • run ./update.sh -d on host. stop
    at the U-Boot prompt and begin the
    update as stated for the
    respective modules above.

That’s ok for 2 first steps. For the run update, should I mount the device printed by lsusb (I don’t know it’s name…)? Should I maintain pins shorted during all this procedure (pin described in 6. Recovery Mode section) ?

Thanks for helping.

You need to have an SD card prepared as described in initial preparation. Once the module is in recovery mode, the pins need not be shorted anymore. The device printed by lsusb is not to be mounted. Assuming the SD card is plugged in and one is at the u-boot prompt, one then needs to issue the commands from u-boot prompt

run setupdate
run update

to complete the update process.

For the third step (./update.sh -d), I have this issue :

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=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 (0x00000000)
status failed

What happens ?

At the second try :

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=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-it.imx
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)

No idea ?

A few clarifying questions:

  1. How exactly did you put your module into recovery mode?
  2. Could it be that you messed with the fuses at all?
  3. What exact module type and version are you trying this with?
  4. Could it be that you tried flashing the IT version onto a non-IT module or vice versa?

For your reference this is how it should look on a Apalis iMX6Q 1GB V1.1A:

[user@host ~]$ lsusb | grep -i free
Bus 002 Device 026: ID 15a2:0054 Freescale Semiconductor, Inc. i.MX 6Dual/6Quad SystemOnChip in RecoveryMode
[user@host Apalis_iMX6_LinuxImageV2.6.1]$ ./update.sh -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

loading binary file(../apalis-imx6_bin/u-boot.imx-it) to 177ff400, skip=0, fsize=4ec00 type=aa

<<<322560, 322560 bytes>>>
succeeded (status 0x88888888)
jumping to 0x177ff400

And the serial debug console should then show the following for you to continue the run setupdate; run update:

U-Boot 2015.04+fslc+g46aa70c (Sep 29 2016 - 21:46:54)

CPU:   Freescale i.MX6Q rev1.5 at 792 MHz
CPU:   Temperature 28 C
Reset cause: WDOG
I2C:   ready
DRAM:  1 GiB
PMIC: device id: 0x10, revision id: 0x11
PMIC: programmed
MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
Serial Downloader mode, not loading environment
Using default environment

auto-detected panel HDMI
Display: HDMI (1024x768)
In:    serial
Out:   serial
Err:   serial
MMC partition switch failed
raise: Signal # 8 caught
Missing Toradex config block
Model: Toradex Apalis iMX6 1GB
Net:   using PHY at 7
FEC [PRIME]
Error: FEC address not set.

Run bootcmd_mfg: <NULL>
Apalis iMX6 #

You do not need to maintain pins shorted during the procedure. I have had seen similar issues on a device which uses a USB 3 docking station, can you try different connection options (directly attached, through a USB 2 hub?).

Hi @marcel.tx,

Thanks for your answer.

  1. How exactly did you put your module
    into recovery mode? - I shorted pins as described in apalis datasheet and then power on the module.
  2. Could it be that you messed with the
    fuses at all? No I only messed with vidargs and nfsargs etc…
  3. What exact module type and version
    are you trying this with? I’m trying to recovery Apalis iMX6Q 1GB V1.1A
  4. Could it be that you tried flashing
    the IT version onto a non-IT module
    or vice versa? I have a non IT module and take care to flash with a non-It version.

However, event if I don’t put the module in recovery mode (by shorted the pins) the module is present in lsusb output under the name Freescale Semiconductor, Inc. i.MX 6Dual/6Quad SystemOnChip in RecoveryMode . I don’t know why…

As you advice, I’ll try with a USB 2.0 hub and then report result here.

Regards

Ok, update.sh successful on an older computer based on Linux.

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
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

loading binary file(../apalis-imx6_bin/u-boot.imx) to 177ff400, skip=0, fsize=4ec00 type=aa

<<<322560, 322560 bytes>>>
succeeded (status 0x88888888)
jumping to 0x177ff400

I made two try : one with filename …/apalis-imx6_bin/u-boot.imx-it and one with filename …/apalis-imx6_bin/u-boot.imx
But still not have access to the console.

I have about 5 target to reset, any help will be appreciate.

Regards.

Your output looks good, I don’t see why this should not work. What carrier board do you use? How do you connect your serial console? Just for clarification, these are the steps and the results you should see:

  1. Enter recovery mode → lsusb on your host should show the device
  2. Run ./update -d on the host → On the host, you should see an output as you posted, ending with jumping to 0x177ff400. On the UART1 serial console at 115200 baud rate you should see the U-Boot banner and startup output as Marcel posted above (connected to UART1, e.g. when using the Apalis Evaluation Carrier Board, you can use USB X29 and jumper JP10/12 set to USB, or bottom X28 RS232 DB-9 connector when JP10/12 are not set to USB).

I use a homemade carrier board. I connect the board with a USB cable from APALIS-UART1 (UART-FULL) to my computer and log in with miniterm/putty over a FT230X controller. Only Rx and Tx are used.

Console in normal way works.

Hi,

I’m still trying to recover apalis modules. I’ve tried with Toradex Easy Installer with no success on Linux and Windows and with an USB 2.0 adapter :

Downloading Toradex Easy Installer...
Could not open device vid=0x1b67 pid=0x4fff

Downloading Toradex Easy Installer failed...

When I try to recover with manual method (i.e through ./update.sh -d), the download works fine (jumping to 0x177ff400) but there is no prompt on UART.

You say “Could it be that you tried flashing the IT version onto a non-IT module or vice versa?”
But it appears that in update.sh script there is no difference between IT and non IT version right ?

#is only U-Boot to be copied to RAM?
if [ "$UBOOT_RECOVERY" -ge 1 ] ; then
	cd ${LOCPATH}
	#the IT timings work for all modules, so use it during recovery
	sudo ./imx_usb ../${BINARIES}/${U_BOOT_BINARY_IT}
	exit
fi

By the way, I’m still stuck with 5 modules out of order. Any ideas ?

Sorry, @VincentB did you ever resolve your issues?