cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H5xx - CUBE MX 6.13 - Error activating RTC Clock source for Backup register access

werbung
Associate II

Cube MX: After RTC configuration with "activate clock source" and running the Cube generated Code  the RTC wont start.

TheCube MX generated code  is missing to set the RTCAPBEN Bit in the RCC->APB3ENR Register.

I found out that the  "stm32h5xx_hal_rtc.c"  hal  driver  doesnt work correct.:

The driver states:   "Call the function HAL_RCCEx_PeriphCLKConfig with RCC_PERIPHCLK_RTC for
PeriphClockSelection and select RTCClockSelection (LSE, LSI or HSEdiv32)
(+) Enable RTC Clock using the __HAL_RCC_RTC_ENABLE() function."

This is called by the Cube output but this doesnt set the RCC Clock bit for the RTC to "1" . It stays "0"

Workaround:   Set the RTCAPBEN Bit   in   RCC->APB3ENR  manualy.

 

Regards Henry

 

0 REPLIES 0