Skip to content

Commit 5857aee

Browse files
pyhyskartben
authored andcommitted
boards: shields: Add Sparkfun RV8803 RTC shield
Product photo from https://www.sparkfun.com/sparkfun-real-time-clock-module-rv-8803-qwiic.html Tested with the command mentioned in the index.rst page. Signed-off-by: Jonas Berg <[email protected]>
1 parent 30fbfff commit 5857aee

File tree

6 files changed

+108
-0
lines changed

6 files changed

+108
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2025 Jonas Berg
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config SHIELD_SPARKFUN_RV8803
5+
def_bool $(shields_list_contains,sparkfun_rv8803)
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
.. _sparkfun_rv8803:
2+
3+
Sparkfun RV8803 Shield
4+
######################
5+
6+
Overview
7+
********
8+
9+
The `SparkFun RV8803 Real Time Clock Shield`_ features
10+
a `Micro Crystal RV-8803-C7 Real-Time-Clock`_ and two Qwiic connectors.
11+
It has a 3 Volt back-up coin-cell battery.
12+
13+
.. figure:: sparkfun_rv8803.webp
14+
:align: center
15+
:alt: Sparkfun RV8803 Shield
16+
17+
Sparkfun RV8803 Shield (Credit: Sparkfun)
18+
19+
20+
Requirements
21+
************
22+
23+
This shield can be used with boards which provide an I2C connector, for
24+
example STEMMA QT or Qwiic connectors.
25+
The target board must define a ``zephyr_i2c`` node label.
26+
See :ref:`shields` for more details.
27+
28+
29+
Pin Assignments
30+
===============
31+
32+
+--------------+-------------------------------------------------------------------------------------------------+
33+
| Shield Pin | Function |
34+
+==============+=================================================================================================+
35+
| SDA | RV8803 I2C SDA. Also connected to the Qwiic connector. |
36+
+--------------+-------------------------------------------------------------------------------------------------+
37+
| SCL | RV8803 I2C SCL. Also connected to the Qwiic connector. |
38+
+--------------+-------------------------------------------------------------------------------------------------+
39+
| EVI | RV8803 event input. Active low by default, with external pull-up and on-shield button. |
40+
+--------------+-------------------------------------------------------------------------------------------------+
41+
| INT | RV8803 interrupt output. Active low (open drain), with external pull-up. |
42+
+--------------+-------------------------------------------------------------------------------------------------+
43+
| CLKOUT | RV8803 clock output. 32768, 1024 or 1 Hz (controlled by devicetree setting). Enabled by CLKOE. |
44+
+--------------+-------------------------------------------------------------------------------------------------+
45+
| CLKOE | RV8803 control of CLKOUT, which is enabled when this pin is high. External pull-down on shield. |
46+
+--------------+-------------------------------------------------------------------------------------------------+
47+
48+
To use the interrupt output from the RV-8803, you need to connect a wire from
49+
the shield INT output to a suitable GPIO on your microcontroller board, and to
50+
modify the devicetree settings. See :dtcompatible:`microcrystal,rv8803` for options.
51+
52+
53+
Programming
54+
***********
55+
56+
Set ``--shield sparkfun_rv8803`` when you invoke ``west build``. For example
57+
when running the :zephyr:code-sample:`rtc` sample:
58+
59+
.. zephyr-app-commands::
60+
:zephyr-app: samples/drivers/rtc
61+
:board: adafruit_qt_py_rp2040
62+
:shield: sparkfun_rv8803
63+
:goals: build
64+
65+
.. _SparkFun RV8803 Real Time Clock Shield:
66+
https://www.sparkfun.com/sparkfun-real-time-clock-module-rv-8803-qwiic.html
67+
68+
.. _Micro Crystal RV-8803-C7 Real-Time-Clock:
69+
https://www.microcrystal.com/en/products/real-time-clock-rtc-modules/rv-8803-c7
38.1 KB
Loading
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
#
3+
# Copyright (c) 2025, Jonas Berg
4+
5+
shield:
6+
name: sparkfun_rv8803
7+
full_name: Sparkfun RV8803 Real Time Clock Shield
8+
vendor: sparkfun
9+
supported_features:
10+
- rtc
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright (c) 2025 Jonas Berg
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
aliases {
9+
rtc = &sparkfun_rv8803;
10+
};
11+
};
12+
13+
&zephyr_i2c {
14+
status = "okay";
15+
16+
sparkfun_rv8803: rv8803@32 {
17+
status = "okay";
18+
compatible = "microcrystal,rv8803";
19+
reg = <0x32>;
20+
};
21+
};

samples/drivers/rtc/sample.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ tests:
66
- stm32f3_disco
77
- mimxrt700_evk/mimxrt798s/cm33_cpu0
88
- mimxrt700_evk/mimxrt798s/cm33_cpu1
9+
- adafruit_qt_py_rp2040/rp2040
910
integration_platforms:
1011
- stm32f3_disco
12+
extra_args:
13+
- platform:adafruit_qt_py_rp2040/rp2040:SHIELD="sparkfun_rv8803"
1114
tags:
1215
- samples
1316
- rtc

0 commit comments

Comments
 (0)