Difference between revisions of "RTC Cape"

From eLinux.org
Jump to: navigation, search
(initital)
 
m (Wmat moved page CircuitCo:RTC Cape to RTC Cape over redirect: Removing CircuitCo namespace)
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
==Descriptions==
 
==Descriptions==
[[File:RTCCape650.jpg|border|right|link=|300px|RTC Cape]]
+
[[File:RTC-SlantedTop650.jpg|border|right|300px|RTC Cape]]
The RTC Cape provides tracking capability for the BeagleBone Black even when the power is lost. This cape features the MCP79410 I2C-based real-time clock/calendar that can generate square waves at different frequencies or alarm interrupts.
+
The RTC Cape provides time tracking capability for the BeagleBone Black even when the power is lost. This cape features the DS1338 I2C-based real-time clock/calendar and a holder for a coin battery type CR2032. Setup, reading, and setting up time is easy with the provided device tree overlay.
 +
<br>
 +
<br>
 +
<br>
 +
<br>
 +
<br>
 +
<br>
 +
<br>
 +
<br>
 +
<br>
 +
<br>
 +
==Revision Changes==
 +
===Revision A1===
 +
Initial release of RTC Cape.
  
  
  
  
 +
==Software Support & Compatibility==
 +
* All revisions are compatible with BeagleBone and BeagleBone Black using 3.8 kernel.
 +
