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 11-28-2006, 08:09 AM   #1
stz
LQ Newbie
 
Registered: Nov 2006
Posts: 11

Rep: Reputation: 0
GPIO response time_


Hello,

My simple application is toggle the CPU GPIO (GPIO control made by direct memory access using mmap of /dev/mem)
But somehow, the GPIO signal toggling is delayed. I monitor the GPIO with Oscilloscope and see that the signal is toggle a few second after the application toggle command.

Do you have any idea?

Regards,
stz
 
Old 11-28-2006, 02:02 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Processes in Linux/UNIX use priority/niceness to determine when they scheduled. It sounds like you're looking for "Real Time priority". Haven't dealt with this in Linux but have in UNIX. Found the following discussion of Real Time for Linux that may be of help to you:

http://www.linuxdevices.com/articles/AT4503827066.html
 
Old 11-29-2006, 12:34 AM   #3
stz
LQ Newbie
 
Registered: Nov 2006
Posts: 11

Original Poster
Rep: Reputation: 0
but it's not a realTime problem

Hi,

I don’t need a real time performance. But I have to understand the delay reason for the following simple flow :
1)set GPIO to “1”
2) printf(“GPIO value == 1\r\n”)
3)sleep(20) - sleep for 20second
4)set GPIO to “0”
5) printf(“GPIO value == 0\r\n”)
6)sleep(20) - sleep for 20second
5)goto 1)

>> printf message is after GPIO setting !!!


Monitor result:

GPIO value == 1
After few seconds (~4 ) the signal is “1”
….here is the sleep delay
GPIO value == 0
After few seconds (~4 ) the signal is “0”
….here is the sleep delay

so why the GPIO signal is delayed after the printf message ?


Thanks,
 
  


Reply

Tags
gpio



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
how to improve response time arunvk Linux - General 8 12-07-2005 04:46 AM
Latency in HTTPD’s response time. aenright Linux - Networking 2 05-31-2005 07:07 AM
FTP Issues, very slow response time! dermotti Linux - Networking 4 04-01-2005 09:39 PM
Slowdown in pc response time dregoma Linux - Newbie 1 02-11-2004 01:19 PM
Keyboard response time niyaah Linux - Newbie 0 10-13-2002 09:20 PM

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

All times are GMT -5. The time now is 08:21 PM.

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