<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://elinux.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://elinux.org/index.php?title=NGW100-RTC&amp;feed=atom&amp;action=history</id>
		<title>NGW100-RTC - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://elinux.org/index.php?title=NGW100-RTC&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://elinux.org/index.php?title=NGW100-RTC&amp;action=history"/>
		<updated>2013-05-23T18:32:01Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.21alpha</generator>

	<entry>
		<id>http://elinux.org/index.php?title=NGW100-RTC&amp;diff=74005&amp;oldid=prev</id>
		<title>Cschalle: Add category</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/index.php?title=NGW100-RTC&amp;diff=74005&amp;oldid=prev"/>
				<updated>2011-10-28T10:14:37Z</updated>
		
		<summary type="html">&lt;p&gt;Add category&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 10:14, 28 October 2011&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 55:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 55:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Schematics / Image created with [[fritzing]] - [http://fritzing.org/]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Schematics / Image created with [[fritzing]] - [http://fritzing.org/]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[[Category:HOWTOs]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key elinux:diff:version:1.11a:oldid:21526:newid:74005 --&gt;
&lt;/table&gt;</summary>
		<author><name>Cschalle</name></author>	</entry>

	<entry>
		<id>http://elinux.org/index.php?title=NGW100-RTC&amp;diff=21526&amp;oldid=prev</id>
		<title>Peter Huewe: Added instructions how to add a external RTC to the NGW100 - text and schematics created by me.</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/index.php?title=NGW100-RTC&amp;diff=21526&amp;oldid=prev"/>
				<updated>2010-05-27T03:46:13Z</updated>
		
		<summary type="html">&lt;p&gt;Added instructions how to add a external RTC to the NGW100 - text and schematics created by me.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Adding an external RTC ==&lt;br /&gt;
Unfortunately the RTC embedded in the AT32AP700x is not battery backed (and no battery can be added) and consequently loses the time on powerloss.&lt;br /&gt;
In order to keep the time one has to add an external rtc.&lt;br /&gt;
&lt;br /&gt;
I've choosen the simple DS1672 Binary Counter RTC from Maxim IC [http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2750], as it is already supported in the linux kernel. (Device-Drivers-&amp;gt;RTC-&amp;gt;DS1672, CONFIG_RTC_DRV_DS1672') and as it is quite cheap and simple.&lt;br /&gt;
&lt;br /&gt;
=== Enabling it in Linux ===&lt;br /&gt;
Select support for i2c, i2c-gpio, rtc, rtc-ds1672 in the Kernel config, either as module or compiled in.&lt;br /&gt;
(either via 'make menuconfig', or for Buildroot 'make linux26-menunonfig')&lt;br /&gt;
&lt;br /&gt;
In arch/avr32/boards/atngw100/setup.c add&lt;br /&gt;
{I2C_BOARD_INFO(&amp;quot;ds1672&amp;quot;, 0x68), },&lt;br /&gt;
to static struct i2c_board_info __initdata i2c_info[] (line 169)&lt;br /&gt;
&lt;br /&gt;
OR compile and load this simple module/driver:&lt;br /&gt;
 #include &amp;lt;linux/i2c.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;linux/rtc.h&amp;gt;&lt;br /&gt;
 #define DRV_VERSION &amp;quot;0.1&amp;quot;&lt;br /&gt;
 static struct i2c_board_info i2c_info = {I2C_BOARD_INFO(&amp;quot;ds1672&amp;quot;, 0x68)};&lt;br /&gt;
 static struct i2c_client *i2c_client;&lt;br /&gt;
 static int __init ngw_ds1672_init(void)&lt;br /&gt;
 {&lt;br /&gt;
    struct i2c_adapter *adap = i2c_get_adapter(0);//we only have 1 i2c.&lt;br /&gt;
    i2c_client = i2c_new_device(adap,&amp;amp;i2c_info);&lt;br /&gt;
    return 0;&lt;br /&gt;
 }&lt;br /&gt;
 static void __exit ngw_ds1672_exit(void)&lt;br /&gt;
 {&lt;br /&gt;
    i2c_unregister_device(i2c_client);&lt;br /&gt;
 }&lt;br /&gt;
 MODULE_AUTHOR(&amp;quot;Peter Huewe &amp;lt;peterhuewe &amp;lt;!at!&amp;gt; gmx.de&amp;gt;&amp;quot;);&lt;br /&gt;
 MODULE_DESCRIPTION(&amp;quot;Register Dallas/Maxim DS1672 i2c-client&amp;quot;);&lt;br /&gt;
 MODULE_LICENSE(&amp;quot;GPL&amp;quot;);&lt;br /&gt;
 MODULE_VERSION(DRV_VERSION);&lt;br /&gt;
 module_init(ngw_ds1672_init);&lt;br /&gt;
 module_exit(ngw_ds1672_exit);&lt;br /&gt;
&lt;br /&gt;
== Setting the system clock from RTC at boot time ==&lt;br /&gt;
&lt;br /&gt;
In order to use the external RTC as a reference clock, I'd recommend adding the line to setup.c and compile in the drivers mentioned above (i2c, i2c-gpio, rtc, rtc-ds1672).&lt;br /&gt;
&lt;br /&gt;
Then, in the kernel config, set 'CONFIG_RTC_HCTOSYS_DEVICE' to 'rtc1' in order to use the external RTC as reference clock.&lt;br /&gt;
 Location:&lt;br /&gt;
  -&amp;gt; Device Drivers&lt;br /&gt;
   -&amp;gt; Real Time Clock&lt;br /&gt;
    -&amp;gt; Set system time from RTC on startup and resume&lt;br /&gt;
      -&amp;gt; RTC used to set the system time (change this from rtc0 to rtc1)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Schematics ==&lt;br /&gt;
In order to ease the wiring of the ds1762 I created some schematics&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Ds1672-rtc Schaltplan.png]] [[File:Ds1672-rtc Steckplatine.png]]&lt;br /&gt;
&lt;br /&gt;
Schematics / Image created with [[fritzing]] - [http://fritzing.org/]&lt;/div&gt;</summary>
		<author><name>Peter Huewe</name></author>	</entry>

	</feed>