jfollas wrote:SPI bits are supposed to be set on one clock edge and then read on the next.
https://en.wikipedia.org/wiki/Serial_Pe ... _and_phaseFor example:
Mode 0 (CPOL=0, CPHA=0) sets the bit on the falling edge, and then samples on the next rising edge.
Mode 1 (CPOL=0, CPHA=1) set the bit on the rising edge, and then samples on the next falling edge.
Mode 2 (CPOL=1, CPHA=0) sets the bit on the rising edge, and then samples on the next falling edge.
Mode 3 (CPOL=1, CPHA=1) sets the bit on the falling edge, and then samples on the next rising edge.
I'm looking for clarification as to how to properly use SPI_CK_I_EDGE and SPI_CK_OUT_EDGE to control the behavior of when MISO is sampled.
Setting SPI_CK_OUT_EDGE to 1=rising edge and 0=falling edge per the above description correctly transitions the MOSI bit at the right time.
However, my guess that SPI_CK_I_EDGE controlled MISO was not accurate - the value here does not seem to have any effect of when the ESP8266 reads the MISO bit. In fact, testing shows that the ESP8266 is reading the MISO bit on the same clock edge that it uses to set MOSI.
Is there an undocumented bit that I am missing?