Merge pull request #580 from pu-cc/fix-spiflash-qen
spiFlash: mask RDSR_WIP instead of RDSR_WEL while waiting for completion
This commit is contained in:
commit
26849d089b
|
|
@ -970,7 +970,7 @@ bool SPIFlash::set_quad_bit(bool set_quad)
|
||||||
_spi->spi_put(reg_wr, (uint8_t *)®_val, NULL, nb_wr_byte);
|
_spi->spi_put(reg_wr, (uint8_t *)®_val, NULL, nb_wr_byte);
|
||||||
|
|
||||||
/* Wait for completion */
|
/* Wait for completion */
|
||||||
if (_spi->spi_wait(FLASH_RDSR, FLASH_RDSR_WEL, 0x00, 10000) != 0) {
|
if (_spi->spi_wait(FLASH_RDSR, FLASH_RDSR_WIP, 0x00, 10000) != 0) {
|
||||||
printError("SPIFlash Error: failed to disable write");
|
printError("SPIFlash Error: failed to disable write");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue