Skip to content

Commit 7f203d5

Browse files
committed
Return status immidiatelly when NAND operation error occur
1 parent adad46f commit 7f203d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

firmware/fsmc_nand.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ uint32_t nand_get_status(void)
347347
status = nand_read_status();
348348

349349
/* Wait for a NAND operation to complete or a TIMEOUT to occur */
350-
while ((status != NAND_READY) && (timeout != 0x00))
350+
while (status == NAND_BUSY && timeout)
351351
{
352352
status = nand_read_status();
353353
timeout --;

0 commit comments

Comments
 (0)