SPI CpuXfer Error on Colibri T30 using mainline Kernel 4.14 inclduing RT Patches


We are in the process of porting a already running realtime application from another embedded platform to your Colibri T30 on an Iris Carrier Board. The application uses the spidev kernel module to communicate to an external device. The communication is based on a repeated read of a status register in an interval of 10ms.

The system is using a 4.14.8 kernel which is patched with the r9 realtime patches.

The device tree is modified as followed:

/* SPI1: Colibri SSP */
        spi0: spi@7000d400 {
                status = "okay";
                spi-max-frequency = <10000000>;
                spidev0: spi@0 {
                        compatible = "spidev";
                        num-chipselects = <1>;
                        cs-gpios = <0>;
                        reg = <0>;
                        spi-max-frequency = <10000000>;

Currently we have two known Problems on the running system.:

  • Sometimes a register read of the SPI (1Byte command + 4 Byte register) takes more than 20ms. This time is measured before and after the ioctl() command.
  • During runtime tests we see a second error, in most cases it occurs in 2 - 3 h. The complete SPI seems to freeze and returns no data after a approximate 200ms timeout. In this case we see “CpuXfer Error” and “SPI transfer timed out” in the kernel log. Only a restart of the application seems to reset the spidev and enable the communication.

Is anyone aware of this problem?


hi @andreas.imst

We don’t have any experiences with the mainline kernel on T30 modules and especially with real time patches for main line kernel.

Best regards, Jaski