LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-16-2015, 01:55 PM   #1
david_8274
Member
 
Registered: Jun 2013
Location: California
Distribution: Ubuntu, Fedora
Posts: 75

Rep: Reputation: Disabled
how to setup timer in writing device driver/user space program


Hi all,

When developing bare-bone embedded system project, we usually need to use timers to trigger one-shot/periodic interrupt. In a bare-bone environment, this can be done by accessing registers.
Right now I need to develop code in embedded Linux environment, what are the appropriate ways to achieve the same purpose? I read about jiffies, is it usually used in device driver? What about user space then?

Thanks,
Wei Xu
 
Old 11-17-2015, 08:35 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
http://linux.die.net/man/2/timer_create

Nanosecond resolution. Sample program included.

That's user space, no idea how to do it in the kernel. And I am sure there are other ways.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Writing User Space Program for AT91SAMA5 to control LEDs rk1genius Linux - Embedded & Single-board computer 1 11-01-2013 07:20 AM
Writing a char driver. Sending from user space works, copy_to_user always 0 wedz Linux - Kernel 2 06-11-2013 09:37 PM
Using vme_tsi148 device driver from user space zvivered Linux - Embedded & Single-board computer 0 11-20-2011 04:08 PM
User Space Device Driver Development ameya.verma Linux - Software 0 04-02-2008 02:26 AM
User Space Device Driver jvogel Linux - Kernel 4 10-16-2007 05:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:24 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