Stm8l mcu RTC calibration problem using RTC_SmoothCalibConfig()

65 views Asked by At

stm8l151k4 mcu

rtc external crystal works stably but returns error when I want to write calibration value.

"RTC_SmoothCalibConfig(RTC_SmoothCalibPeriod_32sec, RTC_SmoothCalibPlusPulses_Reset,50);"

When I looked at the bit causing the error, I saw that the RECALPF bit did not return to 0 in any way

also I am using iar stm8 compiler it does not show RTC_CALRH and RTC_CALRL registers in debug mode.

Note reference manual "This register cannot be written when RTC_ISR1/RECALPF is set to 1 (see: Instant recalibration."

RTC_SmoothCalibConfig(RTC_SmoothCalibPeriod_32sec, RTC_SmoothCalibPlusPulses_Reset,50);
0

There are 0 answers