Hi, Im brand new to MQX and the 52259. I have an application that has 10 devices attached to the SPI0 bus. Each has its own chip select, generated by a decoder (74154 type). The decoder inputs are connected to the 3 dedicated qspi CS pins plus a gpio pin, giving it the ability to select up to 16 different devices. In the MQX UG section about the SPI, all it says is that the QSPI chip selects are handled automatically and that the IO_IOCTL_SPI_SET_CS_CALLBACK function does not apply to this mcu.
How do I set it up so that when I write/read the SPI, it will automatically output the CS I need? Even if I have to do it manually that would be ok, but I dont see how to do that either.
Thanks,
Byra
Hi,
Please, for your application, did you have to change the SPI driver ? Does SPI devices have the same configuration ?
Thanks!
Different devices = different protocols. You have to find datasheet to your device, set the SPI driver accordingly (baudrate, bits per frame etc.) and write the particular communication protocol using SPI driver.
PetrM
Hello,
GPIO CS callbacks are now available for all SPI modules. Sorry for confusion.
This is what you need to do in your case.
Don't forget to open GPIO driver pins after opening SPI to overwrite pin configuration to GPIO mode.
PetrM
Hi PetrM
I'm trying to do the same thing.
Is there an example anywhere of the use of GPIO CS callbacks?
Joe
Yes, the SPI example in mqx\examples directory includes the use of GPIO callbacks, it's just not used on all boards (see the enable defines in the example code).
PetrM
Thanks, PetrM, that's great. The example looks very clear.
Joe