I want to implement some simple SPI routines to read and write sectors from/to a MicroSD card on an MCP52259 design. I have code to do this based on a low-level spi_byte() function. However I cannot find any simple MQX SPI examples as everything I look at seems to use more complex QSPI. This might create problems with the MicroSD card if it toggles CS on every byte (as I believe it does).
So far I have rebuilt the MQX kernel for the MCP52259 with (polled) SPI enabled. I am assuming that this will initialize SPI (channel 0) by default when MQX starts up so I don't have to. I also changed the chip select to CS2 as this is what we are using.
I am now faced wth a couple of choices. If I can disable QSPI CS byte toggling and separately control CS2 I could try to use the QSPI functions. Alternatively I could perform straight SPI8 functions and bypass QSPI (if I knew how).
Any advice/suggestions welcome.