[U-Boot-Users] SPI EEPROM on MBX problem

Vladimir A. Gurevich vag at paulidav.org
Sat Mar 18 22:20:59 CET 2006


Hello Antonio,

Antonio Di Bacco wrote:

>I use the sspi command like this:
>
>sspi 0 8 05   (for Gurevitch patch)
> 05 is the code read a configuration register.
>
>Sometimes the EEPROM answer FF, some others 00 , it is completely randomic.
>  
>
The command you are using is not exactly correct. You specified only 8
bits to transfer and this is enough to only send the command (0x5). But
SPI master is also supposed to provide clock for the slave to answer.
So, use a different command:

    sspi 0 16 05

Then you'll see that the second byte of the response contains the corret
value.

Same applies when you decide to read your eeprom.

Happy hacking,
Vladimir





More information about the U-Boot mailing list