Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: DS1307 RTC not working on AT91sam9260
PostPosted: Fri Jan 08, 2010 3:47 pm 
Offline

Joined: Fri Jan 08, 2010 8:50 am
Posts: 2
Hi All,

I am trying to use DS1307 RTC in my At91sam9260 running on 2.6.30.4 kernel. I can not make it working.

I have enabled the following options in the menuconfig.

Device Drivers->I2C support
1) I2C device interface
2) I2C Hardware Bus support->GPIO-based bitbanging I2C

DeviceDrivers->Real Time Clock
1)(rtc1) RTC used to set the system time
2) Dallas/Maxim DS1307/37/38/39/40, ST M41T00, EPSON RX-8025

I also see the I2C interface initialisation with NULL argument in board-sam9-l9260.c file,
/* I2C */
at91_add_device_i2c(NULL, 0);

Do I need to pass something instead of NULL?

I am getting the following while booting.

*****************************************************
g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
g_ether gadget: g_ether ready
mice: PS/2 mouse device common for all mice
i2c /dev entries driver
i2c-gpio i2c-gpio: using pins 55 (SDA) and 56 (SCL)
TCP cubic registered
Initializing XFRM netlink socket
NET: Registered protocol family 17
NET: Registered protocol family 15
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
drivers/rtc/hctosys.c: unable to open rtc device (rtc1)
Empty flash at 0x07b5d794 ends at 0x07b5d800
VFS: Mounted root (jffs2 filesystem) on device 31:1.
Freeing init memory: 108K
mdev: unknown user/group ->
mdev: unknown user/group ->
Setting system clock: hwclock: can't open '/dev/misc/rtc': No such file or direy
FAIL
**************************************************

Can anyone help me to get this RTC working?


Top
 Profile  
 
 Post subject: Re: DS1307 RTC not working on AT91sam9260
PostPosted: Sat Apr 21, 2012 2:27 pm 
Offline

Joined: Sat Oct 16, 2010 11:50 am
Posts: 3
also in
arch/arm/mach-at91/board-sam9260ek.c

add
{
I2C_BOARD_INFO("ds1307",0x68),
},

to this
static struct i2c_board_info __initdata ek_i2c_devices[] = {

in addition in rcS do not put hwclock -s first start.
after boot :
date 2012.04.21-12:45:32
hwclock -w
hwclock -s

now you can put hwclock -s in rcS.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: