AnsweredAssumed Answered

Two parallel SPI reader threads instability

Question asked by jan godborg on Jan 22, 2018
Latest reply on Feb 23, 2018 by Math

We have a C++ application on DART-6UL Linux, collecting data from two eCSPI SPI ports from camera sensors, one on each port. We Read from the SPI ports only, there a no write operations.There is a separate thread (running real-time priority (SCHED_RR)) for the data collection from each spi port.

The Linux kernel has been built and tested using both MORTY and PYRO Linux's.

 

When reading only one port it runs great, and the application can retrieve all data at the rate delivered from the sensor (ca 8 frames per second; each frame is ca 40Kb).

 

When running two instances in parallel for the ports the performance drops significantly.

We have tested using both the read() systemcall and ioctrl() (with the SPI_IOC_MESSAGE(1) macro) in the reader thread, however the performance is identical.

 

Does anyone have suggestions to these issues:

- can any system/kernel tuning be performed to optimize to the performance
- can you provide sample programs demonstrating how to obtain our required performance
- Are anyone experiencing similar SPI problems ?

 

Thanks in advance.

 

Outcomes