Commit c710bad
committed
Nuvoton: M487: Fix reset loop with target.wdt-reset-workaround
We may trap in DPD/SPD wake-up reset loop when multi-level bootloaders
(e.g. LDROM and MCUBoot) and application all or partial integrate this
workaround. To avoid this, the wake-up flag CLK_PMUSTS_TMRWK_Msk is
used to guard from duplicate wake-up reset setups and the clear-up of
this flag is delayed to hal_watchdog_init, which will be invoked via
Mbed Watchdog API.
This approach works based on the assumptions:
1. Only application will set up WDT. LDROM and MCUBoot won't.
2. WDT setup is done via Mbed Watchdog API, not direct WDT control.1 parent c7d1c32 commit c710bad
File tree
2 files changed
+18
-28
lines changed- targets/TARGET_NUVOTON/TARGET_M480
2 files changed
+18
-28
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
115 | | - | |
116 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
117 | 119 | | |
118 | 120 | | |
119 | 121 | | |
| |||
133 | 135 | | |
134 | 136 | | |
135 | 137 | | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
| 138 | + | |
151 | 139 | | |
152 | 140 | | |
153 | 141 | | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | 142 | | |
162 | 143 | | |
163 | 144 | | |
| |||
174 | 155 | | |
175 | 156 | | |
176 | 157 | | |
177 | | - | |
178 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
179 | 162 | | |
180 | 163 | | |
181 | 164 | | |
182 | | - | |
| 165 | + | |
183 | 166 | | |
184 | 167 | | |
185 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
91 | 98 | | |
92 | 99 | | |
93 | 100 | | |
| |||
0 commit comments