stm32/qspi: Workaround for SR set immediately after setting AR.
See issue #5441. This issue is now reproducible on the Arduino Portenta H747, QSPI flash PN MX25L12833F.
This commit is contained in:
parent
5974ac256b
commit
32914c53ef
@ -354,6 +354,14 @@ STATIC void qspi_read_cmd_qaddr_qdata(void *self_in, uint8_t cmd, uint32_t addr,
|
||||
QUADSPI->ABR = 0; // alternate byte: disable continuous read mode
|
||||
QUADSPI->AR = addr; // address to read from
|
||||
|
||||
#if defined(STM32H7)
|
||||
// Workaround for SR getting set immediately after setting the address.
|
||||
if (QUADSPI->SR & 0x01) {
|
||||
QUADSPI->FCR |= QUADSPI_FCR_CTEF;
|
||||
QUADSPI->AR = addr; // address to read from
|
||||
}
|
||||
#endif
|
||||
|
||||
// Read in the data 4 bytes at a time if dest is aligned
|
||||
if (((uintptr_t)dest & 3) == 0) {
|
||||
while (len >= 4) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user