Closed HamidSaffari closed 2 years ago
The stm32F1 has a different prescaler setting from other stm32 devices. It is purely asynchronous 8+16 bit factor, hold on a 32bit value. Setting the prescaler is writing the (write-only) PRL registers Reading the prescaler (on the Read-only reg DIV).
That's why (I guess) new API is proposed for stm32F1 serie using a single 32bit factor.
Another proposal is to keep the existing STM32RTC::setPrediv and STM32RTC::getPrediv giving a 32bit value (as the 1st param and ignoring the second) in case of stm32F1
Thanks @HamidSaffari for your contribution and sorry for the delay to handle this PR. I close this PR as it is superseded by #56.
Added
getPrescaler(uint32_t *prescaler);
andsetPrescaler(uint32_t prescaler);
for calibrating STM32F1xx during runtime.