Welcome to AT91SAM Community Discussions

SAMA5D27-SOM1 not booting from SDCard ?

SAMA5D27-SOM1 not booting from SDCard ?

Posted: Wed Jun 13, 2018 2:08 pm

by Niino

Hello,

I have a custom board with the SAMA5D27-SOM1 mounted, the schematic is a lot based on the kit (SAMA5D27-SOM1-EK), with less peripherals.

According to the documentation, I understood that the SOM, by default, starts up with ROMBoot, then tries to boot from SDMMC1 followed by SDMMC0 and if none of these twos is bootable it launches the SAM-BA monitor. Am I understanding this right, is this som following the MRL C Parts Booting procedures ?

Where is the ROMBoot code saved? Within the chip or on the embedded QSPI flash ?

I then tried to use SAM-BA with a j-link through jtag, and I keep getting the same error:

Error: Unspported device

After searching in the source code of SAM-BA this error can occur from 2 situations:
1) J-Link cant find the proper core

2) It can't find the core ID

So i'm not sure if the SOM is just broken after a bad manipulation, or if I'm missing something, if you need more info don't be afraid to ask!

Thanks in advance,
Regards

Re: SAMA5D27-SOM1 not booting from SDCard ?

Posted: Thu Jun 14, 2018 2:11 am

by blue_z

Niino wrote:I have a custom board with the SAMA5D27-SOM1 mounted,
...
So i'm not sure if the SOM is just broken after a bad manipulation,

Anything is possible, but that's not the most probable.
Instead your custom board should be suspect for every issue that you mention, since you neglect to mention any other testing besides these failures.

Niino wrote:According to the documentation, I understood that the SOM, by default, starts up with ROMBoot, then tries to boot from SDMMC1 followed by SDMMC0 and if none of these twos is bootable it launches the SAM-BA monitor. Am I understanding this right, is this som following the MRL C Parts Booting procedures ?

That's the default behavior, assuming that the BSC_CR is zero.

Niino wrote:Where is the ROMBoot code saved? Within the chip or on the embedded QSPI flash ?

The SoC datasheet clearly states in the second line of section 16 that "the ROM code is a boot program contained in the embedded ROM."
Flash memory, by its very definition (i.e. it's erasable and writable) is not ROM.

Niino wrote:... or if I'm missing something,

What basic tests (e.g. with an oscilloscope) have you performed on your custom board?
Have you checked for output (i.e. the "RomBOOT" text) on the DBGU port (the console defaults to UART1 IOSet1)?

Regards

Re: SAMA5D27-SOM1 not booting from SDCard ?

Posted: Thu Jun 14, 2018 2:15 pm

by Niino

Hello blue_z, thanks for your answer.

blue_z wrote: ↑
What basic tests (e.g. with an oscilloscope) have you performed on your custom board?

I forgot to mention some of the tests indeed, my bad. I mainly tested Alimentations in global, and if there was activity on different pins of the SD Card, there was one "weird", in my knowledge, behaviour on the SD CLK it's sometimes going from 3.3V to 0V then 1.8V and then 3.3V again. I now did the same measurement on the Evaluation kit and the result was the same. So i guess it's normal.

blue_z wrote: ↑
Have you checked for output (i.e. the "RomBOOT" text) on the DBGU port (the console defaults to UART1 IOSet1)?

Thanks for this info, seems like I missed the DBGU port part. The RomBOOT text is showing up. If I add an SD Card it starts the AT91Bootstrap and then gets stuck. (This SD Card works perfectly fine on the EK).

Re: SAMA5D27-SOM1 not booting from SDCard ?

Posted: Thu Jun 14, 2018 8:28 pm

by blue_z

Looks like you need to update to the very latest version of AT91Bootstrap from github, as there was a commit dated 6 days ago for SDcard that was applied last night.
At the very least the console output will be more informative. Instead of just "SDHC: Error detected in status", the normal and error status values will be reported.

Regards

Re: SAMA5D27-SOM1 not booting from SDCard ?

Posted: Fri Jun 15, 2018 3:53 pm

by Niino

Thanks a lot for your help ! We found the issue, it was in the routing of the SD card signals, they had too much length diffrencies.

The JTAG issue is not yet fixed, but we couldn't investigate a lot more but it isn't a problem for now.

Regards

Re: SAMA5D27-SOM1 not booting from SDCard ?

Posted: Fri Jun 15, 2018 10:20 pm

by iguffick

The default fuse configuration does not enable JTAG.
To enable JTAG you'll need to use Sam-ba to set the FUSE or BUREG (using the UART or USB).
Once enabled with Sam-ba, reset and try to connect with JTAG.
Make sure you don't boot anything else, or that may also disable the JTAG. You can use the boot disable if your boot memory contains a bootable program.