Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Write to SerialFlash via SAM-BA
PostPosted: Thu Mar 10, 2011 4:05 pm 
Offline

Joined: Sat Jan 22, 2011 3:25 pm
Posts: 3
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


Top
 Profile  
 
 Post subject: Re: Write to SerialFlash via SAM-BA
PostPosted: Thu Mar 10, 2011 8:37 pm 
Offline

Joined: Wed Jan 09, 2008 5:09 pm
Posts: 186
Location: Mounds View, MN
Have you tried changing the report level to debug? I usually get more information on SAM-BA issues when I do that. Also are you using the latest version of SAM-BA?

I have booted a 9G20 design using a serial Flash chip, but only the bootstrap was on the serial Flash. Everything else was on the NAND Flash.

_________________
Tim Barr
Multitech Inc.


Top
 Profile  
 
 Post subject: Re: Write to SerialFlash via SAM-BA
PostPosted: Tue Mar 15, 2011 5:57 am 
Offline
User avatar

Joined: Mon Jul 19, 2010 8:47 pm
Posts: 59
Hi Lukas,

I've successfully programmed a 4 MB Macronix MX25L3205D serial flash with SAM-BA and a AT91SAM9G20. I was able to put AT91Bootstrap, U-boot, and the Linux kernel all in the serial flash and boot each in sequence. I didn't have to do anything unpleasant to the applet to make it work.

I previously had some trouble with an SST serial flash, so I spent some time probing the SPI lines and digging around in the applet source. Here are a few relevant posts that cover some of the stuff I did:

viewtopic.php/f,9/t,19628/
viewtopic.php/f,26/t,19621/
viewtopic.php/f,26/t,19615/

Feel free to contact me if you're stuck. I believe my contact info is findable on the internet.

Brandon

_________________
Brandon Stafford
Rascal Micro


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 20 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: