« Return to Thread: Threading for real-time data transmission

Re: Threading for real-time data transmission

by Dave Hylands :: Rate this Message:

Reply to Author | View in Thread

Hi Dante,

>  > For the sampling rate, you should probably use a timer. Linux provides
>  > several that work very nicely.
>  >
>  Great, I'll look into that. I was using Dave Hylands' usleep-drv driver as a
>  'periodic timer', but if there's something else that is more reliable and
>  also goes down to useconds, I'll take it.

Heh - I wouldn't recommend it for that purpose. It was really created
to allow code which does bit-banged I/O and needs to wait a small
amount of time between bit transitions. For some versions of the
kernel, the smallest wait time is on the order of 10 msec, which is
way too long for many bit-banged applications.

What would be better is to create a driver which uses one of the gumstix timers.

As long as you're talking about the SPI clock being at the MHz level,
and you're using the SPI hardware, then you're talking about something
on the order of 30k samples/sec I think it's probably doable, although
it would all need to be done from kernel mode.

--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

 « Return to Thread: Threading for real-time data transmission

LightInTheBox - Buy quality products at wholesale price