spidriver icon indicating copy to clipboard operation
spidriver copied to clipboard

Command-line should have a 't' command for bidirectional transfer

Open jamesbowman opened this issue 7 years ago • 7 comments
trafficstars

't' should act like 'w', but print out the received bytes.

Suggested in this thread: http://gameduino2.proboards.com/thread/852/spidriver-running-gameduino3?page=1&scrollTo=2221

jamesbowman avatar Aug 30 '18 01:08 jamesbowman

Any progress on this?

maxnil avatar Jun 15 '19 07:06 maxnil

Is that why I cant seem to get anything out of the Atmel M90E26? You have to write 8 bits, and it immediately returns 16 bits. Except I see nothing.

This is from the manual.

image

On the spidriver, I see the clock being interrupted, between flipping between write and read.

0xStuart avatar Jul 11 '21 16:07 0xStuart

This diagram looks half-duplex, so the right sequence should be:

spicl <device> s w 0x40 r 2 u

jamesbowman avatar Jul 11 '21 18:07 jamesbowman

It operates like it's half-duplex, but the manual says full-duplex. The SCK doesn't look the same as the diagram, don't know if that's relevant.

image

0xStuart avatar Jul 11 '21 18:07 0xStuart

This looks fine - the gaps on SCK are just the inter-byte pauses.

image

Hmm, one idea... datasheet does say that it expects a '1' bit before the 7-bit register address. So changing 0x49 there to 0xc9 might work?

jamesbowman avatar Jul 11 '21 18:07 jamesbowman

Good call. That wasn't quite it, but I got it working. I discovered I have a different chip variation to the manual. Thanks.

0xStuart avatar Jul 12 '21 01:07 0xStuart

I have same issue - I need to receive same time I'm transmitting (full duplex).

benner avatar Sep 13 '23 07:09 benner