boot from spi serial flash on SAMA5D3 Xplained

Discussion around products based on ARM Cortex-A5 core.

Moderator: nferre

MrHat
Posts: 10
Joined: Mon May 16, 2016 1:56 pm

boot from spi serial flash on SAMA5D3 Xplained

Tue May 17, 2016 3:06 am

Hi,

The SAMA5D3 Xplained board has several options for booting; one is from the Nand flash (that is populated on the board), another is with SPI serial flash (that is not populated).

I have some bare metal designs that I want to boot from on-board memory, and have had success with the Nand flash, using SAMBA2.15. I have placed an N25Q032A serial flash chip on MN8; SAMBA recognises the chip and appears to be able to write a boot file to it. However, the writing is not successful and the board will not boot from this memory.

SAMBA2.15 supports Micrel SPI flash N25Q256 - the N25Q032 has the same attributes ( just less blocks) and is the chip suggested to place at MN8 according to the schematic.

Has anyone reading this post had any experience with serial flash on this board?

I notice there is a new version of SAMBA available, perhaps that version supports a wider range of serial flash chips - will try...

Thanks,
neubi
Posts: 5
Joined: Fri Aug 08, 2014 9:55 am

Re: boot from spi serial flash on SAMA5D3 Xplained

Thu May 19, 2016 8:17 am

hi,

we are using the D36 with an external spi-bootflash without any issues. We are programming the external flash via SAM-BA 2.15 and/or 2.16 without any issues - our serial flash is a Winbond W25X40CLSNIG

don't forget to "Enable Serial Flash" and program the bootstrap via "Send Bootfile" (not via sendfile)!
otherwise you have to modify the SAM-BA applets

br,
Andy
MrHat
Posts: 10
Joined: Mon May 16, 2016 1:56 pm

Re: boot from spi serial flash on SAMA5D3 Xplained

Fri May 20, 2016 1:06 am

Thanks for that reply Andy,

glad to know that the system works with other flash chips.

I have continued to work on this, and have placed an M25P40 spi serial flash chip on one of my boards.
This chip is supported (along with other M25 series flash chips from ST) as can be seen from the debug output....

RomBOOT

-I- -- SerialFlash AT25/AT26 applet 2.16 --

-I- -- SAMA5D3x-EK

-I- SPI and AT25/AT25 drivers initialized

-I- -- jedecId is 132020

-I- M25P05 blockSize : 0x8000 bufferAddr : 0x20009c50

-I- %End of applet (command : 0 --- status : 0)

I can successfully boot from a binary (of size 18372 bytes) with the M25P40 chip, but not with another larger binary (size 36988 bytes). I think the upper limit is 64K, (0xFFFF), so the larger binary image should fit .... this behavior is strange. Both binaries boot using the Nand flash.

The larger binary gets loaded at 0x8000 and has corrupted data (including vector 6 with the binary file size). While the smaller binary is loaded at 0x0000.

I can write the binary to SPI flash (using the SAMBA as apposed to the load boot file script) and the boot works OK. Not really sure what the load boot script adds to the process.

As for the Micrel 25Q032 SPI flash chip, it appears to look OK, but data writing is not successful....

-I- -- SerialFlash AT25/AT26 applet 2.16 --

-I- -- SAMA5D3x-EK

-I- SPI and AT25/AT25 drivers initialized

-I- -- jedecId is 16ba20

-I- Enter 4-byte address mode.

-I- N25Q256 blockSize : 0x1000 bufferAddr : 0x20009c50

-I- %End of applet (command : 0 --- status : 0)

Regards,

Peter
MrHat
Posts: 10
Joined: Mon May 16, 2016 1:56 pm

Re: boot from spi serial flash on SAMA5D3 Xplained

Sat Feb 25, 2017 2:06 am

Follow up on known working SPI-Flash chips for ATSAMA5D3:

ST M25P series SPI-Flash are now obsolete. This leaves a smaller range of supported SPI-Chips for the SAM-BA / ROM Monitor tool-chain.

I have tested a few other chips on the SAMA5D3 Xplained board:
(Using SAM-BA 3.1.3)

SST25VF040B (Microchip) - initialises OK, erases but does not write successfully
AT25DF021A (Adesto) - fails to initialise

I have ordered W25X20CLSNIG (Winbond) to test, as the W25X40CLSNIG chips are reported to work on a previous post.

Return to “SAMA5D Cortex-A5 MPU”

Who is online

Users browsing this forum: No registered users and 1 guest