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  [ 57 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject: Re: AT91SAM9G20 - Bootstrap with SerialFlash - how do you do it?
PostPosted: Tue Jul 27, 2010 9:53 am 
Offline

Joined: Mon Jul 05, 2010 8:10 am
Posts: 38
TKL wrote:
We have a NAND Chip onboard. But in a NAND memory bits can get errors without warning and you need an algorithm to correct such failures. This algorithm has to be stored in the bootloader. Since it makes no sense to store it on the NAND itself we want to use a serial flash for it to solve this possible problem.


Really,
but at the at91sam9g45-ekes the bootloader is stored in the nand flash?
after booting linux who correct those errors? i want to make an custom board for the at91sam9g45.
thx


Top
 Profile  
 
 Post subject: Re: AT91SAM9G20 - Bootstrap with SerialFlash - how do you do it?
PostPosted: Tue Jul 27, 2010 9:57 am 
Offline

Joined: Thu Feb 11, 2010 7:47 pm
Posts: 29
I have not worked with the 9G45 DevBoard so far. Under Linux these errors are normally handled by the filesystem afaik. But before Linux ist started, no one handles them. This is why a serial flash is used in critical applications, to store the boot code and other critical data so it cannot be corrupted. At least this is how it has been explained to me...

Ah and one should implement an ECC Algorithm in the Boot code to be able to correct possible errors in the NAND during the boot phase.


Top
 Profile  
 
 Post subject: Re: AT91SAM9G20 - Bootstrap with SerialFlash - how do you do it?
PostPosted: Tue Jul 27, 2010 10:25 am 
Offline

Joined: Thu Jul 08, 2010 9:36 pm
Posts: 28
Interesting, the datasheet almost looks like a copy of the Samsung one, but without the following remark:

The 1st block, which is placed on
00h block address, is guaranteed to be a valid block up to 1K program/erase cycles with 1bit/528Byte ECC.

That, however when read carefully, means that the initial loader must already employ that per 512 byte ECC scheme! I am not sure whether the 9G20 ROM loader does use that particular method or ECC at all at that stage.

Reinhard


Top
 Profile  
 
 Post subject: Re: AT91SAM9G20 - Bootstrap with SerialFlash - how do you do it?
PostPosted: Tue Jul 27, 2010 10:32 am 
Offline

Joined: Thu Feb 11, 2010 7:47 pm
Posts: 29
I have not seen anything like ECC in the datasheet of the AT91SAM9G20.


Top
 Profile  
 
 Post subject: Re: AT91SAM9G20 - Bootstrap with SerialFlash - how do you do it?
PostPosted: Tue Jul 27, 2010 10:44 am 
Offline

Joined: Thu Jul 08, 2010 9:36 pm
Posts: 28
Neither have I. And neither has the source of the loader provided for the 9XE Types.

And serial Flash will only work if they support the commands required by the ROM. Probably most non-Atmels don't :?

If you don't need the 400 MHz, you can still solder SAM9XE256 or 512 onto your board. U-Boot will fit into the embedded NOR flash.

Otherwise it seems, for a really reliable system, you need serial or parallel NOR flash.

Reinhard


Top
 Profile  
 
 Post subject: Re: AT91SAM9G20 - Bootstrap with SerialFlash - how do you do it?
PostPosted: Tue Jul 27, 2010 11:08 am 
Offline

Joined: Thu Feb 11, 2010 7:47 pm
Posts: 29
Regarding Serial Flash thats not completely right:

Tha Sam-BA provides support for standard serial flash asides from Atmel Dataflash Type AT45 (confusingly they also name some ST25 as dataflash). The AT45 Flashes use different opcodes than the AT25 and compatible. The AT45 are only available from Atmel, I couldn't find another manufacturer with compatible devices. Unfortunately they have delivery times up to 40 weeks (that was whn eI wanted to buy some about 2 months ago), so at the moment one has to use serial falsh.

But the bootloader only supprts Atmels AT45 Flashes at the moment. So one has to implement support for standard serial flashes in order to use them. This is what we learned from a device we are actually prototyping.

I asked the Atmel support prior to the development if booting from a standard flash is possible and they answered "should be no problem since it is compatible to AT25", but they forgot the fact that the bootloader doesn't support them...


Top
 Profile  
 
 Post subject: Re: AT91SAM9G20 - Bootstrap with SerialFlash - how do you do it?
PostPosted: Tue Jul 27, 2010 1:32 pm 
Offline

Joined: Thu Jul 08, 2010 9:36 pm
Posts: 28
Agreed.

But you have no way of changing the ROM bootloader. So how do you intend to support the serial flash types you use?


Top
 Profile  
 
 Post subject: Re: AT91SAM9G20 - Bootstrap with SerialFlash - how do you do it?
PostPosted: Tue Jul 27, 2010 1:43 pm 
Offline

Joined: Thu Feb 11, 2010 7:47 pm
Posts: 29
As I said,

Sam-Ba supports the serial flashes. And teh Rom-Code of the processor does. You can load till bootstrap which is not able to read from the serialflash, so you have to start implementing here...


Top
 Profile  
 
 Post subject: Re: AT91SAM9G20 - Bootstrap with SerialFlash - how do you do it?
PostPosted: Tue Jul 27, 2010 3:15 pm 
Offline

Joined: Thu Jul 08, 2010 9:36 pm
Posts: 28
Ah, so the ROM can load from your flash at most the 4/16/32 KB whatever the internal RAM has?

But the loaded secondary bootstrap cannot read the serial flash as it is..

Well that should be easy to change ;)


Top
 Profile  
 
 Post subject: Re: AT91SAM9G20 - Bootstrap with SerialFlash - how do you do it?
PostPosted: Tue Jul 27, 2010 4:53 pm 
Offline

Joined: Thu Feb 11, 2010 7:47 pm
Posts: 29
That is the situation. Without changes you can see the "Start AT91 Bootstrap" message in the console. After that nothing happens.


Top
 Profile  
 
 Post subject: Re: AT91SAM9G20 - Bootstrap with SerialFlash - how do you do it?
PostPosted: Tue Jul 27, 2010 10:04 pm 
Offline

Joined: Mon Nov 26, 2007 9:50 pm
Posts: 6
I know that the SAM9G45 Software package has a Bootloader sw which has support for SPI flash (it supports SST25VF512 for sure).

Z.


Top
 Profile  
 
 Post subject: Re: AT91SAM9G20 - Bootstrap with SerialFlash - how do you do it?
PostPosted: Wed Jul 28, 2010 8:34 am 
Offline

Joined: Thu Feb 11, 2010 7:47 pm
Posts: 29
Is this bootloader usable under Linux? Because in the 9G20 Software Package there is also a bootloader supporting Serial Flash but it is only for Keil compiler afaik.


Top
 Profile  
 
 Post subject: Re: AT91SAM9G20 - Bootstrap with SerialFlash - how do you do it?
PostPosted: Wed Jul 28, 2010 6:26 pm 
Offline

Joined: Mon Nov 26, 2007 9:50 pm
Posts: 6
What do you mean "usable under Linux"?

You can boot u-boot or you might boot Linux directly from it. I prefer the u-boot approach.

Converting from Keil to GCC is not a big deal. It is more or less copy/paste from different projects.

Z.


Top
 Profile  
 
 Post subject: Re: AT91SAM9G20 - Bootstrap with SerialFlash - how do you do it?
PostPosted: Wed Jul 28, 2010 7:04 pm 
Offline

Joined: Thu Feb 11, 2010 7:47 pm
Posts: 29
I am not a programmer. I got a support answer from Atmle that there exists a Keil implementation but that it is not usable under Atmels Linux distribution. I have no idea how much work it is to port it.


Top
 Profile  
 
 Post subject: Re: AT91SAM9G20 - Bootstrap with SerialFlash - how do you do it?
PostPosted: Wed Jul 28, 2010 7:40 pm 
Offline

Joined: Mon Nov 26, 2007 9:50 pm
Posts: 6
The latest software package for AT91SAM9G20 has the customizable bootstrap loader and available in GNU and Keil as well.

You just have to add one line to AT26.c to support your chip and make a build.

It would behave just like the bootstrap you have right now.

Z.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 57 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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: