File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ ## RTC HAL API
2
+
3
+ The RTC HAL API provides a low-level interface to the Real Time Counter (RTC) of a target.
4
+
5
+ ### Assumptions
6
+
7
+ #### Defined behavior
8
+
9
+ - The function ` rtc_init ` is safe to call repeatedly.
10
+ - RTC accuracy is at least 10%.
11
+ - ` Init ` /` free ` doesn't stop RTC from counting.
12
+ - Software reset doesn't stop RTC from counting.
13
+ - Sleep modes don't stop RTC from counting.
14
+ - Shutdown mode doesn't stop RTC from counting.
15
+
16
+ #### Undefined behavior
17
+
18
+ - Calling any function other than ` rtc_init ` before the initialization of the RTC.
19
+
20
+ #### Potential bugs
21
+
22
+ - Incorrect overflow handling.
23
+ - Glitches due to ripple counter.
24
+
25
+ ### Implementing the RTC API
26
+
27
+ RTC HAL API is in [ hal/rtc_api.h] ( /docs/v5.4/mbed-os-api-doxy/rtc__api_8h_source.html ) . You need to implement the following functions to support RTC:
28
+
29
+ To enable sleep support in Mbed OS, you need to add the ` RTC ` label in the ` device_has ` option of the target's section in the ` targets.json ` file.
You can’t perform that action at this time.
0 commit comments