2017-01-25 06:54 AM
Hello,
while rm0008 Rev. 16 18.4.3 says:
Note: If the input clock frequency (fRTCCLK) is 32.768 kHz, write 7FFFh in this register to get a
signal period of 1 second.STM32Cube_FW_F1_V1.4.0/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rtc.c writes
WRITE_REG(hrtc->Instance->PRLL, 0x00008000);
What document is right?
Solved! Go to Solution.
2017-01-26 01:46 AM
Hi,
The RTC PRLL register has a reset value equal to 0x8000 and the Hal RTC DeInit function is used to reset the RTC peripheral registers to their default values (restores the peripheral default state, frees the low-level resources and removes any direct dependency with the hardware).
-Nesrine-
2017-01-26 01:00 AM
Hello
I have moved your thread to the
‌ where someone should be able to assist you.Thanks
Oli
2017-01-26 01:40 AM
The ref manual also says, fTR_CLK = fRTCCLK/(PRL+1)
so it's clear that 0x7FFF is the correct value and HAL is wrong.
2017-01-26 01:46 AM
Hi,
The RTC PRLL register has a reset value equal to 0x8000 and the Hal RTC DeInit function is used to reset the RTC peripheral registers to their default values (restores the peripheral default state, frees the low-level resources and removes any direct dependency with the hardware).
-Nesrine-