cancel
Showing results for 
Search instead for 
Did you mean: 

RTC not ticking

keepfishes
Associate
Posted on August 10, 2012 at 17:04

Dear all,

I am having a problem making the RTC of my STM32 Discovery F4 work. I have taken the example code from STM32 Std Peripheral Library, RTC_Timer folder but it does not work. The MCU is able to detect the LSERDY flag and the program exits the while loop:

/* Wait till LSE is ready */

while

(RCC_GetFlagStatus(RCC_FLAG_LSERDY) ==

RESET

)

{

}

 

after a few miliseconds. However, it does not generate 8 interrupts per second as promised.

I suspect that it is because I have soldered the 32.768KHz oscillator directly onto the PC14 and PC15 header pins. Would that be the cause of the problem? If it is, where is the correct place to solder the oscillator? Thanks.
1 REPLY 1
Posted on August 10, 2012 at 17:47

Please refer to the schematic/manual.

http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/USER_MANUAL/DM00039084.pdf

You need to place a 6pF 32.768 KHz crystal at location X3, and clear the SB15 and SB16 solder bridges. Place 6.8pF at positions C16 and C27

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