Keil™, An ARM® Company

File Download Area

STM32 Realtime Clock Example

The STM32 RTC example program shows how to configure and use the realtime clock of STMicroelectronics STM32F103xx microcontroller.

The RTC is configured to generate an interrupt every second and also when the alarmtime is reached. Time is set to 12:00:00 and alarmtime to 12:00:20. LED PB8 blinks in a second interval and PB10 is lit upon an alarm interrupt.

The configuration of the clocks and the realtime clock is done using the Configuration Wizard in file STM32_Init.c.

Two µVision targets are available:

  • Simulator where the program runs in the software simulator.
  • MCBSTM32 where the program runs from internal Flash located on the microcontroller.

The example is tesed with the Keil Evaluation Board MCBSTM32.

STM32_RTC.ZIP (30K)
Thursday, February 12, 2009

Estimated File Download Time:
< 10 Seconds: 56Kb Modem
< 10 Seconds: 128Kb ISDN
< 10 Seconds: T1/Broadband