cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f4 dicovery :: problems coming in configuring RTC...only few corrections needed

rishi
Associate II
Posted on July 05, 2012 at 19:45

friends i ported the code of ''STM324xG-EVAL'' to stm32f4 discovery....and i made it work almost completely....bt some errors are coming on output...

i am posting two images regarding this..

problem 1: 

http://i45.tinypic.com/29ep4ap.jpg

problem 2: 

http://i48.tinypic.com/2j4zecm.jpg

and also attatching my code keil....urgent help needed

#!telegraphing
11 REPLIES 11
Posted on July 05, 2012 at 20:32

Is your external 32 KHz actually oscillating? What does the signal look like?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
rishi
Associate II
Posted on July 06, 2012 at 08:00

hey dear how can i check whether 32KHz osillator is working...on which pins should i check...and what type of waveform should be there

rishi
Associate II
Posted on July 06, 2012 at 09:10

hey i checked on pin PC14 and PC15...bt no signal is coming there...is there any changes needed to do on hardware..or any other config.. i have to do...

Posted on July 06, 2012 at 11:06

You should see a low voltage 32 KHz sine wave.

Your code appears to enable the PWR clock, and enable the BKP domain, which should be sufficient for the LSE to be started with RCC_LSEConfig(RCC_LSE_ON)

If you have modified your STM32F4-Discovery board, consider what changes you have made.

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

no i didnt modified anything in hardware....have you checked mine code in yr discovery board... problem is that i am not getting any sine wave from 32KHz oscillator...so what problem can be there...r all configurations correct in my code.... 

Posted on July 07, 2012 at 13:08

no i didnt modified anything in hardware....have you checked mine code in yr discovery board... problem is that i am not getting any sine wave from 32KHz oscillator...so what problem can be there...r all configurations correct in my code....

No I just skimmed through it, testing it would require a whole lot of physical effort and time which I'm not invested in doing right now.

Suggest you step through the code and observe if the registers are behaving as expected, and LSE enablement is occurring. Try some of the simpler firmware library examples.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on July 07, 2012 at 18:30

You might want to work on the porting some more (STM3240G to STM32F4-Discovery), there still seem to be expectations in the project that the HSE is 25 MHz, and that HSE_VALUE is not correctly defined. The PLL issues appear addressed, but the USART baud rates will be wrong as they are premised on hardware knowledge that is invalid.

Suggest you review what I did with the Mass Storage Controller project I emailed you. Perhaps also invest in a merge tool like WinMerge which might be helpful to understand what I did there.

You might also want to look at what ST did with the projects for the STM32F4-Discovery firmware release vs the STM32F4 library targeted for the eval boards.

Not that any of that has a direct bearing on LSE, but it always helps to start from a point of known good functionality vs unknown.

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

hey brother i want to share one thing with you... in usart communication for hyperterminal the baudrate that i defined in config of usart is 57600 bt on setting the same baudrate on hyperterminal it gives error...nd wrong values are transferred...but on setting baudrate of 19200 it transmits correct value...nd the same baudrates i am using in rtc...so what can we conclude from this....????

rishi
Associate II
Posted on July 07, 2012 at 21:00

hey one more thing....in stm32f4xx.h the default value given for HSE is 25MHz bt the xternal osscilator that is on discovery is 8MHz..so should i change that HSE value to 8000000...instead of  25000000...