<!--* Device tree files: [http://elinux.org/images/e/e3/BBB-RTC-01-00A1.tar.gz BBB-RTC-01-00A1.tar.gz]-->
 +
* Latest software for BeagleBone Black can be downloaded [http://elinux.org/Beagleboard:Updating_The_Software here].
  
  
  
  
 +
==Getting Started==
 +
The instructions below are performed on Debian release 2014-05-14 (Linux beaglebone 3.8.13-bone50 #1 SMP Tue May 13 13:24:52 UTC 2014 armv7l GNU/Linux).
 +
* Connect your BeagleBone Black to the internet, log in as root, download the device tree files and extract them to /lib/firmware of your BBB:
 +
<code>
 +
    cd /lib/firmware
 +
    wget https://github.com/CircuitCo/RTC-Cape/raw/docs/BBB-RTC-01-00A1.tar.gz
 +
    tar xvzf BBB-RTC-01-00A1.tar.gz
 +
</code>
  
  
 +
* Load the device tree overlay for your RTC Cape:
 +
<code>
 +
    echo BBB-RTC-01:00A1 > /sys/devices/bone_capemgr*/slots
 +
</code>
  
  
 +
* Check to ensure the overlay is loaded. In the messages below, the DS1338 is registered as rtc1:
 +
<code>
 +
    dmesg | tail
 +
        [ 5721.844355] bone-capemgr bone_capemgr.9: slot #7: 'Override Board Name,00A1,Override Manuf,BBB-RTC-01'
 +
        [ 5721.844607] bone-capemgr bone_capemgr.9: slot #7: Requesting part number/version based 'BBB-RTC-01-00A1.dtbo
 +
        [ 5721.844656] bone-capemgr bone_capemgr.9: slot #7: Requesting firmware 'BBB-RTC-01-00A1.dtbo' for board-name 'Override Board Name', version '00A1'
 +
        [ 5721.847380] bone-capemgr bone_capemgr.9: slot #7: dtbo 'BBB-RTC-01-00A1.dtbo' loaded; converting to live tree
 +
        [ 5721.848460] bone-capemgr bone_capemgr.9: slot #7: #3 overlays
 +
        [ 5721.860065] omap_i2c 4802a000.i2c: bus 2 rev0.11 at 100 kHz
 +
        [ 5721.902076] rtc-ds1307 2-0068: rtc core: registered ds1338 as rtc1
 +
        [ 5721.902147] rtc-ds1307 2-0068: 56 bytes nvram
 +
        [ 5721.902274] omap_i2c 4802a000.i2c: unable to select pin group
 +
        [ 5721.902468] bone-capemgr bone_capemgr.9: slot #7: Applied #3 overlays.
 +
</code>
  
  
 +
* Read the time from the RTC chip. It should look like something below since the time has not been set:
 +
<code>
 +
    hwclock -r -f /dev/rtc1
 +
    Sat 01 Jan 2000 12:06:17 AM UTC  -1.004531 seconds
 +
</code>
  
  
==Revision Changes==
+
* Update the system time of the BeagleBone Black (internet connection required) and write that to the RTC chip using hwclock command:
===Revision A1===
+
<code>
Initial release of RTC Cape.
+
    ntpdate -b -s -u pool.ntp.org
 +
    hwclock -w -f /dev/rtc1
 +
</code>
 +
 
 +
 
 +
* Read the time again. This time it should have been updated.
 +
<code>
 +
    hwclock -r -f /dev/rtc1
 +
    Fri 16 May 2014 10:57:12 PM UTC  -0.755959 seconds
 +
</code>
 +
 
  
  
  
 +
==Helpful Links==
 +
* [http://datasheets.maximintegrated.com/en/ds/DS1338-DS1338Z.pdf DS1338 Datasheet]
 +
* [http://elinux.org/Capemgr Capemgr wiki]
 +
* [http://www.devicetree.org/Device_Tree_Usage Device Tree Usage]
  
==Software Support & Compatibility==
 
All revisions are compatible with BeagleBone and BeagleBone Black using 3.8 kernel.
 
  
  
Device tree overlay is coming soon.
 
  
  
Line 64: Line 123:
 
|I2C1_SDA
 
|I2C1_SDA
 
|-
 
|-
|Multi-Function Pin
+
|Squarewave Output Pin
 
|GPIO1_29
 
|GPIO1_29
 
|}
 
|}
Line 79: Line 138:
 
==Product Images==
 
==Product Images==
 
<gallery>
 
<gallery>
File:RTCCape650.jpg|Generic Proto Cape
+
File:RTC-SlantedTop650.jpg|RTC Cape
 
</gallery>
 
</gallery>
  
Line 87: Line 146:
 
==Documentations==
 
==Documentations==
 
====RTC Cape Revision A1====
 
====RTC Cape Revision A1====
Coming soon.
+
* [https://github.com/CircuitCo/RTC-Cape/blob/rev_a1/RTC_Cape_A1_BOM.xlsx?raw=true Bill of Materials]
 +
* [https://github.com/CircuitCo/RTC-Cape/blob/rev_a1/RTC_Cape_A1_Gerbers.zip?raw=true Manufacturing Files]
 +
* [https://github.com/CircuitCo/RTC-Cape/blob/rev_a1/RTC_Cape_A1_Schematic.pdf?raw=true Schematic (PDF)]
 +
* [https://github.com/CircuitCo/RTC-Cape/blob/rev_a1/RTC_Cape_A1.sch Schematic (EAGLE)] (Right click and save as...)
 +
* [https://github.com/CircuitCo/RTC-Cape/blob/rev_a1/RTC_Cape_A1.brd PCB (EAGLE)] (Right click and save as...)
 +
To download all files at once please click [https://github.com/CircuitCo/RTC-Cape/archive/rev_a1.zip here]
 +
 
 +
 
 +
To go back to the cape list, please click [http://elinux.org/Beagleboard:BeagleBone_Capes here]

Latest revision as of 07:57, 1 August 2017

Descriptions

RTC Cape

The RTC Cape provides time tracking capability for the BeagleBone Black even when the power is lost. This cape features the DS1338 I2C-based real-time clock/calendar and a holder for a coin battery type CR2032. Setup, reading, and setting up time is easy with the provided device tree overlay.









Revision Changes

Revision A1

Initial release of RTC Cape.



Software Support & Compatibility

  • All revisions are compatible with BeagleBone and BeagleBone Black using 3.8 kernel.
  • Latest software for BeagleBone Black can be downloaded here.



Getting Started

The instructions below are performed on Debian release 2014-05-14 (Linux beaglebone 3.8.13-bone50 #1 SMP Tue May 13 13:24:52 UTC 2014 armv7l GNU/Linux).

  • Connect your BeagleBone Black to the internet, log in as root, download the device tree files and extract them to /lib/firmware of your BBB:

   cd /lib/firmware
   wget https://github.com/CircuitCo/RTC-Cape/raw/docs/BBB-RTC-01-00A1.tar.gz
   tar xvzf BBB-RTC-01-00A1.tar.gz


  • Load the device tree overlay for your RTC Cape:

   echo BBB-RTC-01:00A1 > /sys/devices/bone_capemgr*/slots


  • Check to ensure the overlay is loaded. In the messages below, the DS1338 is registered as rtc1:

   dmesg | tail
       [ 5721.844355] bone-capemgr bone_capemgr.9: slot #7: 'Override Board Name,00A1,Override Manuf,BBB-RTC-01'
       [ 5721.844607] bone-capemgr bone_capemgr.9: slot #7: Requesting part number/version based 'BBB-RTC-01-00A1.dtbo
       [ 5721.844656] bone-capemgr bone_capemgr.9: slot #7: Requesting firmware 'BBB-RTC-01-00A1.dtbo' for board-name 'Override Board Name', version '00A1'
       [ 5721.847380] bone-capemgr bone_capemgr.9: slot #7: dtbo 'BBB-RTC-01-00A1.dtbo' loaded; converting to live tree
       [ 5721.848460] bone-capemgr bone_capemgr.9: slot #7: #3 overlays
       [ 5721.860065] omap_i2c 4802a000.i2c: bus 2 rev0.11 at 100 kHz
       [ 5721.902076] rtc-ds1307 2-0068: rtc core: registered ds1338 as rtc1
       [ 5721.902147] rtc-ds1307 2-0068: 56 bytes nvram
       [ 5721.902274] omap_i2c 4802a000.i2c: unable to select pin group
       [ 5721.902468] bone-capemgr bone_capemgr.9: slot #7: Applied #3 overlays.


  • Read the time from the RTC chip. It should look like something below since the time has not been set:

   hwclock -r -f /dev/rtc1
   Sat 01 Jan 2000 12:06:17 AM UTC  -1.004531 seconds


  • Update the system time of the BeagleBone Black (internet connection required) and write that to the RTC chip using hwclock command:

   ntpdate -b -s -u pool.ntp.org
   hwclock -w -f /dev/rtc1


  • Read the time again. This time it should have been updated.

   hwclock -r -f /dev/rtc1
   Fri 16 May 2014 10:57:12 PM UTC  -0.755959 seconds



Helpful Links



Specifications

Followings are some specifications of the RTC Cape:

Mechanical Specifications

Size 2.15" x 2.825"
Layers 2
PCB Thickness .062"
RoHS Compliant Yes



Signal Usage

RTC Cape
Power VDD_3V3EXP
I2C I2C1_SCL
I2C1_SDA
Squarewave Output Pin GPIO1_29



Distributors

Please visit Where To Buy for a list of distributors who carry BeagleBoardToys' capes.



Product Images



Documentations

RTC Cape Revision A1

To download all files at once please click here


To go back to the cape list, please click here