SAMA5D27_SOM1_EK, failed to write to QSPI1 using SAM_BA

Moderator: nferre

Talqaisi
Posts: 3
Joined: Thu Apr 18, 2019 3:55 pm

SAMA5D27_SOM1_EK, failed to write to QSPI1 using SAM_BA

Thu Apr 18, 2019 4:22 pm

Hello,
I am trying to flash the QSPI on the board using SAM-BA. It says it wrote the .bin to QSPI1 but failed the verification. Please see below.
I am new to this controller and toolset, any help is greatly appreciated.

PS C:\Users\i01505335\Documents\work\sam-ba_3.2.3> .\sam-ba.exe -p jlink -d sama5d2 -a bootconfig -c writecfg:bureg0:ext
_mem_boot,qspi1_ioset2,jtag_ioset3
Opening J-Link with S/N '483047510'
Found Atmel SAMA5D2 device
Disabling watchdog
Connection opened.
Executing command 'writecfg:bureg0:ext_mem_boot,qspi1_ioset2,jtag_ioset3'
Setting BUREG0 to 0x00060004 (QSPI0_IOSET1,QSPI1_IOSET2,SPI0_IOSET1,SPI1_IOSET1,NFC_IOSET1,SDMMC0,SDMMC1,UART1_IOSET1,JTAG_IOSET3,EXT_MEM_BOOT)
Connection closed.
PS C:\Users\i01505335\Documents\work\sam-ba_3.2.3> .\sam-ba.exe -p jlink -d sama5d2 -a bootconfig -c readcfg:bscr -c rea
dcfg:BUREG0
Opening J-Link with S/N '483047510'
Found Atmel SAMA5D2 device
Disabling watchdog
Connection opened.
Executing command 'readcfg:bscr'
BSCR=0x00000000 / BUREG0
Executing command 'readcfg:BUREG0'
BUREG0=0x00060004 / QSPI0_IOSET1,QSPI1_IOSET2,SPI0_IOSET1,SPI1_IOSET1,NFC_IOSET1,SDMMC0,SDMMC1,UART1_IOSET1,JTAG_IOSET3,EXT_MEM_BOOT
Connection closed.
PS C:\Users\i01505335\Documents\work\sam-ba_3.2.3> .\sam-ba.exe -p j-link -b sama5d27-som1-ek -a qspiflash -c writeboot:
getting-started.bin -c verifyboot:getting-started.bin
Opening J-Link with S/N '483047510'
Found Atmel SAMA5D2 device
Disabling watchdog
Connection opened.
Detected memory size is 8388608 bytes.
Page size is 256 bytes.
Buffer is 90368 bytes (353 pages) at address 0x00229e60.
Supported erase block sizes: 4KB
Executing command 'writeboot:getting-started.bin'
Appending 64 bytes of padding to fill the last written page
Wrote 25088 bytes at address 0x00000000 (100.00%)
Executing command 'verifyboot:getting-started.bin'
Appending 64 bytes of padding to fill the last written page
Error: Command 'verifyboot:getting-started.bin': Failed verification. First error at offset 0x00000014
Connection closed.
PS C:\Users\i01505335\Documents\work\sam-ba_3.2.3>

Thank you!!
blue_z
Location: USA
Posts: 1957
Joined: Thu Apr 19, 2007 10:15 pm

Re: SAMA5D27_SOM1_EK, failed to write to QSPI1 using SAM_BA

Thu Apr 18, 2019 9:25 pm

Talqaisi wrote: ... failed to write to QSPI1 using SAM_BA
...
It says it wrote the .bin to QSPI1 but failed the verification.
Your title does not match the symptom that you describe.
The symptom that you report does not support your hasty (and unsubstantiated) conclusion.

Talqaisi wrote: Error: Command 'verifyboot:getting-started.bin': Failed verification. First error at offset 0x00000014
Byte offset 0x14 would correspond to 32-bit word offset 5, which is the location (the sixth word) in the ARM exception vector that is hijacked to store the byte length of the boot image.
In case the 2nd-stage boot program does not install its byte length at this location, the SAM-BA utility program will always write this length that the SoC ROM boot is expecting.

You can either modify word 5 of the boot image, or transfer the full boot image back to the host PC, and perform a full byte-by-byte comparison. If word 5 is the only difference, and word 5 matches the byte length (in little endian order), then there is no write issue.

Regards
Talqaisi
Posts: 3
Joined: Thu Apr 18, 2019 3:55 pm

Re: SAMA5D27_SOM1_EK, failed to write to QSPI1 using SAM_BA

Thu Apr 18, 2019 10:10 pm

Your reply is very helpful!! Thank you!
I didn't come up with any conclusions, I only stated what the tool (SAM_BA) reported.
Error: Command 'verifyboot:getting-started.bin': Failed verification. First error at offset 0x00000014
Thanks!
Talqaisi
Posts: 3
Joined: Thu Apr 18, 2019 3:55 pm

Re: SAMA5D27_SOM1_EK, failed to write to QSPI1 using SAM_BA

Thu Apr 18, 2019 10:22 pm

Hello,
Thank you! That was very helpful!!

Return to “SAMA5-based”

Who is online

Users browsing this forum: No registered users and 11 guests