SPI EEPROM on MBX problem
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.
Hello Antonio,
Quoted 8 lines · Antonio Di Bacco
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
Yes, I'm feeling so stupid!
Thank you very much!
Quoted 25 lines · you
Hello Antonio,
Quoted 7 lines · Antonio Di Bacco
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 05Then 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