Home/Support/Support Forum/SPI speed at very small packet sizes (<24 bit)
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

SPI speed at very small packet sizes (<24 bit)

0 votes
SPI data transfer takes a long time if you use small packets. In my case I'm sending 24 bits in one package at 1 MHz.

The SPI configuration is set up properly, csAssertFn or csDessertFn set to NULL and deselectTime set to 0.

There's an initial delay of about 85us until the transaction (SPI CLK) starts. Then the transaction takes 24us as expected.
Afterwards there's another huge delay until the SPI transfer completes. I managed to reduce that delay to 35us by modifying spi_master.c (suppressing NAuWait for small SPI packets, see http://www.digi.com/support/forum/viewthread_thread,1200_offset,0)

It seems that NASpiReadWrite incorporates an excessive overhead due to DMA setup. I already talked to the DIGI support, it's a common behaviour of that platform and SPI driver.

Did anyone of you modify the driver to improve the timing ?
Can you please give me some hints what to change to decrease the overhead ?

Best regards,
asked Mar 30, 2010 in NET+OS by tchriste_at_weetech.de New to the Community (0 points)
recategorized Nov 26, 2013 by tuxembb

Please log in or register to answer this question.