diff options
-rw-r--r-- | testhal/STM32/STM32F4xx/USB_HOST/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/testhal/STM32/STM32F4xx/USB_HOST/main.c b/testhal/STM32/STM32F4xx/USB_HOST/main.c index 215b9ec..44210a3 100644 --- a/testhal/STM32/STM32F4xx/USB_HOST/main.c +++ b/testhal/STM32/STM32F4xx/USB_HOST/main.c @@ -374,7 +374,8 @@ start: usbDbgPrintf("BLK: Raw read test (%dMB, %dB blocks)", RAW_READ_SZ_MB, sizeof(fbuff));
st = chVTGetSystemTime();
for (j = 0; j < NITERATIONS; j++) {
- blkRead(&MSBLKD[0], start, fbuff, NBLOCKS);
+ if (blkRead(&MSBLKD[0], start, fbuff, NBLOCKS) != HAL_SUCCESS)
+ goto start;
start += NBLOCKS;
}
et = chVTGetSystemTime();
|