HAL_RTC_SetTime Timeout
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2015-06-22 2:33 AM
Posted on June 22, 2015 at 11:33
Hello,
HAL_RTC_SetTime
fails when trying to set new values on the RTC due toRTC_EnterInitMode
timeout.while((hrtc->Instance->ISR & RTC_ISR_INITF) == (uint32_t)RESET)
{ if((HAL_GetTick() - tickstart) > RTC_TIMEOUT_VALUE) { return HAL_TIMEOUT; } }During init (MX_RTC_Init
)HAL_RTC_SetTime
is successful.STM32L151RDCubeMX 4.8.0L1 Library 1.2.0LCI RC @ 37kHz configured bySystemClock_Config()
Any clues?Thanks!George
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2015-06-22 5:16 AM
Posted on June 22, 2015 at 14:16
After some time I figured out that the the RTC Backup domain must be unlocked.
HAL_PWR_EnableBkUpAccess
must be called before calling any RTC set functions.