| Welcome to AT91SAM Community Forum http://www.at91.com/samphpbb/ |
|
| AT91SAM9G20 - Bootstrap with SerialFlash - how do you do it? http://www.at91.com/samphpbb/viewtopic.php?f=9&t=19337 |
Page 1 of 4 |
| Author: | TKL [ Mon Jun 28, 2010 3:35 pm ] |
| Post subject: | AT91SAM9G20 - Bootstrap with SerialFlash - how do you do it? |
Hi! We made a custom AT91SAM9G20 board. On this board we use a Serial Flash (SST25VF032) because all Atmel Flashes are out of stock. Now we managed to get SAM-BA to work with this but the bootstrap doesn't seem to be able to use this Flash. Has anyone experience with this case? Maybe someone use a AT25XXX or AT26XXX for booting and can help? Thank you very much! Best regards, Torben |
|
| Author: | falingtrea [ Mon Jun 28, 2010 7:56 pm ] |
| Post subject: | Re: AT91SAM9G20 - Bootstrap with SerialFlash - how do you do it? |
More than likely you will have to modify the dataflash version of the bootstrap code to look for and load an SPI flash instead. |
|
| Author: | kamejoko80 [ Tue Jul 20, 2010 7:55 am ] |
| Post subject: | Re: AT91SAM9G20 - Bootstrap with SerialFlash - how do you do it? |
Why you didn't use NAND Flash to store AT91Bootstrap image ? The NAND FLash chips are very available and cheap. Regards. |
|
| Author: | TKL [ Fri Jul 23, 2010 8:45 am ] |
| Post subject: | Re: AT91SAM9G20 - Bootstrap with SerialFlash - how do you do it? |
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. |
|
| Author: | reinhardm [ Fri Jul 23, 2010 9:34 am ] |
| Post subject: | Re: AT91SAM9G20 - Bootstrap with SerialFlash - how do you do it? |
If the ROM bootstrap does not recognize that serial flash you are out of options IMHO. I have realized, that for reliably booting systems on AT91SAM9 one needs to use the AT91SAM9XE Versions with embedded NOR flash or have at least a small NOR flash (256KB would do) attached to nCS0 and wire BMS to start execution from there. Or you could add a microSD card holder to the design and boot from there. But I am afraid your design is already done... If you are happy with 190 MHz you could switch to the XE Versions. |
|
| Author: | TKL [ Fri Jul 23, 2010 9:37 am ] |
| Post subject: | Re: AT91SAM9G20 - Bootstrap with SerialFlash - how do you do it? |
Our design is already through prototype testings and we will have to write the boot code for the serial flash ourselves. It is possible to implement it and we will have to do it. Unfortunately it is ~1 week of work which was not planned. I do not understand why Atmel sells some serial flashes as dataflash, this started the confusion and the whole problem. |
|
| Author: | TKL [ Fri Jul 23, 2010 9:39 am ] |
| Post subject: | Re: AT91SAM9G20 - Bootstrap with SerialFlash - how do you do it? |
One more thing: We have a micro SD card holder, but it is later in the boot order than the nand flash... To change this one has to implement a sd boot from uboot, because this isn't implemented afaik. |
|
| Author: | reinhardm [ Fri Jul 23, 2010 6:38 pm ] |
| Post subject: | Re: AT91SAM9G20 - Bootstrap with SerialFlash - how do you do it? |
Humm, where do you intend to store the boot code? I recently added SD/MMC support for U-Boot on AT91SAM9xxx. Its not in mainstream yet but patch is in the U-Boot mailing list. |
|
| Author: | falingtrea [ Fri Jul 23, 2010 7:57 pm ] |
| Post subject: | Re: AT91SAM9G20 - Bootstrap with SerialFlash - how do you do it? |
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. Check the data sheet for your NAND Flash. Typically the first block is guaranteed to be error free for 1000 cycles for just this reason, since most bootloaders are too small to have ECC support. Also, NAND flash errors are almost always generated from an erase, so if you don't change the bootloader in the field, you will reduce the chances of the first block having an error in the field. |
|
| Author: | TKL [ Mon Jul 26, 2010 8:59 am ] |
| Post subject: | Re: AT91SAM9G20 - Bootstrap with SerialFlash - how do you do it? |
I will take a look in the datasheet. But I cannot guarantee that the bootloader will not have to change in the field as the firmware might and we have to be able to update everything in the field. So even 1000 Cycles might not be enough, although it is quite something. But it is a very good tip, I didn't knew that. |
|
| Author: | reinhardm [ Mon Jul 26, 2010 9:20 am ] |
| Post subject: | Re: AT91SAM9G20 - Bootstrap with SerialFlash - how do you do it? |
The first sector is usually 128 KB in NAND. Its too small for U-Boot, but it is large enough for something dedicated that can load the real thing from NAND using ECCorrection and looking for it in several alternative places. And when you need to plan to change the _bootloader_ more than 1000 times in the field, something seems extremely wrong in the approach... Reinhard |
|
| Author: | TKL [ Mon Jul 26, 2010 9:26 am ] |
| Post subject: | Re: AT91SAM9G20 - Bootstrap with SerialFlash - how do you do it? |
Of course we do not plan to do it more that 1000 times. It should be far more than enough... |
|
| Author: | TKL [ Mon Jul 26, 2010 9:29 am ] |
| Post subject: | Re: AT91SAM9G20 - Bootstrap with SerialFlash - how do you do it? |
I checked the datasheet of the NAND and there is nothing about a special block. It just says 100000 program / erase cycles per block with ECC. |
|
| Author: | reinhardm [ Mon Jul 26, 2010 1:03 pm ] |
| Post subject: | Re: AT91SAM9G20 - Bootstrap with SerialFlash - how do you do it? |
What is the exact type of the NAND? |
|
| Author: | TKL [ Mon Jul 26, 2010 1:10 pm ] |
| Post subject: | Re: AT91SAM9G20 - Bootstrap with SerialFlash - how do you do it? |
Numonyx NAND02GW3B2D |
|
| Page 1 of 4 | All times are UTC + 1 hour [ DST ] |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|



Forum