1

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);
Sydney_dev
1,4342 gold badges18 silver badges26 bronze badges
asked Nov 24, 2023 at 21:50
1
  • I've removed one of your weird tags. I've left #stm32, even although it is irrelevant, only because it's probably the only way anyone will see this question. It should be removed if you get an answer though. Commented Nov 24, 2023 at 22:33

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.