USBH: testhal MSD: abort read on error

This commit is contained in:
Diego Ismirlian 2017-07-31 10:27:30 -03:00
parent 91fd21695b
commit 06dc7fbb1e
1 changed files with 2 additions and 1 deletions

View File

@ -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();