[#6887] spi flash on 518f ezbrd fails to reset after running save command

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

[#6887] spi flash on 518f ezbrd fails to reset after running save command

Submitted By: Mingquan Pan

Open Date

2011-11-17 22:03:00     Close Date

2011-12-09 00:52:36

Priority:

Medium     Assignee:

Scott Jiang

Category:

N/A     Fixed In Release:

N/A

Found In Release:

N/A     Status:

Closed

Board:

N/A     Processor:

BF518

Silicon Revision:

    Resolution:

Fixed

Is the bug repeatable?:

N/A     

Summary: spi flash on 518f ezbrd fails to reset after running save command

Details:

 

spi flash on 518f ezbrd  fails to reset after running save command.

 

U-Boot 2011.09-dirty (ADI-2011R1) (Nov 17 2011 - 17:25:29)

 

CPU:   ADSP bf518-0.0 (Detected Rev: 0.0) (spi flash boot)

Board: ADI BF518F EZ-Board board

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

Clock: VCO: 400 MHz, Core: 400 MHz, System: 80 MHz

RAM:   64 MiB

Flash: 4 MiB

MMC:   Blackfin SDH: 0

SF: Detected M25P16 with page size 64 KiB, total 2 MiB

In:    serial

Out:   serial

Err:   serial

KGDB:  [on serial] ready

Net:   bfin_mac

Hit any key to stop autoboot:  0

bfin> print

addip=set bootargs $(bootargs) ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname):eth0:off

autoload=no

baudrate=57600

bootargs=root=/dev/mtdblock0 rw clkin_hz=25000000 earlyprintk=serial,uart0,57600 console=ttyBF0,57600

bootcmd=run ramboot

bootdelay=5

ethact=bfin_mac

ethaddr=fa:03:d1:03:d1:03

flashboot=bootm 0x20100000

gatewayip=192.168.0.1

hostname=bf518f-ezbrd

ipaddr=192.168.0.15

loadaddr=0x1000000

loads_echo=1

nc=set ncip ${serverip};set stdin nc;set stdout nc;set stderr nc

netmask=255.255.255.0

nfsargs=set bootargs root=/dev/nfs rw nfsroot=$(serverip):$(rootpath),tcp,nfsvers=3

nfsboot=tftp $(loadaddr) $(nfsfile);run nfsargs;run addip;bootm

nfsfile=vmImage

ramargs=set bootargs root=/dev/mtdblock0 rw clkin_hz=25000000 earlyprintk=serial,uart0,57600 console=ttyBF0,57600

ramboot=tftp $(loadaddr) $(ramfile);run ramargs;run addip;bootm

ramfile=uImage

rootpath=/romfs

serverip=192.168.0.2

stderr=serial

stdin=serial

stdout=serial

ubootfile=u-boot.ldr

update=tftp $(loadaddr) $(ubootfile);sf probe 2;sf erase 0 0x40000;sf write $(loadaddr) 0 $(filesize)

 

Environment size: 1131/8188 bytes

bfin> set ipaddr 10.100.4.50

bfin> set serverip 10.100.4.174

bfin> save

Saving Environment to SPI Flash...

SF: Detected M25P16 with page size 64 KiB, total 2 MiB

Erasing SPI flash...Writing to SPI flash...done

bfin> reset�

 

And the board stucks here without resetting over again.

 

Follow-ups

 

--- Mingquan Pan                                             2011-11-17 22:28:45

And it looks there is some problem in reading spi flash.

 

The first time reading of its sector would sometimes fail and the second time

is ok.

 

U-Boot 2011.09-dirty (ADI-2011R1) (Nov 17 2011 - 17:25:29)

 

CPU:   ADSP bf518-0.0 (Detected Rev: 0.0) (spi flash boot)

Board: ADI BF518F EZ-Board board

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

Clock: VCO: 400 MHz, Core: 400 MHz, System: 80 MHz

RAM:   64 MiB

Flash: 4 MiB

MMC:   Blackfin SDH: 0

SF: Detected M25P16 with page size 64 KiB, total 2 MiB

In:    serial

Out:   serial

Err:   serial

KGDB:  [on serial] ready

Net:   bfin_mac

Hit any key to stop autoboot:  0

bfin> sf probe 2

SF: Detected M25P16 with page size 64 KiB, total 2 MiB

bfin> sf erase 0x40000 0x1C0000

bfin> tftpboot 0x1000000 uImage

Using bfin_mac device

TFTP from server 192.168.0.2; our IP address is 192.168.0.15

Filename 'uImage'.

Load address: 0x1000000

Loading: *

Abort

bfin> set ipaddr 10.100.4.50

bfin> set serverip 10.100.4.174

bfin> tftpboot 0x1000000 uImage

Using bfin_mac device

TFTP from server 10.100.4.174; our IP address is 10.100.4.50

Filename 'uImage'.

Load address: 0x1000000

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

         #####################################

done

Bytes transferred = 1494390 (16cd76 hex)

bfin> sf write 0x1000000 0x40000 $(filesize)

bfin> sf read 0x2000000 0x40000 $(filesize)

bfin> cmp.b 0x1000000 0x2000000 $(filesize)

byte at 0x01000000 (0x27) != byte at 0x02000000 (0x01)

Total of 0 bytes were the same

bfin> sf read 0x2000000 0x40000 $(filesize)

bfin> cmp.b 0x1000000 0x2000000 $(filesize)

Total of 1494390 bytes were the same

bfin>

 

--- Scott Jiang                                              2011-11-24 22:02:40

add a temporary workaround, but haven't found the root cause

 

--- Mingquan Pan                                             2011-12-07 01:06:03

With this workround, repeating reading spi flash and doing comparision still

would fail sometimes.

U-Boot 2011.09-00003-ge6cf166-dirty (ADI-2011R1) (Dec 07 2011 - 10:20:20)^M

^M

CPU:   ADSP bf518-0.0 (Detected Rev: 0.0) (parallel flash boot)^M

Board: ADI BF518F EZ-Board board^M

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

Clock: VCO: 400 MHz, Core: 400 MHz, System: 80 MHz^M

RAM:   64 MiB^M

Flash: 4 MiB^M

MMC:   Blackfin SDH: 0^M

In:    serial^M

Out:   serial^M

Err:   serial^M

KGDB:  [on serial] ready^M

Net:   bfin_mac^M

...

 

 

STEP 44: SPI_flash

 

We're copying from spi flash

sf probe 2^M

SF: Detected M25P16 with page size 64 KiB, total 2 MiB^M

bfin> The testing sf address is 0x10000

sf read 0x1000000 0x4000 0x10000^M

bfin> sf read 0x2000000 0x4000 0x10000^M

bfin> cmp.b 0x1000000 0x2000000 0x4000^M

Total of 16384 bytes were the same^M

bfin> The testing sf address is 0x10001

sf read 0x1000000 0x4000 0x10001^M

 

...

 

sf read 0x1000000 0x4000 0x1002c^M

bfin> sf read 0x2000000 0x4000 0x1002c^M

bfin> cmp.b 0x1000000 0x2000000 0x4000^M

Total of 16384 bytes were the same^M

bfin> The testing sf address is 0x1002d

sf read 0x1000000 0x4000 0x1002d^M

bfin> sf read 0x2000000 0x4000 0x1002d^M

bfin> cmp.b 0x1000000 0x2000000 0x4000^M

byte at 0x01000000 (0xb0) != byte at 0

#### sf compare fails at 0x1002d

x02000000 (0xec)^M

Total of 0 bytes were the same^M

bfin> The testing sf address is 0x1002e

sf read 0x1000000 0x4000 0x1002e^M

bfin> sf read 0x2000000 0x4000 0x1002e^M

bfin> cmp.b 0x1000000 0x2000000 0x4000^M

Total of 16384 bytes were the same^M

bfin> The testing sf address is 0x1002f

sf read 0x1000000 0x4000 0x1002f^M

bfin> sf read 0x2000000 0x4000 0x1002f^M

bfin> cmp.b 0x1000000 0x2000000 0x4000^M

Total of 16384 bytes were the same^M

bfin> The testing sf address is 0x10030

sf read 0x1000000 0x4000 0x10030^M

bfin> sf read 0x2000000 0x4000 0x10030^M

bfin> cmp.b 0x1000000 0x2000000 0x4000^M

byte at 0x01000000 (0x6c) != b

#### sf compare fails at 0x10030

yte at 0x02000000 (0x6b)^M

Total of 0 bytes were the same^M

bfin> The testing sf address is 0x10031

sf read 0x1000000 0x4000 0x10031^M

bfin> sf read 0x2000000 0x4000 0x10031^M

bfin> cmp.b 0x1000000 0x2000000 0x4000^M

Total of 16384 bytes were the same^M

 

bfin> Total: sf compare fail count 8, pass count 42.

 

===== Recording result: SPI_flash is fail

Fail to find last passed SPI_flash result!

 

 

--- Scott Jiang                                              2011-12-07 03:10:28

fixed in commit 9567e95bda1d6c4591ae8863298dc3379cf2074c.

 

--- Mingquan Pan                                             2011-12-09 01:11:10

Yes,  the spi comparision test can pass on branch head now.

So close.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes