2011-10-03 03:52:47     SPI flash

Document created by Aaronwu Employee on Sep 25, 2013
Version 1Show Document
  • View in full screen mode

2011-10-03 03:52:47     SPI flash

Michal Koziel (NORWAY)

Message: 103689   

 

I can detect SPI flash, but can't read it.

 

Should I do anything specific to map the SPI flash in memory?

 

 

 

SF: Detected M25P64 with page size 256, total 8 MiB

8192 KiB M25P64 at 0:1 is now current device

bfin> sf read 0x0 0x0 0x1000

Failed to map physical memory

 

 

 

bfin> bdinfo

 

U-Boot = U-Boot 2010.06 (ADI-2010R1-RC2) (Oct 03 2011 - 09:07:42)

CPU = bf537-0.3

Board = bf537-thor

VCO = 500 MHz

CCLK = 500 MHz

SCLK = 100 MHz

boot_params = 0x00000000

memstart = 0x00000000

memsize = 0x04000000

flashstart = 0x20000000

flashsize = 0x00000000

flashoffset = 0x00000000

ethaddr = 02:80:ad:20:31:e8

ip_addr = 10.110.10.28

baudrate = 57600 bps

 

 

 

QuoteReplyEditDelete

 

 

2011-10-03 04:37:31     Re: SPI flash

Aaron Wu (CHINA)

Message: 103692   

 

Try something like sf read 0x2000000 0x0 0x1000, first parameter 0x0 in your command is not a valid dstination RAM address.

QuoteReplyEditDelete

 

 

2011-10-03 06:39:15     Re: SPI flash

Michal Koziel (NORWAY)

Message: 103694   

 

Try something like sf read 0x2000000 0x0 0x1000, first parameter 0x0 in your command is not a valid dstination RAM address.

 

---

 

I tried this:

 

bfin> sf probe 1

SF: Detected M25P64 with page size 256, total 8 MiB

8192 KiB M25P64 at 0:1 is now current device

bfin> sf read 0x2000000 0x0 0x1000

bfin>

 

 

 

But as you can see there's no output.

QuoteReplyEditDelete

 

 

2011-10-03 20:37:38     Re: SPI flash

Mike Frysinger (UNITED STATES)

Message: 103702   

 

no output -> everything worked.  this is normal *nix behavior.

QuoteReplyEditDelete

 

 

2011-10-04 04:52:06     Re: SPI flash

Michal Koziel (NORWAY)

Message: 103705   

 

no output -> everything worked.  this is normal *nix behavior.

 

---

 

 

 

Are you sure address 0x20000000 is correct for SPI flash? I thought it was 0x00000000. From the config file it looks like I have a NAND flash at this address.

 

By the way, I'm booting from ram, not SPI flash. I use VDSP to put u-boot.bin into ram.

 

/*

* Flash Settings

*/

#define CONFIG_FLASH_CFI_DRIVER

#define CONFIG_SYS_FLASH_BASE 0x20000000

#define CONFIG_SYS_FLASH_CFI

#define CONFIG_SYS_FLASH_PROTECTION

#define CONFIG_SYS_MAX_FLASH_BANKS 1

/* some have 67 sectors (M29W320DB), but newer have 71 (M29W320EB) */

#define CONFIG_SYS_MAX_FLASH_SECT 71

 

 

 

 

 

U-Boot 2010.06 (ADI-2010R1-RC2) (Sep 30 2011 - 10:23:54)

 

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

Board: BF537 Thor board

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

RAM: 64 MiB

Flash: ## Unknown FLASH on Bank 1 - Size = 0x00000000 = 0 MB

0 Bytes

SF: Detected M25P64 with page size 256, total 8 MiB

QuoteReplyEditDelete

 

 

2011-10-05 00:06:44     Re: SPI flash

Mike Frysinger (UNITED STATES)

Message: 103710   

 

there is no such thing as "correct address" for SPI flash.  you're giving it an arbitrary location in memory.

 

the output you posted had 6 zeros, not 7.  the async bank is at 0x2 with 7 zeros.

QuoteReplyEditDelete

 

 

2011-10-07 02:36:22     Re: SPI flash

Michal Koziel (NORWAY)

Message: 103734   

 

I was toled bu a colleague that the SPI flash was memory mapped, hence the confusion.

 

My SPI flash workes fine now :-)

QuoteReplyEditDelete

 

 

2011-10-07 20:46:28     Re: SPI flash

Mike Frysinger (UNITED STATES)

Message: 103745   

 

you should let him know that none of the Blackfin's so far can memory map SPI flashes

QuoteReplyEditDelete

Attachments

    Outcomes