• R/O
  • SSH
  • HTTPS

chibios: Commit


Commit MetaInfo

Revision13855 (tree)
Time2020-09-12 17:08:24
Authorgdisirio

Log Message

Fixed bug #1122.

Change Summary

Incremental Difference

--- branches/stable_20.3.x/os/hal/ports/STM32/LLD/xWDGv1/hal_wdg_lld.c (revision 13854)
+++ branches/stable_20.3.x/os/hal/ports/STM32/LLD/xWDGv1/hal_wdg_lld.c (revision 13855)
@@ -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_20.3.x/readme.txt (revision 13854)
+++ branches/stable_20.3.x/readme.txt (revision 13855)
@@ -74,7 +74,8 @@
7474 *****************************************************************************
7575
7676 *** 20.3.3 ***
77-- FIX: Ignored HSIDIV setting on STM32G0xx (bug #1121)
77+- FIX: Fixed incorrect STM32 iWDG initialization in windowed mode (bug #1122).
78+- FIX: Fixed ignored HSIDIV setting on STM32G0xx (bug #1121)
7879
7980 *** 20.3.2 ***
8081 - NEW: Support for 3 analog watchdogs in ADCv3 (STM32F3, L4, L4+, G4).
Show on old repository browser