[U-Boot-Users] Question about U-Boot in general and the AT91RM9200 in particular

Ulf Samuelsson ulf at atmel.com
Thu Jan 4 17:38:27 CET 2007

> Hello!
> Sascha Erlacher schrieb:
>> this is not correct. As Wolfgang points out you can boot directly from NOR
>>  flash.
>> It depends on the BootModeSelect (BMS) pin state of the AT91RM9200.

> Unfortunately due to errata #37 external NOR flash will be accessed with
> zero waitstates, which gives an access time of 20ns, so very fast and
> expensive memory has to be used. And there also shouldn't be used any
> external address decoders or bus buffers.

> So using a serial boot ROM (Dataflash or EEPROM) usually will be the
> best solution. Even a very small EEPROM can be suitable because the
> program just has to modify bus timing for chip select 0 and jump to the
> "slow" parallel Flash memory.

That is also a misunderstanding.
BMS is used to select between booting from internal bootROM (BMS=1)
or external parallell flash (BMS=1).
All new Evaluation Kits from Atmel will use dataflash as its primary boot.
That is why I call this the "default". 

If BMS is set to 0, then the parts will boot from the external parallel flash
and the part will use maximum number of waitstates. Errata #37
does not affect the operation here.

If the AT91RM9200'BMS is set to 1, then the part will boot from
the internal boot ROM and will try the following cases:

1) SPI for dataflash
3) External Bus Interface (EBI) for an 8 bit parallel flash.
    The code that initializes the EBI for this case will set
    the number of waitstates to zero, and no existing flash
    can handle this, so this is non-functional.

The BootROM in the AT91SAM926x chips does not support booting from 
parallel NOR flash chips (but you can set BMS=0).

While it is possible to set BMS=0 and boot from a parallell flash, without copying to 
SDRAM first, it is not generally the smartest way to use the AT91 chips.

Especially the AT91SAM9260 bootROM supports a failsafe programming
mode which will allow you to override the contents of the internal flash,
without any jumper.
This is useful both during production and if you want to do manual field upgrades.

It is possible to build equipment which can be updated by inserting a flashcard
into the equipment, and then you power cycle.
The AT91SAM9260 will then boot from the flash card instead of from the
internal flash, and can copy the contents of the flash card to the internal flash.

It is possible to boot from a secure microcontroller (emulating a dataflash), so that you can 
protect your equipment agains evil users.

You can use the override function also during production.
The part first tries SPI0.CS0 and then SPI0.CS1
Connect a bed of nails tester to the SPI0.CS0 and the internal dataflash
to SPI0.CS1. Then you will boot from the test equipment instead of 
from the (empty) internal dataflash, and the part will program itself.

> With best regards
> Andreas

Best Regards
Ulf Samuelsson                ulf at atmel.com
Atmel Nordic AB
Mail:  Box 2033, 174 02 Sundbyberg, Sweden
Visit:  Kavallerivägen 24, 174 58 Sundbyberg, Sweden
Phone +46 (8) 441 54 22     Fax +46 (8) 441 54 29
GSM    +46 (706) 22 44 57

Technical support when I am not available:
AT89 C51 Applications Group: mailto:micro.hotline at nto.atmel.com
AT90 AVR Applications Group: mailto:avr at atmel.com
AT91 ARM Applications Group: mailto:at91support at atmel.com
FPSLIC Application Group: mailto:fpslic at atmel.com
Best AVR  link: www.avrfreaks.net

More information about the U-Boot mailing list