• R/O
  • SSH
  • HTTPS

chibios: Commit


Commit MetaInfo

Revision13856 (tree)
Time2020-09-12 17:08:29
Authorgdisirio

Log Message

Fixed bug #1122.

Change Summary

Incremental Difference

--- branches/stable_19.1.x/os/hal/ports/STM32/LLD/xWDGv1/hal_wdg_lld.c (revision 13855)
+++ branches/stable_19.1.x/os/hal/ports/STM32/LLD/xWDGv1/hal_wdg_lld.c (revision 13856)
@@ -85,7 +85,6 @@
8585 */
8686 void wdg_lld_start(WDGDriver *wdgp) {
8787
88-#if STM32_IWDG_IS_WINDOWED
8988 /* Enable IWDG and unlock for write.*/
9089 wdgp->wdg->KR = KR_KEY_ENABLE;
9190 wdgp->wdg->KR = KR_KEY_WRITE;
@@ -93,24 +92,16 @@
9392 /* Write configuration.*/
9493 wdgp->wdg->PR = wdgp->config->pr;
9594 wdgp->wdg->RLR = wdgp->config->rlr;
95+
96+ /* Wait the registers to be updated.*/
9697 while (wdgp->wdg->SR != 0)
9798 ;
9899
100+#if STM32_IWDG_IS_WINDOWED
99101 /* This also triggers a refresh.*/
100102 wdgp->wdg->WINR = wdgp->config->winr;
101103 #else
102- /* Unlock IWDG.*/
103- wdgp->wdg->KR = KR_KEY_WRITE;
104-
105- /* Write configuration.*/
106- while (wdgp->wdg->SR != 0)
107- ;
108- wdgp->wdg->PR = wdgp->config->pr;
109- wdgp->wdg->RLR = wdgp->config->rlr;
110-
111- /* Start operations.*/
112104 wdgp->wdg->KR = KR_KEY_RELOAD;
113- wdgp->wdg->KR = KR_KEY_ENABLE;
114105 #endif
115106 }
116107
--- branches/stable_19.1.x/readme.txt (revision 13855)
+++ branches/stable_19.1.x/readme.txt (revision 13856)
@@ -74,6 +74,7 @@
7474 *****************************************************************************
7575
7676 *** 19.1.5 ***
77+- FIX: Fixed incorrect STM32 iWDG initialization in windowed mode (bug #1122).
7778 - FIX: Fixed ADCv1 compile problem (bug #1118).
7879 - FIX: Fixed missing STM32_I2C_BDMA_REQUIRED definition in I2Cv3 driver
7980 (bug #1109).
Show on old repository browser