Skip to content

Commit 26849d0

Browse files
authored
Merge pull request #580 from pu-cc/fix-spiflash-qen
spiFlash: mask RDSR_WIP instead of RDSR_WEL while waiting for completion
2 parents bdcdea9 + db64ec9 commit 26849d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/spiFlash.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,7 @@ bool SPIFlash::set_quad_bit(bool set_quad)
970970
_spi->spi_put(reg_wr, (uint8_t *)&reg_val, NULL, nb_wr_byte);
971971

972972
/* Wait for completion */
973-
if (_spi->spi_wait(FLASH_RDSR, FLASH_RDSR_WEL, 0x00, 10000) != 0) {
973+
if (_spi->spi_wait(FLASH_RDSR, FLASH_RDSR_WIP, 0x00, 10000) != 0) {
974974
printError("SPIFlash Error: failed to disable write");
975975
return false;
976976
}

0 commit comments

Comments
 (0)