Hi NXP community,
We are using an i.MX8M Mini to communicate with a TI ADS1299 EEG Analog Front end. The data acquisition rate of the ADS1299 can be programmed, and we typically run it at 8K samples/second. This will cause a new batch of data to be available every 125 usec.
I have Linux configured to create /dev/spidev0.0, which uses a GPIO for the chip select. I have the DRDY# interrupt from the ADS1299 connected to another GPIO input, and I am using libgpiod to detect and respond to interrupts. However, it appears that we sometimes miss interrupts and therefore miss data. My criteria for this is that the time between the previous interrupt and the latest interrupt is >250 usec, since we should receive an interrupt every 125 usec.
When an interrupt occurs, I have to read 27 bytes of data from the ADS1299, which includes 3 status bytes, plus 3 * 8 channels * 3 bytes/channel of ADC data.
Can spidev be configured to use DMA for this data transfer? It's unclear to me how the /dev/spidev0.0 driver connects to the underlying spi-imx driver. On Linux Warrior, I did not see any ioctl() calls available for spidev that would allow me to control DMA. I am not sure if this has changed for Linux Zeus.
Thanks for your advice. I have been trying to do this from user space since I am not familiar with writing kernel mode drivers, and don't even know if a kernel mode driver would help prevent missing interrupts.
Best regards,
Scott