cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f407 Discovery RTC

vinothraj
Associate II
Posted on September 06, 2012 at 07:55

i try to show the time in Hiper terminal using uart.my problem  is moreover this link-

 

/public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Discovery/stm32f4+dicovery++problems+coming+in+configuring+RTC.only+few+corrections+needed&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F&currentviews=154♯{2E8F2AEA-E1AC-4359-9FBC-341F279053F3}

       

the control flow is stuck on this place

while(RCC_GetFlagStatus(RCC_FLAG_LSERDY) == RESET)

  {

  }

i think that i mistook on  

oscillating frequency.BUT could not find it.attached the files.you may refer it please.

#rtc #wait-for-you--clive1-!-!-!
20 REPLIES 20
Posted on December 25, 2012 at 19:46

Ok, so reasonably safe to assume the external circuitry isn't functioning as desired. I'll wave my magic wand, but don't think it will help.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
vinothraj
Associate II
Posted on December 26, 2012 at 07:47

'' I'll wave my magic wand''

 

I can not get you.
vinothraj
Associate II
Posted on December 27, 2012 at 13:32

i tried LSI for source clock.but i do not get the accurate RTC clock and calender.

Then i combined  below examples for accurate RTC LSI :

stm32f4_dsp_stdperiph_lib\STM32F4xx_DSP_StdPeriph_Lib_V1.0.1\Project\STM32F4xx_StdPeriph_Examples\RTC\RTC_LSI

and

stm32f4_dsp_stdperiph_lib\STM32F4xx_DSP_StdPeriph_Lib_V1.0.1\Project\STM32F4xx_StdPeriph_Examples\RTC\TimeStamp

Now i get the Precise RTC clock.but i have doubt.

>that any problem may come because of LSI?

>LSI or LSE.Which is best to use?

harshad
Associate II
Posted on January 09, 2013 at 14:04

Why so ?

I am not sure why they are not providing crystal for RTC. So If we want to use RTC then we must have to mount that X3 and capacitors ?

Posted on January 09, 2013 at 15:56

Why so ? I am not sure why they are not providing crystal for RTC. So If we want to use RTC then we must have to mount that X3 and capacitors ?

 

The RTC runs with either LSI or LSE or HSE divided down. What you will need LSE for is to clock the RTC if you use the lowest power modes, and run it via VBAT. They don't provide a spot for the battery either? The STM32L-Discovery board comes with a 32.768 KHz crystal and a location to install a battery holder.

Assume it relates to cost and expected use patterns. You could always buy the EVAL series board.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
harshad
Associate II
Posted on January 10, 2013 at 04:59

@clive1

Yes agree in this case. But people goes with Discovery kit just because there is much difference in price as compare to Eval board.

Is there any low cost Eval board available ? Let me know if you have any idea.

M0NKA
Senior
Posted on January 10, 2013 at 11:00

Hi,

I think there is a cheap clone of the 320Eval on ebay, with slot for the discovery and LCD + PHY, something like 50 GBP, directly from China, not sure if it is still for sale.

But why skip on the most exciting part of prototyping - soldering your own proto. The

coding is the boring part. 🙂

harshad
Associate II
Posted on January 10, 2013 at 11:15

Hi M0NKA,

Actually I am learning STM32 so I don't want to spare my mind in hardware section once I am ready with firmware development then I will go with my own prototype board.

I have worked a lot on Freescale and Microchip based prototype. Now I am really bored with soldering and everything so want to enjoy firmware for some time.

Thanks for pointing out board on ebay. I will check for that clone thanks again.

M0NKA
Senior
Posted on January 11, 2013 at 09:35

Hi,

No problem, was just a joke. BTW for your problem. Check the load capacitance of the

crystal you use and the external capacitors. For example i use

http://uk.farnell.com/abracon/abs25-32-768khz-6-1-t/crystal-32-768khz-6pf-smd/dp/2101353

from

Farnell, i had to use ~8pF external caps. With lower value the LSE was not starting at

all, probably is the exact case with you (i talk about Discovery board).

Regards, Chris

hitsumen
Associate II
Posted on January 28, 2014 at 20:36

This one with 6.8pF caps works ok for me.

http://uk.farnell.com/epson/mc-306-32-768khz-6pf/crystal-32-768khz-mc-306-6pf/dp/1712823