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:
Gwenhael Goavec-Merou 2025-09-03 14:37:16 +02:00 committed by GitHub
commit 26849d089b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -970,7 +970,7 @@ bool SPIFlash::set_quad_bit(bool set_quad)
_spi->spi_put(reg_wr, (uint8_t *)&reg_val, NULL, nb_wr_byte);
/* 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");
return false;
}