SPI problems :)

05 Nov 2010
i am buzy with the MBED and a omneo Q5 PRAM device, to say it easy its a kind of flash memory.
to start i begin with sending a Read identification command so it sends some data back, manufactory, data type and memory amouth.
the command is 0x9F, it should return 0x20, 0xDA, 0x18.

to make stuff easy i first bitbanged it, worked perfecty, code here:
first 8 bits to send the 9F command, then 24 low bits to recieve data.

but bitbanging is nice as a test but absolutly not acceptable for normal applications.
so over to SPI, i used this code:

and it doesnt work, the clock line is doing funny :o
first the CS line goes low like it should but at the same time the CLOCK goes low to, and then high and while doing that it clocks the first bit in wrong.

ok, lets try it again, SPI was in mode 3 first, now mode 0
and now it pauzes after every byte, why?
i get some data back but not the right data as you can see.

can someone help me to get this device working properly?
datahseet is here
on page 26 is the timing diagram for the Read Identification command.

05 Nov 2010
ow great, problem fixed.
when i send FF as dummy byte it works, with 00 as dummy byte it doesnt work
if someone could tell me why it pauses after every byte in mode 0 it would be nice.
its slowing the data transfer down a bit :)

06 Nov 2010

sorry cant help with your problem but I have an SCP1000 board running SPI that all of a sudden seems to have completely stopped working. MISO totally inactive!