mcf5441x, spi boot

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

mcf5441x, spi boot

675 Views
angelo_d
Senior Contributor I

Hi all,

 

as far as i understand, i see this micro allows a pre-boot after reset using an spi flash,

where configs and boot code are read (SBF).

 

I would need also OS (linux) boot from the same SPI (nor SPI or nand SPI).

Is it possible, or i have to boot from a nand then ?

 

Best regards

angelo

Labels (1)
0 Kudos
Reply
2 Replies

470 Views
angelo_d
Senior Contributor I

Hi Tom,

many thanks for all these very useful information. Will study better how to proceed in next days.

thanks

angelo

0 Kudos
Reply

470 Views
TomE
Specialist II

> as far as i understand, i see this micro allows a pre-boot after reset

Complicated chip this. Reading "10.4.1 Reset Configuration":

The first thing it does it read the BOOTMOD pins. They can have one of four states:

00 - Default state of RCON determines boot, and that means boot from 8-bit-wide Flexbus.

01 - RCON loaded from FB_AD[7:0], allowing 8/16/32 wide boot from FlexBus or NAND Flash.

1x = SBF. As PART of that (pre boot), RCON is loaded from SPI.

The SPI memory must be a "NOR" type, such as "EEPROM, Flash, FRAM or Embedded FPGA memory". It has to obey the standard "read" command that the SBF uses, as detailed in "11.4.1 Serial Initialization and Shift Clock Frequency Adjustment". You can use NAND SPI if it supports this "read" command, but not if it doesn't.

The data in the SPI has to be organised as in "Table 11-5. SPI Memory Organization". That consists of the SPI clock divider, boot length, RCON overrides and the initial boot code. "Boot length" words of data is read into SRAM and then starts executing.

The code that is read from the SPI into SRAM controls what happens next. There is 64k of SRAM. If your preferred Linux bootstrap (RedBoot, U-Boot or whatever) can be made small enough to fit in 64k (with its stack and data area) then you're done. If it won't - for instance our RedBoot takes 190k of ROM and 640k of RAM, then the code loaded into SRAM has to configure enough of the chip so you can load the real Linux boot into DRAM from wherever it is stored. That can obviously be in the same SPI memory or in something else. You could load from chips on any of the other SPI or I2C interfaces, but I'd suggest you might consider the SDHC port. You can boot from an SD card (and easily replace it for code updating) or the modern NAND replacement, "eMMC".

So where do you get that initial boot code if you don't want to write it from scratch yourself? I'd expect the Development System should come with enough to get you started.

The best option always is to copy the development system hardware and work the way it does. At least get your hardware working that way, or see if you can get the development system booting the way you need to first.

Tom

0 Kudos
Reply