Showing changes from revision #0 to #1:
Added | Removed | Changed
The rtctime structure is used with the RTC_Read and RTC_Write SWIs to represent the time value that is read from/written to the RTC.
struct rtctime { uint8_t Centiseconds; // BCD centiseconds (00-99) uint8_t Seconds; // BCD seconds (00-59) uint8_t Minutes; // BCD minutes (00-59) uint8_t Hours; // BCD hours (00-23) uint8_t DayOfMonth; // BCD day of month (01-31) uint8_t Month; // BCD month (01-12) uint8_t YearLO; // BCD year low value (00-99) uint8_t YearHI; // BCD year high value (19-22 due to 5-byte time limits) };
Time values should be specified in UTC.
Note that this is the same basic structure as used with the RTC HAL device, except that DayOfMonth and Month are both 1-based. The RTC module will convert between this format and whatever format the HAL device requires.
When setting the time, some fields can be set to 255 in order to prevent the corresponding value in the RTC from being updated. See RTC_Write for more information.