[HAL][RTC] In HAL_RTC_Init(), use WRITE_REG() instead of MODIFY_REG() to handle PRLL and PRLH write-only registers
diff --git a/Src/stm32f1xx_hal_rtc.c b/Src/stm32f1xx_hal_rtc.c
index ca6e6ff..031c941 100644
--- a/Src/stm32f1xx_hal_rtc.c
+++ b/Src/stm32f1xx_hal_rtc.c
@@ -378,8 +378,8 @@
     }
 
     /* Configure the RTC_PRLH / RTC_PRLL */
-    MODIFY_REG(hrtc->Instance->PRLH, RTC_PRLH_PRL, (prescaler >> 16U));
-    MODIFY_REG(hrtc->Instance->PRLL, RTC_PRLL_PRL, (prescaler & RTC_PRLL_PRL));
+    WRITE_REG(hrtc->Instance->PRLH, ((prescaler >> 16U) & RTC_PRLH_PRL));
+    WRITE_REG(hrtc->Instance->PRLL, (prescaler & RTC_PRLL_PRL));
 
     /* Wait for synchro */
     if (RTC_ExitInitMode(hrtc) != HAL_OK)