cancel
Showing results for 
Search instead for 
Did you mean: 

How to start the RTC in the STM32F2xx?

BRick
Associate

How to start the RTC (real time clock) in the STM32F2xx processor with a 25 Mhz OSC

2 REPLIES 2
Imen.D
ST Employee

Hello,

You can start with RTC example within STM32CubeF2 firmware package and modify this working application depending on your needs:

STM32Cube_FW_F2_V1.7.0\Projects\STM32F207ZG-Nucleo\Examples\RTC

You can also use STM32CubeMX tool, this allow you to choose the microcontroller, select the peripherals you want and map them to pins graphically. Then, build and generate your starting project with initialization C code.

Kind Regards,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

You want to clock it off the 25 MHz source (ie divided down HSE), or do you plan on using a 32.768 KHz LSE crystal?

I don't think the former would permit the device going into STANDBY, etc, but it would hold good time.

Should be able divide the 25 MHz to 1 MHz or less required by the RTC, and then prescaled and divided some more.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..