LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 09-05-2013, 04:16 AM   #1
kavitavelu
LQ Newbie
 
Registered: Sep 2013
Posts: 2

Rep: Reputation: Disabled
RTC in AT91SAM9263


I am using AT91SAM9263 on linux 2.6.27

For my application I need to use the RTC to store the time during data logging. I am using the RTT as RTC. I have made the configurations as mentioned below but was not able to run the RTC.

Following configurations were made in Linux:
CONFIG_RTC_LIB=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_HCTOSYS=y
CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
CONFIG_RTC_DEBUG=y

#
# RTC interfaces
#
CONFIG_RTC_INTF_SYSFS=y
CONFIG_RTC_INTF_PROC=y
CONFIG_RTC_INTF_DEV=y

#
# on-CPU RTC drivers
#
CONFIG_RTC_DRV_AT91SAM9=y
CONFIG_RTC_DRV_AT91SAM9_RTT=0
CONFIG_RTC_DRV_AT91SAM9_GPBR=0

I created a symbolic link in the file /etc/udev/rules.d/50-udev-default.rules:
KERNEL=="rtc0", ATTR{name}=="at91_rtt", DRIVERS=="at91_rtt", SYMLINK+="rtc"

The application included the code:
int fd;
struct rtc_time rtc_tm;
int ret;
fd = open("/dev/rtc0", O_RDWR, 0);
ret = ioctl(fd, RTC_RD_TIME, &rtc_tm);
printf ("RTC read return = %d\n",ret);


The value printed was -1.
Also the file /dev/rtc0 has a size of '0'.

Can any one tell me what seetings are to be made additionally for the RTC to run.
 
  


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
SPI hang-up in at91sam9263 kavitavelu Linux - Newbie 0 09-05-2013 06:45 AM
Error while porting AT91SAM9263-EK meeramukundan Linux - Embedded & Single-board computer 1 02-16-2010 07:03 AM
Buildroot for at91sam9263 board parag_opensrc Linux - Embedded & Single-board computer 0 09-19-2009 01:57 AM
how to work on GPIO with AT91SAM9263-EK in Linux aemindia Linux - Newbie 0 05-12-2009 06:46 AM
RTC Alarm wakes up, even while BIOS has RTC alarm disabled mastermind2501 Linux - Newbie 2 12-22-2008 03:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

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