public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] SPI EEPROM on MBX problem
@ 2006-03-18 20:35 Antonio Di Bacco
  2006-03-18 21:20 ` Vladimir A. Gurevich
  0 siblings, 1 reply; 3+ messages in thread
From: Antonio Di Bacco @ 2006-03-18 20:35 UTC (permalink / raw)
  To: u-boot

I'm trying to make a work an SPI EEPROM connected to the expansion connector 
of an old MBX board featuring  MPC860EN processor. I used the spi.c driver in 
u-boot with no results, then I tried applying the patch from Gurevitch but 
nothing. Could I have problems with relocation of DPRAM for SPI? 
I double checked all the connections to the SPI EEPROM and it seems ok, when 
configuring the SPIMISO, SPIMOSI, SPICLK and SPISEL as GPIO active output I 
can measure a right voltage level on these pins when I write something to 
Port B data register. Unfortunately I have a not an oscilloscope to see what 
happen when 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.

Bye,
Antonio.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot-Users] SPI EEPROM on MBX problem
  2006-03-18 20:35 [U-Boot-Users] SPI EEPROM on MBX problem Antonio Di Bacco
@ 2006-03-18 21:20 ` Vladimir A. Gurevich
  2006-03-18 21:50   ` Antonio Di Bacco
  0 siblings, 1 reply; 3+ messages in thread
From: Vladimir A. Gurevich @ 2006-03-18 21:20 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot-Users] SPI EEPROM on MBX problem
  2006-03-18 21:20 ` Vladimir A. Gurevich
@ 2006-03-18 21:50   ` Antonio Di Bacco
  0 siblings, 0 replies; 3+ messages in thread
From: Antonio Di Bacco @ 2006-03-18 21:50 UTC (permalink / raw)
  To: u-boot

Yes, I'm feeling so stupid! 

Thank you very much!


On Saturday 18 March 2006 22:20, you wrote:
> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-03-18 21:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-18 20:35 [U-Boot-Users] SPI EEPROM on MBX problem Antonio Di Bacco
2006-03-18 21:20 ` Vladimir A. Gurevich
2006-03-18 21:50   ` Antonio Di Bacco

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox