TOP Contributors

  1. MIKROE (2784 codes)
  2. Alcides Ramos (385 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (97 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (139842 times)
  2. FAT32 Library (72209 times)
  3. Network Ethernet Library (57392 times)
  4. USB Device Library (47739 times)
  5. Network WiFi Library (43364 times)
  6. FT800 Library (42700 times)
  7. GSM click (29980 times)
  8. mikroSDK (28439 times)
  9. PID Library (26989 times)
  10. microSD click (26398 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
Example

STM32F4 Internal RTC and Calender

Rating:

10

Author: Andrew Hazelton

Last Updated: 2017-10-12

Package Version: 1.2.0.0

Example: 1.0.0.0

Category: Timers (Real time clock)

Downloaded: 2567 times

Followed by: 2 users

License: MIT license  

This is an example of how to use the STM32F407VG internal Real Time Clock (RTC) and Calender module with external LSE oscillator to be 32.768 kHz.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "STM32F4 Internal RTC and Calender" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "STM32F4 Internal RTC and Calender" changes.

Do you want to report abuse regarding "STM32F4 Internal RTC and Calender".

  • Information
  • Comments (1)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

Example Blog

STM32F4 Internal RTC &amp; Calender Module Diagram

STM32F4 Internal RTC & Calender Module Diagram

STM32F4 Internal RTC & Calender Module Diagram

View full image
STM32F4 System Clocks

STM32F4 System Clocks

This is a screen capture from the STM32CubeMX software provided free from st.com that visually shown the internal system clock lines an Prescaler values. It makes it much easier to understand than trying to piece it all together from the datasheet.

View full image

This is an example of how to use the STM32F407VG internal Real Time Clock (RTC) and Calender module with external LSE oscillator to be 32.768 kHz.

The mE USART Terminal is used to print out the RTC and Calender values and status messages. Turn on USB UART B.  Turn ON   SW12.3   SW12.4  (Board: EasyMx PRO v7 for STM32 ARM).

Connecting a USB cable between your PC and USB UART B on board will create a virtual COM port on your PC which can then be accessed via the mE USART Terminal within your mE compiler.

Use the “Computer_Brd_Chip_168MHz.cfgsch” file in the attached for internal MCU configuration. The image above is a visual depiction of this configuration file setup. This setup will insure that the STM32F407VG is running at its maximum speed.

For full details on STM32F4 internal modules see RM0090 ST Reference Manual from st.com.

RTC_Init ( … )

RTC_SetTime ( … )

RTC_SetDate ( … )

RTC_GetSubSeconds ( … )

RTC_GetTime ( … )

RTC_GetDate ( … ) // Printing values across to the mE USART Terminal

RTC_PrintTime ( … )

RTC_PrintDate ( … )

Print_Sub_Secs ( … )  

***************************************************************************************** 

Version 1.2.0.0  - 10th Aug 2015

Added Calibrate_RTC_Crystal function.

Changed RTC_SetTime function.

Changed RTC_Init function.

Made minor improvements. 

 

RELATED CODES

RTC2 Click driver for NETMF

0

This is a C# driver to use the Illuminance Click board on the Quail board or any NETMF board. Features : - SetClock - GetDateTime - Enable square wave generation function - Use of SRAM to store user’s datetime infos

[Learn More]

RTC Click and Mikromedia for XMEGA

0

reading the date and time from chip PCF8583

[Learn More]

RTC

16

For P16 and P18:RTC libraries for the PCF8583P and the DS1307, both for hardware I2c and software I2c. No alarm functions provided. Daylight Saving Time version available. For P24: RTCC routines (internal RTCC), including the alarm functions.

[Learn More]