The following program fragment:
private SPI.Configuration cmdConfig = new SPI.Configuration(ChipworkX.Pin.PA14, false, 0, 0, false,false, 20000, SPI.SPI_module.SPI2);
private readonly SPI spi;
public void Readback(ReadAddressDecode rad)
{
cmdBuffer[0] = (byte)rad;
cmdBuffer[1] = 0;
cmdBuffer[2] = 0;
spi.Write(cmdBuffer);
cmdBuffer[0] = 0x1C;
cmdBuffer[1] = 0xE0;
cmdBuffer[2] = 0x00;
spi.WriteRead(cmdBuffer, cmdBuffer, 3);
for (int i = 0; i < 3; i++)
Debug.Print("cmdBuffer[" + i + "]" + cmdBuffer[i]);
}
CS low effective, my question is: whether the above code in the CS every 24 SCLK rising? Also send 3 bytes per 24 bit CS rising?