2010-02-14 13:37:10     spi framework bandwidth

Document created by Aaronwu Employee on Aug 20, 2013
Version 1Show Document
  • View in full screen mode

2010-02-14 13:37:10     spi framework bandwidth

Lars Weber Rasmussen (DENMARK)

Message: 86077   




Following scenario needs to be solved.


2 different device drivers need to transmitt on the same SPI interface.


dev1: every 10 ms a package of 1440 bytes is transmitted to a uC.


dev2: every 4 ms a package of 8 bytes is transmitted to a quad DAC.


SPIDEV framework is too slow for this, so I wonder if dma is the solution. I have read that sharing DMA is not possible but how about this scenario where the 2 dma's will run in stop mode?


Would like to trigger the dma tx with external/timer interrupt.


Appreciate if anyone can help with a SPI tx dma driver triggered by ext interrupt..






2010-02-15 06:13:27     Re: spi framework bandwidth

Wolfgang Muees (GERMANY)

Message: 86104   




you wrote nothing about the speed of your SPI transmission. Home many time does it cost to transmit the 1440 bytes to the uC?


SPIDEV framework is from userspace, and it's hard to get these timing requirement from userspace.


I do not think that DMA is needed for your problem - it depends on the speed of the transmission.


Write a kernel driver. Use a timer interrupt to get the trigger at the right time. Use the SPI kernel framework to do the transmissions.


How many jitter is allowed for the transfer to the DAC? This might be your worst requirement!


best regards