Hello Cédric
Sorry, but I had to give up my ambitions due to time pressure.
I ended up using the standard UART drivers in the Debian environment.
If you are in the same application situation as me, you may consider using standard Linux drivers:
I am implementing a sensor platform where the sensors each issues hardware interrupts that marks the time of measurement.
Sensors are: GPS (1Hz), Barometer (1Hz), Gyro-/Accelero-/Magneto-meter (4Hz-8KHz), Inertial platform (200Hz), SwarmRadio (10Hz?).
UART: GPS + SwarmRadio
I2C: Barometer + Gyro-/Accelero-/Magneto-meter
IMU: SPI
After each GPIO interrupt the data is collected by UART, I2C and SPI.
The most important rea-time task is to relate the hardware interrupts (i.e. the collected data) to a common timer.
I managed to do that by writing kernel RTDMs for the interrupting GPIO-lines.
The sensor tasks issues blocking reads towards the RTDMs that sends the timer-value from the interrupts.
The tasks then uses the standard Linux drivers for collecting data.
So far, the only driver causing marginal situations is the SPI driver in combination with an Inertial Measuring Unit (IMU).
This sensor operates on 200Hz, hence I have to collect its data within 5ms.
The IMU uses 16-bit transfers, but require the chip-select to go in-active for at least 2us between each transfer.
This cannot be handled by the standard SPI driver an forces me to generate separate 16-bit transfer calls to the driver.
Each call gives a 20-30us kernel/user-space punishment and a very jittering total transfer-time.
Bottom line (for me) is that I have to cope with the standard Linux drivers for the time being.
I am now running tests on all interfaces and the only sensors that misses interrupts is the SPI-bus.
I am not sure how degrading these standard drivers is for my real-time requirement, but I hope to reveal this by some long-term testing.
At the moment I am part of the “under-wood” and must rely on the patient support from the “tall trees” (Gilles and Robert).
If time allows later on, I will look into the possibilities of doing some work on the drivers.
First driver to get my attention will be the SPI driver…
Bon chance!
Best regards
Terje