SPI data loss every 10 minutes

I have a custom board designed around an Open-Q 410C SOM. The only major addition compared to a Dragonboard 410C is two TI ADC’s daisy-chained, communicating with the SOM over SPI. The SOM is flashed with Linaro 19.01. I have written a kernel module that handles interrupts from one of the ADC’s (when ADC data is ready, falling edge) which reads 54 bytes (27 bytes from each ADC in succession) after an interrupt flag is set.

The kernel module notifies the user space application after adequate number of samples are collected (1024 samples), and the user space application which sees the kernel module as a character device then reads all the collected data. This process repeats every 2048ms.

The problem is, for some reason a fixed number of samples get lost every 10 minutes. At first it looked like a sleep or suspend issue, so I disabled these modes with no avail. Data communication between the kernel module and user space is flawless and tested using synthesized data sent from the kernel module to the user space application.

Any help or assistance is highly appreciated.
Thanks.

How many? every 10 minutes exactly or on average?

Do you see any errors in kernel log?

@Loic:

Thanks for reaching out to me. It’s very close to 10 minutes as far as I can tell, but I would say most of the time less than 10 minutes like 9:55 or so. A total of 88 samples are lost at 250 SPS each time, which is equal to 0.352 seconds of data.

I hooked up an MSO-28 to the chip select (CS) and data ready (DRDY) of the ADC and don’t see any unusual activity. There is some occasional jitter only which I believe is due to the time it takes for the kernel module to start reading the data. I’m planning to check the SCLK to see if it becomes inactive somehow.

I don’t see any errors in kernel log.

Thanks.

@Loic: Update: I checked the SPI clock and didn’t see any abnormalities on it when the data loss happens. It seems that something is happening in the SPI driver or the SOM hardware itself. I also noted that after lowering the SPI clock speed from 10Mhz to 2Mhz the period of the data loss extends to every 10:15 to 10:20 minutes.