2007-04-03 05:21:47 SPI eeprom write read
Richard Aldrich (UNITED KINGDOM)
Message: 23979 I'm using the latest SVN versions of uboot, toolchain and uclinux (updated and compiled yesterday).
I followed the document http://docs.blackfin.uclinux.org/doku.php?id=accessing_serial_nor_flash_with_u-boot
to attempt to write to SPI flash (ST M25P64). I call the eeprom write command, and it appears to works, then I read it back to another memory location.
However, when I do the memory compare, it says that 0 bytes are the same (output is something like:
cmp.b 0x1000000 0x2000000 $(filesize)
byte at 0x01000000 (0x40) != byte at 0x02000000 (0x00)
Total of 0 bytes were the same)
where 0x2000000 is the location I have read the eeprom to.
Does anyone have any ideas on what I should investigate next?
QuoteReplyEditDelete
2007-04-04 00:37:59 Re: SPI eeprom write read
Mike Frysinger (UNITED STATES)
Message: 24009 this is a custom board right ? i would first verify memory is sane by using the u-boot "mtest" command ... then try writing out all like 0x00 and 0xFF to the flash and then read it back out and use md.b to verify the location you read back out matches
QuoteReplyEditDelete
2007-04-04 09:01:50 Re: SPI eeprom write read
Richard Aldrich (UNITED KINGDOM)
Message: 24039 Ok, I am now able to write to and read from the SPI memory (its on a BF 537-stamp board). My problem came down to the wire length / type that had been used to connect the memory to a header.
I am able to load the uImage and read it back, and boot it and this process works well. All the bytes are identical.
However, I now want to investigate booting the u-boot from SPI. What I understand is that I compile u-boot with the
#define BFIN_BOOT_MODE BF537_SPI_MASTER_BOOT
in the file found at: u-boot/include/configs/bf537-stamp.h
I do this, and then I have written the u-boot.ldr image to the eeprom, at offset 0x0.
I then switch SW16 to 3, and power up. ...nothing happens, I don't get anything back in minicom.
Am I missing a stage along the way? Btw, the board is Rev 0.2
QuoteReplyEditDelete
2007-04-04 14:52:21 Re: SPI eeprom write read
Mike Frysinger (UNITED STATES)
Message: 24062 nope, the steps you've listed are correct ...
in order to take one step out of the equation though, you should try using one of our tested releases:
http://blackfin.uclinux.org/gf/project/u-boot/frs
we have a SPI LDR for u-boot there for the BF537-STAMP ... that should eliminate question of whether it's a software (compiling u-boot) or hardware (using correct settings)
QuoteReplyEditDelete
2008-04-01 10:20:03 Re: SPI eeprom write read
Hadi Boulfelfel (FRANCE)
Message: 53456 I think it's : #define BFIN_BOOT_MODE BF537_BOOT_SPI_MASTER not BF537_SPI_MASTER_BOOT
TranslateQuoteReplyEditDelete
2008-04-11 10:26:53 Re: SPI eeprom write read
Pafone Lee (CHINA)
Message: 54093 There is also a difference between the docs and the u-boot source code
in http://docs.blackfin.uclinux.org/doku.php?id=bootloaders:u-boot:release-notes:2007r1
<pre class="code">// ADSP-BF533
#define BF533_BYPASS_BOOT 0x0001
#define BF533_PARA_BOOT 0x0002
#define BF533_SPI_BOOT 0x0004 but in u-boot2008-R1-1.1.6 source code /include/configs/bf533-ezkit.h
#define BFIN_BOOT_MODE BFIN_BOOT_BYPASS
I don't know whether it is a mistake.
TranslateQuoteReplyEditDelete
2008-04-11 11:58:54 Re: SPI eeprom write read
Mike Frysinger (UNITED STATES)
Message: 54096 there is no difference nor error with the documentation
you're comparing old release notes against a newer release. that'll never work.
QuoteReplyEditDelete