2015-12-28 02:44 PM
hi (at first excuse me for my English)
I use standard peripheral example for implement RTC at stm32f103ret6. but this example runs in microcontroller to this line and after that stops. what is the problem? and how can I fix it?
RCC_LSEConfig
(
RCC_LSE_ON)
;
/* Wait till LSE is ready */
while
(
RCC_GetFlagStatus(
RCC_FLAG_LSERDY)
==
RESET)
{
}
2015-12-28 03:21 PM
Your board lacks an external low speed oscillator, or the chosen components don't actually oscillate?
Review the design.2015-12-29 04:27 AM
I used internal HSI instead of HSE . but now my problem is adjusting time by usart : hyperterminal window shows below massage and wants to adjust hour but I cant send any number to microcontroller. what is the problem? from my computer or scanf function in program (I use std periph libs and rtc example) or...?
RTC not yet configured.... RTC configured.... ==============Time Settings===================================== Please Set Hours Please enter valid number between 0 and 9 Please enter valid number between 0 and 9 Please enter valid number between 0 and 92015-12-29 06:14 AM
Hi ghasemi.naser,
Regarding the RTC issue: Clive is speaking about RTC clock source, not system one.As stated in the RM0008, the RTC clock source can be either the HSE/128, LSE or LSI.In the code you are using, it seems you selected LSE. So you should have this oscillator in your hardware.We don't know the example you are using neither the application you want, so it is difficult to help you with second issue.Please provide us more details.-Mayla-To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2015-12-30 03:24 AM
thanks mayla
I used LSI and left that problem but now problem is blew function. the program stops at this line and dosent continue. RTC_WaitForSynchro(); definition : void RTC_WaitForSynchro(void) { /* Clear RSF flag */ RTC->CRL &= (uint16_t)~RTC_FLAG_RSF; /* Loop until RSF flag is set */ while ((RTC->CRL & RTC_FLAG_RSF) == (uint16_t)RESET) { } }2015-12-30 07:04 AM
Ok, it's very difficult to try and remotely troubleshoot when all you show is a couple of lines that fail. They probably fail because of things you did, or didn't, do earlier in your code.
Frame your question with specific details about the board you are using and it's design. If it is a custom design provide a schematic, if it is one you bought provide a link to the website or documentation. Break your problem into a small program that demonstrates the issue clearly, provide all of it. Make sure you have enabled and unlocked the RTC/PWR/BKP unit. Review example code in the Standard Peripheral Library.2015-12-31 01:23 AM
thanks
this is my header board schematic.