STM32F4 AmpLib: I2C Example, DS3231 Real Time Clock

GitHub Link

So it turns out I2C was one of my pain points for a bit. One of my first interactions with a more complex serial communication besides SPI. However, I now have a working project using an I2C peripheral, namely the DS3231 RTC module.

For those of you wanting to get ahold of that hardware, there are several examples on Adafruit or eBay if you want to save money while taking on some minor risk and don’t mind waiting, which is what I did.

This also marks the first module example for expanding the AmpLib project into a bit of a Board Support Package. It ultimately didn’t make sense to me to have AmpLib reduce all the code I write in example when the hardware interfaces require complex peripheral interactions and can be made completely reusable. You’ll see the code written for mod_ds3231.c here.

Some of you may notice that the board for the DS3231 I’m using also has another IC, namely an AT24C32 EEPROM from Atmel, and yes, that will likely be the next module I add driver code for.

This entry was posted in stm32f4-amperture-periphlib. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *