SAMA5D27 SOM1

Moderator: nferre

andyphillips404
Posts: 2
Joined: Wed Jun 26, 2019 8:36 pm

SAMA5D27 SOM1

Wed Jun 26, 2019 8:43 pm

I have just received a new design we developed using the SAMA5D27 SOM1. It was based almost exactly on the evaluation board schematic and i am trying to get it to boot from the SD Card, which it doesn't seem to do so...

I know this is a generally a broad questions, but this is a new board (custom) board that i want to boot up, and should be able to boot up from the same SD card i put in the evaluation board, since the schematics are almost identical. Baring any hardware mistakes, een to the is there anything you need to program (using the SAM-BA) on a new SOM to get it to boot from the SD card? I am having trouble following the instructions online to do so. Any help our guidance here would be great..... I'm a newbie but experienced programmer, just trying to learn your guys tools. I've been to the Linux4Sam website but the instructions and documentation are all for SAM-BA 2.X, and i can't figure out how to get the GUI to give me a SAMA5D27 hardware option on the 2.X, and there is no or limited instructions on the 3.X flavor.... unless i'm missing something which is possible.

Thanks in advanced for any help!
blue_z
Location: USA
Posts: 1977
Joined: Thu Apr 19, 2007 10:15 pm

Re: SAMA5D27 SOM1

Thu Jun 27, 2019 1:56 am

andyphillips404 wrote: ... is there anything you need to program (using the SAM-BA) on a new SOM to get it to boot from the SD card?
You should verify the boot configuration registers.
Refer to the SAMA5D2 SoC datasheet for the description of boot configuration registers.
Study this topic.

andyphillips404 wrote: I've been to the Linux4Sam website but the instructions and documentation are all for SAM-BA 2.X, and i can't figure out how to get the GUI to give me a SAMA5D27 hardware option on the 2.X,
If you check the documentation (e.g. release notes), you would find that the SAMA5D2 is not a supported device.

andyphillips404 wrote: ... there is no or limited instructions on the 3.X flavor.... unless i'm missing something which is possible.
Yes, you are missing something.
There isn't a lot, but there is SAM-BA 3 subsections.
There's HTML documentation in the doc directory of the SAM-BA package.
"The command line interface is designed to be self-documenting."
The salient details (i.e. the available keywords) are listed when you use the built-in help of the command line.
You can invoke the help option for each sub-command/option.

Regards
andyphillips404
Posts: 2
Joined: Wed Jun 26, 2019 8:36 pm

Re: SAMA5D27 SOM1

Thu Jun 27, 2019 8:16 pm

Thanks for the info and links. I'm getting closer i believe.

For my board, i am getting the following when checking the boot configuration:

sudo ./sam-ba -p serial:ttyACM0 -d sama5d2 -a bootconfig -c readcfg:bscr -c readcfg:bureg0 -c readcfg:bureg1 -c readcfg:bureg2 -c readcfg:bureg3 -c readcfg:fuse
Opening serial port 'ttyACM0'
Connection opened.
Executing command 'readcfg:bscr'
BSCR=0x00000000 / BUREG0
Executing command 'readcfg:bureg0'
BUREG0=0x00000000 / QSPI0_IOSET1,QSPI1_IOSET1,SPI0_IOSET1,SPI1_IOSET1,NFC_IOSET1,SDMMC0,SDMMC1,UART1_IOSET1,JTAG_IOSET1
Executing command 'readcfg:bureg1'
BUREG1=0x00000000 / QSPI0_IOSET1,QSPI1_IOSET1,SPI0_IOSET1,SPI1_IOSET1,NFC_IOSET1,SDMMC0,SDMMC1,UART1_IOSET1,JTAG_IOSET1
Executing command 'readcfg:bureg2'
BUREG2=0x00000000 / QSPI0_IOSET1,QSPI1_IOSET1,SPI0_IOSET1,SPI1_IOSET1,NFC_IOSET1,SDMMC0,SDMMC1,UART1_IOSET1,JTAG_IOSET1
Executing command 'readcfg:bureg3'
BUREG3=0x00000000 / QSPI0_IOSET1,QSPI1_IOSET1,SPI0_IOSET1,SPI1_IOSET1,NFC_IOSET1,SDMMC0,SDMMC1,UART1_IOSET1,JTAG_IOSET1
Executing command 'readcfg:fuse'
FUSE=0x00000000 / QSPI0_IOSET1,QSPI1_IOSET1,SPI0_IOSET1,SPI1_IOSET1,NFC_IOSET1,SDMMC0,SDMMC1,UART1_IOSET1,JTAG_IOSET1
Connection closed.

