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

thus in any way you must use a small (<12Kb) initial bootloader, which in turn loads u-boot from dataflash or NOR flash in SDRAM.
Hello Ivan, 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. The datasheet states:
"Depending on the BMS pin state at reset and as a function of the remap command, the memory mapped at address 0x0 is different. Before execution of the remap command the on-chip ROM (BMS = 1) or the 16-bit non-volatile memory connected to external chip select zero (BMS = 0) is mapped into Internal Memory Area 0."
When setting BMS=0 the AT91RM9200 internal boot rom code is not executed. If the external (NOR) flash contains a valid U-Boot image it will be executed directly, and, in case it properly initializes an external SDRAM, will be able to relocate itself to SDRAM without going through internal SRAM.
Best regards, Sascha

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.
With best regards Andreas

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 2) TWI for I2C EEPROM 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@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@nto.atmel.com AT90 AVR Applications Group: mailto:avr@atmel.com AT91 ARM Applications Group: mailto:at91support@atmel.com FPSLIC Application Group: mailto:fpslic@atmel.com Best AVR link: www.avrfreaks.net
participants (3)
-
Andreas Schweigstill
-
Sascha Erlacher
-
Ulf Samuelsson