EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Write to SerialFlash via SAM-BA

Started by "lukas.jeindl" March 10, 2011
Hi everyone!

I would like to use a SerialFlash (AT25/AT26) for my bootsrap as well as for u-boot storage.

The SAM-BA applets are able to identify, enable and erase the flash I'm using now (M25P16-VMP6G). Even sending of the bootstrap works - meaning it is executed after reset and therefore obviously transferred in some way.

But while transferring any data, the SAM-BA freezes and has to be closed. The trace of the controller (AT91SAM9M10) shows the following:

-I- -- EXTRAM ISP Applet 2.10 --
-I- -- AT91SAM9M10-EK
-I- -- Compiled: Jul 12 2010 15:00:13 --

-I- INIT command:
-I- Communication link type : 2
-I- Data bus width : 16 bits
-I- External RAM type : DDRAM
-I- Init EBI Vdd : 1.8V
-I- Init DDRAM ... (model : 0)
-I- Init successful.
-I- End of applet (command : 0 --- status : 0)

-I- -- SerialFlash AT25/AT26 ISP applet 2.10 --
-I- -- AT91SAM9M10-EK
-I- -- Compiled: Jul 12 2010 15:02:26 --

-I- INIT command: Serialflash 0 : SPI 0 SPI_NPCS 0 (0x300014)
-I- SPI and AT25/AT26 drivers initialized
-I- M25P16 blockSize : 0x10000 bufferAddr : 0x30325c
-I- End of applet (command : 0 --- status : 0)

-I- WRITE at offset: 0x0 buffer at : 0x30325c of: 0x2bd8 Bytes
-I- WRITE at offset: 0x0 buffer at : 0x30325c of: 0x2bd8 Bytes

It seems to try to do the same thing twice here, but after that the bootstrap is in the expected loacation.

If I want to send a larger file (e.g. u-boot) though, the SAM-BA freezes immediately and the controller doesn't say anything on the DBGU port. The only message visible in SAM-BA says:

-I- Writing: 0x20000 bytes at 0x8400 (buffer addr : 0x30325C)

Has anybody experienced a similar problem? The Atmel manual states that all SerialFlash memories are detected automatically. That's the part that obviously works, but then it seems to communicate the wrong way.

Or - better yet - does anybody use or know about a SerialFlash which can be accessed and written to by the SAM-BA without recompiling applets for it?
I think that information would help lots of people here in the future, not everybody seems to be willing to use Atmel DataFlash memories.

Thanks in advance for any help!

Take care,
Lukas


The 2024 Embedded Online Conference