Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
ld
 
 
src
 
 
 
 
 
 
 
 

Overview

This is an example program to get the time from a DS3231 'Real-Time Clock' module using an STM32 chip. It is simply set to blink an LED every 10 "seconds", whatever those are.

It also sets a number of variables and demonstrates read/writing to the EEPROM chips included on the cheap and popular 'ZS-042' DS3231 boards, but those values are not surfaced outside of a debugger.

The included Makefile has options for building the program for an STM32L031K6 or STM32F031K6 chip - there are "Nucleo" boards available with both of those cores. Note that pins B6 and B7 are labeled D5 and D4 respectively, on those boards.

Building and Uploading

You can build the code with make, and upload it with the 'st-flash' utility:

st-flash write main.bin 0x08000000

About

An example project for using an STM32F0 or L0 chip to communicate with a DS3231 Real-Time Clock module over I2C. Example code for using an EEPROM chip on the same bus is also included.

Resources

License

Releases

No releases published

Packages

No packages published

Languages