STM32 Low Layer(LL) library. DS1307 serial real-time clock (RTC) is a low power, full binary-coded decimal (BCD) clock/calendar plus 56 bytes of NV SRAM.
- Power Supply from 3.3V to 5V DC
- Completely Manages All Timekeeping FunctionsReal-Time Clock Counts:
- Seconds
- Minutes
- Hours
- Date of the Month
- Month
- Day of the Week
- Year with Leap-Year Compensation Valid Up to 2100
- 56-Byte, Battery-Backed, General-Purpose RAM with Unlimited Writes
- I2C Serial Interface
- Low Power Operation Extends Battery Backup Run Time
- Consumes Less than 500nA in Battery-Backup Mode with Oscillator Running
- Automatic Power-Fail Detect and Switch Circuitry
How to add CPM to the project, check the link
CPMAddPackage(
NAME DS1307
GITHUB_REPOSITORY ximtech/DS1307
GIT_TAG origin/main)
- Start project with STM32CubeMX:
- Select: Project Manager -> Advanced Settings -> I2C -> LL
- Generate Code
- Add sources to project:
add_subdirectory(${STM32_CORE_SOURCE_DIR}/I2C/Polling) # add I2C dependency
include_directories(${includes}
${DS1307_DIRECTORY}) # source directories
file(GLOB_RECURSE SOURCES ${sources}
${DS1307_SOURCES}) # source files
- Then Build -> Clean -> Rebuild Project
- Usage example: link