I'm using the iot card extension for can bus develops for Legato, for that I set up the SPI connection with the spiService.
But I'm having an issue : the time to recover the interruption from the iot card (when a CAN message is receive) and to get the CAN message through the SPI interface is really really long.
I measured with an oscilloscope the different signals on the card and the time needed to get the CAN message is 2000 us on average. With this value I can't expect to read a CAN bus faster than 500Hz ... this is far too low.
I measured with a c function the time to execute 2 spi instructions (read , read/write) and it's 1200us (833 Hz)... this is absurd because an SPI connection is supposed to go to 1 MHz at least.
I suppose the delay com from the event Loop that call the differents functions (interruption,spiService). Is there a way to reduce this delay and alloy my connection to be quicker ?