File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -294,19 +294,30 @@ impl Flasher {
294
294
// Loop over all available SPI parameters until we find one that successfully
295
295
// reads the flash size.
296
296
for spi_params in TRY_SPI_PARAMS . iter ( ) . copied ( ) {
297
+ debug ! ( "Attempting flash enable with: {:?}" , spi_params) ;
298
+
299
+ // Send `SpiAttach` to enable flash, in some instances this command
300
+ // may fail while the flash connection succeeds
297
301
if let Err ( _e) = self . enable_flash ( spi_params) {
298
- continue ;
302
+ debug ! ( "Flash enable failed" ) ;
299
303
}
304
+
300
305
if let Some ( flash_size) = self . flash_detect ( ) ? {
306
+ debug ! ( "Flash detect OK!" ) ;
307
+
301
308
// Flash detection was successful, so save the flash size and SPI parameters and
302
309
// return.
303
310
self . flash_size = flash_size;
304
311
self . spi_params = spi_params;
305
312
306
313
return Ok ( ( ) ) ;
307
314
}
315
+
316
+ debug ! ( "Flash detect failed" ) ;
308
317
}
309
318
319
+ debug ! ( "SPI flash autodetection failed" ) ;
320
+
310
321
// None of the SPI parameters were successful.
311
322
Err ( Error :: FlashConnect )
312
323
}
You can’t perform that action at this time.
0 commit comments