Commit a18d00f
committed
projects: max78000: reset ADIS robustly on boot
The ADIS keeps power across an MCU reset/reflash, so the coprocessor
routinely starts against a chip left in whatever state the previous
run (or a mid-frame debugger halt) left it in. A single blind software
reset does not reliably recover a wedged part -- if the ADIS SPI bit
counter was left mid-word, the reset write lands byte-misaligned and is
ignored, leaving DATA_CNTR stuck at 0xFFFF with zero data until a hard
power cycle.
Re-frame the SPI word boundary with CS-framed dummy reads, issue the
reset, then verify the part is actually sampling (DATA_CNTR readable,
not 0xFFFF, and advancing). Retry a bounded number of times before
failing to the ARM as any other init error.
Assisted-by: Claude Opus 4.8
Signed-off-by: Victor Pascu <victor.pascu@analog.com>1 parent 3c14fe7 commit a18d00f
1 file changed
Lines changed: 59 additions & 3 deletions
Lines changed: 59 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
168 | 212 | | |
169 | 213 | | |
170 | 214 | | |
171 | 215 | | |
172 | | - | |
| 216 | + | |
| 217 | + | |
173 | 218 | | |
174 | 219 | | |
175 | 220 | | |
| |||
191 | 236 | | |
192 | 237 | | |
193 | 238 | | |
194 | | - | |
195 | | - | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
196 | 252 | | |
197 | 253 | | |
198 | 254 | | |
| |||
0 commit comments