SPI: toggling SCK before starting the SPI transfer...

Status
Not open for further replies.

radu

New member
Hello,
I have an application (Teensy 4.0 + SPI encoder) where I need to implement the following protocol:
spi.png

As can be seen, the the SPI mode is 0 - the idle state is SCK LOW.
However, before clocking the data out, I need to latch the position by driving SS LOW while SCK is HIGH, after which I can clock the bytes out.
How do I force an SCK HIGH/LOW toggle before starting the transfer, given that the SPI library drives the pin directly?

Thank you.
Radu

View attachment Enc-Reader-no-CRC.ino
 
Status
Not open for further replies.
Back
Top