First time working with SPI and I am having an issue. So far SCK (GPIO 5) and MOSI (GPIO 3) are working. CS0 (GPIO 2) will go low initially, but after 8 clock cycles it will set itself to high, when I need it to stay low for 24 clock cycles in order to receive data from the MCP3008. Altering the the Frame Format Register’s length will change how long the CS pins stays low, but I can’t set it higher than 8 bits.
Picture from oscilloscope:
- Yellow = SCK
- Blue= CS
I am using a low level library - link here - that is very much in early development to interact with the Hifive1 Rev.B, so a bare bones solution would be appreciated.