We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4039929 commit 2cb4d4aCopy full SHA for 2cb4d4a
rtc/hello_rtc/hello_rtc.c
@@ -32,6 +32,10 @@ int main() {
32
rtc_init();
33
rtc_set_datetime(&t);
34
35
+ // clk_sys is >2000x faster than clk_rtc, so datetime is not updated immediately when rtc_get_datetime() is called.
36
+ // tbe delay is up to 3 RTC clock cycles (which is 64us with the default clock settings)
37
+ sleep_us(64);
38
+
39
// Print the time
40
while (true) {
41
rtc_get_datetime(&t);
0 commit comments