LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-23-2014, 02:52 PM   #1
dolle39
LQ Newbie
 
Registered: Jun 2012
Posts: 4

Rep: Reputation: Disabled
How to receive a sync signal from external hardware, interrupts


Hello,

I have a project where I have an application that runs in real time and it must process new data every 1 ms. Now, in order to get this to work, I need to take a sync signal from some external hardware. How the sync signal will arrive is not specified. Now I need suggestions on how to handle this the best way.

My idea was to have some hw device that receives an electric signal, (RJ45, GPIO) or whatever, and then write a driver in Linux that registers the interrupt every time the signal arrives and awakes all the processes that must do the execution during the 1 ms before the next interrupt arrives.

Now I need some ideas and suggestions on how to implement this the best way. However, the external sync signal will not arrive at every 1 ms, I could perhaps have an internal timer in Linux that elapses every 1 ms to wake up all the processes? The important thing with the sync cable is to make sure that we are staying on sync. Is there any problem with Linux internal timers to handle this precision you think? What else technique could I use to generate an interrupt at every 1 ms on an x86 platform running Linux?

Sorry for this fuzzy question but I need some people to drift this problem with.

Regards
 
Old 09-24-2014, 08:39 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,848

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
how much data do you want to process? How will this data be sent to that linux? How does that external hardware connected to that linux?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux c alarm signal cannot receive knightmare1980 Programming 13 04-18-2015 01:41 AM
[SOLVED] Postfix/Dovecot: Can't receive external eMails, but I can send to an external address Sebi94 Linux - Server 2 07-05-2013 01:07 PM
Signal Interrupts palisetty_suman Linux - Newbie 4 01-29-2009 08:30 AM
Obtaining periodic AP receive signal strength measurements wood@addanc Linux - Wireless Networking 2 06-24-2007 11:43 AM
signal interrupts reading from queue aral Programming 2 10-10-2006 08:24 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration