AnsweredAssumed Answered

[STM32L4] [Discovery Kit] RTC Re-Calibration on-the-fly and Smooth digital Calibration configuration

Question asked by bhayani.sunny on May 18, 2016
Latest reply on Mar 7, 2018 by waclawek.jan
Hi,

I am using the STM32L4 Discovery Kit and I wanted to enable the RTC Re-Calibration / Smooth digital Calibration configuration. The board RTC is using the on board LSE  Oscillator having 32.768 kHz clock

I found out from the Reference Manual about this and also there is a API HAL_RTCEx_SetSmoothCalib() by which we can enable the RTC Calibration.

But I am a bit confused about its usage.

I have calling the API with the below parameters:
          HAL_RTCEx_SetSmoothCalib(&RtcHandle, 
                                                           RTC_SMOOTHCALIB_PERIOD_8SEC, 
                                            RTC_SMOOTHCALIB_PLUSPULSES_SET, 
                                                        1);

but I am not sure how does the CALM and CALP work. I saw the formula in the Reference Manual, but still I am not clear about what does the Masking of the Clock Pulses mean when configuring the CALM as a non-zero value.

Thanks,
Sunny

Outcomes