Welcome, Guest

Author Topic: AM3352-SOM Standalone not booting debian image  (Read 4705 times)

Jara

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
AM3352-SOM Standalone not booting debian image
« on: January 12, 2016, 11:00:30 AM »
Hello,
I have standalone AM3352-SOM, connected UART and 5V supply, Debian image in microSD (purchased at Olimex).
The board refuses to boot - I get this output only:


U-Boot SPL 2013.10-00189-g78d8ebd-dirty (Feb 12 2015 - 12:06:53)
get_dpll_ddr_params
set_mux_conf_regs
--DEBUG-- Configuring i2c1 pinmux
--DEBUG-- Configuring mii1 pinmux
--DEBUG-- Configuring mmc0 pinmux
--DEBUG-- Configuring mmc1 pinmux
sdram_init
am33xx_spl_board_init
spl_board_init end
mmc_send_cmd : timeout: No status update
mmc fail to send stop cmd
mmc args blk read error
mmc_send_cmd : timeout: No status update
spl: mmc blk read err - 0
### ERROR ### Please RESET the board ###

U-Boot SPL 2013.10-00189-g78d8ebd-dirty (Feb 12 2015 - 12:06:53)
get_dpll_ddr_params
set_mux_conf_regs
--DEBUG-- Configuring i2c1 pinmux
--DEBUG-- Configuring mii1 pinmux
--DEBUG-- Configuring mmc0 pinmux
--DEBUG-- Configuring mmc1 pinmux
sdram_init
am33xx_spl_board_init
spl_board_init end
mmc_send_cmd : timeout: No status update
spl: mmc blk read err - 0
mmc_send_cmd : timeout: No status update
spl: mmc blk read err - 0
### ERROR ### Please RESET the board ###


UART is working, I use lab power supply with plenty of amps (the board draws 0.23A@5V), Uboot is loading...
Any ideas what the problem might be?

JohnS

  • Hero Member
  • *****
  • Posts: 1726
  • Karma: +34/-48
Re: AM3352-SOM Standalone not booting debian image
« Reply #1 on: January 12, 2016, 03:03:29 PM »
Looks like it can't read the SD card (mmc ...).

Could be not seated properly, bent pin, dirt, bad card, corrupted data, ...

John

Jara

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: AM3352-SOM Standalone not booting debian image
« Reply #2 on: January 12, 2016, 09:14:55 PM »
Hi,

I bought another microSDHC card, dd'ed the image AM3352_debian_3_12_VGA_1024x768_preliminary_release_3.img -> same result. So the card is not a culprit. The error reading SD card is reported by a program (UBoot) that has been itself read from the card; it's strange.

Jara

Jara

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: AM3352-SOM Standalone not booting debian image
« Reply #3 on: January 20, 2016, 08:14:56 PM »
Hello,
I emailed with Olimex support and after some emails back and forth they discovered that it is a bug in the design of SOM:

Quote
Hello Jaroslav,

The good news is that I managed to replicate the problem and it affects all AM3352-SOM boards; the bad news is that we still don’t have a fix! However, we are working on it since this is a serious problem.

I used to test with 4GB card in my previous e-mail – that is why everything seemed to work fine. I got the boot problems when I tried with a 8GB card. So far what I have determined:

1) The problem doesn’t seem to occur at all when using the –EVB board at the bottom of the SOM board.

2) The problem is less likely to occur when using 4GB card (compared to using 8GB card).

For now we are still evaluating what is causing this behavior and if there is a software fix available. I would keep you updated.

Best regards,
Lub/OLIMEX

Buying -EVB is not a solution for me because I want to use SOM with my own baseboard with RGMII available on a connector. I will try 2GB sd card if I can find one.

Jaroslav.

LubOlimex

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1968
  • Karma: +50/-3
Re: AM3352-SOM Standalone not booting debian image
« Reply #4 on: January 28, 2016, 12:09:58 PM »
Hey,

We believe it was related to a certain bug in the software configuration (misconfiguration of a single pin kept the SD detect signal at improper level).

Thank you for the patience.

Can you test with the latest release #4? The torrent is available here: https://www.olimex.com/wiki/images/c/c6/AM3352_debian_3_12_VGA_1024x768_preliminary_release_4.torrent .

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

avlk

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: AM3352-SOM Standalone not booting debian image
« Reply #5 on: January 28, 2016, 04:41:11 PM »
Dear all,

I have been facing the same problem with my AM3352-SOM mounted on custom baseboard. I have noticed that with Olimex special u-boot 13.10 the image will load 2 times of 3. But with the trunk u-boot it doesn't boot at all.
I decided to solve the puzzle from the hard end and make a working port for trunk u-boot (16.01+). Here is my port, please check: https://github.com/avlk/u-boot

To compile I use linaro cross-toolchain shipped with Ubuntu.
 
git checkout https://github.com/avlk/u-boot.git
cd u-boot
export CROSS-COMPILE=arm-linux-gnueabihf-
make am335x_olimex_som_defconfig
make

you get MLO and u-boot.img files, which you have to put in the boot partition of an SD card.

Shortly what I have found:
1. DDR3 needs some delay after being initialized to finish this procedure. There was no delay.
2. For that reason the BSS initialization loop that followed almost immediately failed from time to time. In latest u-boot SPL it failed more often than not.
3. In common/spl/spl_fat.c there is a variable 'fat_registered' which was not initialized properly. But even if it was initialized with '0' it would get into BSS. As BSS was not initialized, this variable had non-zero value, and the 'spl_register_fat_device' did not register FAT on MMC, and all further operations failed.
That is the reason why AM3352's ROM booted SPL from MMC, but SPL failed to boot the u-boot image.

So, it was not a problem with SD card in my case.

Please, check the u-boot and comment. I'm planning to submit a pull request to mainline u-boot if testing will be OK.

Jara

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: AM3352-SOM Standalone not booting debian image
« Reply #6 on: January 28, 2016, 09:12:25 PM »
Hello,
I checked the release 4 image and it works well!
I don't have linaro installed at the moment, so I cannot try avlk's sources.

Regards,
Jaroslav.

LubOlimex

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1968
  • Karma: +50/-3
Re: AM3352-SOM Standalone not booting debian image
« Reply #7 on: January 29, 2016, 01:45:23 PM »
Hey,

Glad that it works now.

To be more specific on the fix (for people that faced similar problem and want to fix their custom-made images) the change is shown in this commit: https://github.com/SelfDestroyer/u-boot-2013.10-ti2013.12.01-am3352_som/commit/c8185c480ad48bba416c3e546c3232faf17a4841 - the card detect pin should not be pulled up.

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex