2016-05-11 03:43 AM
I am using Internal RTC of STM32F411RCT6. It's working Perfectly but I cant update it when Power is off. I want to say that i have connected 3 v DC supply with VBAT pin and Run my RTC program, it works good but when i turn off the Power then RTC is not Updating. If i check after some minutes, it starts from where we left it before. I have checked my program. It does not set the time every time we run the program. It just Get the time. Any Help?
Thank you... #stm32f4-rtc #stm32f4xx #internal-rtc2016-05-12 10:36 AM
One more Query that If i use NVIC priority for USART1 and USART6 then why its not working? I want to say that if i Use IRQ handler for both USARTS 1 and 6 , then its not showing USART6 received data to USART1. If i disable the USART1 IRQ handler then it will show the USART6 received data to USART1 .
Yeah, I'm not entirely sure what you have going on there. I'll observe that the USART's RX buffer is only one byte deep, and you don't check the TXE status of USART1 before stuffing data out. Also you don't need to explicitly clear RXNE, reading the USART->DR achieves that.2016-05-12 10:12 PM
Hey clive1, I appreciate your answer. its helping me alot. now I am confused that if i uncommemt that USART1_IRQHandler() then its not working. So i have to check USART1 RXNE bit in USART6_IRQHandler()?
2016-05-13 05:45 AM
Hello Guys, I am using LSE mode configuration here but its not set the time and not updating. I have connected external oscillator at PC14 and PC15 pin of STM32F411RCT6. Any help?
I am mentioning my code for LSE modevoid
RTC_Initialize(
void
)
{
RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR, ENABLE);
/* Allow access to BKP Domain */
PWR_BackupAccessCmd(ENABLE);
status = RTC_ReadBackupRegister(RTC_BKP_DR19);
/* Reset RTC Backup Domain */
/* LSE Enable */
RCC_LSEConfig(RCC_LSE_ON);
/* Wait until LSE is ready */
while
(RCC_GetFlagStatus(RCC_FLAG_LSERDY) == RESET);
/* RTC Clock Source Selection */
RCC_RTCCLKConfig(RCC_RTCCLKSource_LSE);
/* Enable the RTC */
RCC_RTCCLKCmd(ENABLE);
RTC_WriteProtectionCmd(DISABLE);
/* Wait for RTC APB registers synchronisation (needed after start-up from Reset) */
RTC_WaitForSynchro();
/* Enable write protection */
RTC_WriteProtectionCmd(ENABLE);
/* Write status */
RTC_WriteBackupRegister(RTC_BKP_DR19, 0x1234);
RTC_ClearITPendingBit(RTC_IT_WUT);
}
2016-05-13 10:30 PM
Hey clive1, I have connected 32k oscillator at PC 14 and PC 15. I want to know that still I need extra oscillator for LSE mode work?
2016-05-14 06:55 AM
The specifications for the oscillator and capacitors are important. There is an app note about how to select the values. One important consideration is the use of 6-7pF crystals not the 9 of 12pF type.
If the the oscillator is not starting when you enable the LSE, you will need to review the components and circuit. You don't specify a board, or provide a circuit diagram, so providing suggestions about what might be wrong is a bit challenging.