I had been working on running spi using mqx drivers. but i am interested in knowing how does MQX SPI polled/ interrupt drivers really work . I mean does interrupt driver uses dma for transfers,does polled driver allows simultaneous read and write, does these drivers toggle chip select themselves, which one is better in performance etc.
As per my knowledge i believe they work in this manner.
1 : Use fopen to open ( spi/ ispi driver , with desired flags )
2: ( Optional ) Set clock speed, transfer mode , endianess using ioctl .
3: Use fwrite/ fread to read number of characters
4: (Optional ) perform simultaneous read and write using ioctl.
4: Close the device using fclose
I have some confusions :
First of all i am using fwrite / fread to write and read characters but i miss the 1st status character byte that comes from slave.I dont know how to get that byte in order.
Secondly , does SPI_READ_WRITE_STRUCT with ioctl use dma to transfer the bytes simultaneously , and is it available for both polled and interrupt mode?
It is worthwhile to use MQX SPI driver rather then using direct spi registers.
I am working on writing/porting wireless modbus for mqx using cc1101 radio, therefore i need to know these details about spi
I shall be very grateful , if someone guide me a little