From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vladimir A. Gurevich Date: Sat, 18 Mar 2006 13:20:59 -0800 Subject: [U-Boot-Users] SPI EEPROM on MBX problem In-Reply-To: <200603182135.45772.antonio.dibacco@aruba.it> References: <200603182135.45772.antonio.dibacco@aruba.it> Message-ID: <441C79BB.5050701@paulidav.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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