AnsweredAssumed Answered

SPI Flash parameters for U-boot again

Question asked by vrp on Sep 25, 2013
Latest reply on Sep 26, 2013 by vrp

I have a board based on BF537 with very old U-Boot in a NAND flash. So, I can load images to memory. There is also a spi-flash (8 MiB). It works with old U-Boot. Now I try to load into the spi-flash the U-Boot 2012.

The file bf537-stamp.h contains the lines:

 

#define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_SPI_MASTER

 

/*

* Memory Settings

*/

#define CONFIG_MEM_ADD_WDTH          9

#define CONFIG_MEM_SIZE                    32               // There is such memory

 

 

/*

* SPI Settings

*/

#define CONFIG_BFIN_SPI

#define CONFIG_SPI_FLASH

#define CONFIG_CMD_SF

#define CONFIG_SF_DEFAULT_SPEED          30000000

#define CONFIG_SF_DEFAULT_MODE          SPI_MODE_3

#define CONFIG_SPI_FLASH_ALL

 

#if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_SPI_MASTER)

#define CONFIG_ENV_IN_SPI_FLASH

#define CONFIG_ENV_SPI_MAX_HZ          30000000

#define CONFIG_ENV_SPI_MODE          SPI_MODE_3

#define CONFIG_ENV_SPI_BUS          0

#define CONFIG_ENV_SPI_CS          1

#else

#endif

 

#define CONFIG_SPI_FLASH_STMICRO

 

 

Compilation is successful. Then I run commands:

 

bf537> tftp 0x1000 u-boot.bin

Using BF537 ETHERNET device

TFTP from server 192.168.21.2; our IP address is 192.168.21.3

Filename 'u-boot.bin'.

Load address: 0x1000

Loading: #########################################

done

Bytes transferred = 206152 (32548 hex)

 

bf537> go 0x1000

## Starting application at 0x00001000 ...

U-Boot 2012.07-rc2 (ADI-2012R2) (Sep 25 2013 - 18:15:47)

CPU:   ADSP bf537-0.2 (Detected Rev: 0.2) (spi flash boot)

Board: ADI BF537 stamp board

       Support: http://blackfin.uclinux.org/

Clock: VCO: 500 MHz, Core: 500 MHz, System: 125 MHz

RAM:   32 MiB

Flash: 4 MiB

MMC:  

SF: Detected M25P64 with page size 64 KiB, total 8 MiB

In:    serial

Out:   serial

Err:   serial

KGDB:  [on serial] ready

Warning: Generating 'random' MAC address

Net:   bfin_mac

Hit any key to stop autoboot:  0

 

bfin> sf probe 1

SF: Detected M25P64 with page size 64 KiB, total 8 MiB

 

 

Everything is good!

 

Then I write the U-Boot into spi-flash by means of two macros:

 

load1=mw.b 0x1000000 0x0 0x800000;eeprom write 0x1000000 0x0 0x800000

load2=tftp 0x1000000 u-boot.ldr;eeprom write 0x1000000 0x0 $(filesize)

 

And the U-Boot does not want to start. Where should I find a mistake?

Outcomes