I noticed the FUSE value is not set the same as the evaluation board when running the same command:
FUSE=0x00020000 / QSPI0_IOSET1,QSPI1_IOSET1,SPI0_IOSET1,SPI1_IOSET1,NFC_IOSET1,SDMMC0,SDMMC1,UART1_IOSET1,JTAG_IOSET3

is this an issue?

As well, when i try to run the command to verify the SDCard:
sudo ./sam-ba -p serial -t 5 -b sama5d27-som1-ek -a sdmmc:0 -c verify:linux4sam-poky-sama5d27_som1_ek_video-6.0.img
Opening serial port 'ttyACM0'
Connection opened.
/home/andyphillips404/Desktop/sam-ba_3.2.3/qml/SAMBA/Applet.qml:232: Error: Could not initialize applet (status: 15)
Connection closed.

Any thoughts there? Sorry i really appreciate your help. I opened the line of code in the QML and it looks like it is failing initialization but i don't have any thoughts on why.

Thanks!
Andy P
blue_z
Location: USA
Posts: 1977
Joined: Thu Apr 19, 2007 10:15 pm

Re: SAMA5D27 SOM1

Fri Jun 28, 2019 2:49 am

andyphillips404 wrote: I noticed the FUSE value is not set the same as the evaluation board when running the same command:
is this an issue?
If you're going to claim that there's a difference, then please point out that difference.

If you are not using JTAG, then why would that difference matter to you?

You have successfully used the SAM-BA utility to obtain the boot sequence configuration.
Have you studied the SoC datasheet to understand what any of this means?

The dump of the boot configuration registers indicate that everything is at reset values and no fuses have been blown.
If you are going to compare boards, then why have you solely focused on the fuses difference?
Based on the fuse values, there has to be other register differences between boards if you are actually able to boot the evaluation board from SD card.

The (immediate) solution should be obvious if you expend a little effort.
(I could just give you a fish, but I'm trying to show you how to fish.)

andyphillips404 wrote: Any thoughts there? Sorry i really appreciate your help. I opened the line of code in the QML and it looks like it is failing initialization but i don't have any thoughts on why.
I don't have the time nor interest to download a new version and look at SAM-BA code.
You will have to investigate and narrow down what is being initialized that fails. Main memory, i.e. DRAM, is normally the crucial item especially with an untested custom board, but not with a SOM.

You seem to blindly use the suggested commands.
You neglect to mention which SD card interface you are actually using.

Regards
nferre
Site Admin
Posts: 207
Joined: Wed Feb 14, 2007 11:17 am

Re: SAMA5D27 SOM1

Thu Jul 04, 2019 9:56 am

Hi,

FUSES of the Microchip evaluation boards are adapted to the real hardware of the board. So here, for instance, you see that JTAG on IOSET3 is programmed because the JTAG connector uses these pins of the SoC.
On other boards, it's the External Boot bit that is set in factory, according to External flash chip availability.

You'll have to adapt the FUSE bits according to your hardware. For doing so, you can test your bit arrangement with BUREG feature, so that you're sure about it before making it permanent.

Hope that it helps.

Return to “SAMA5-based”

Who is online

Users browsing this forum: No registered users and 2 guests