Skip to content

Commit 32914c5

Browse files
iabdalkaderdpgeorge
authored andcommitted
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.
1 parent 5974ac2 commit 32914c5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ports/stm32/qspi.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,14 @@ STATIC void qspi_read_cmd_qaddr_qdata(void *self_in, uint8_t cmd, uint32_t addr,
354354
QUADSPI->ABR = 0; // alternate byte: disable continuous read mode
355355
QUADSPI->AR = addr; // address to read from
356356

357+
#if defined(STM32H7)
358+
// Workaround for SR getting set immediately after setting the address.
359+
if (QUADSPI->SR & 0x01) {
360+
QUADSPI->FCR |= QUADSPI_FCR_CTEF;
361+
QUADSPI->AR = addr; // address to read from
362+
}
363+
#endif
364+
357365
// Read in the data 4 bytes at a time if dest is aligned
358366
if (((uintptr_t)dest & 3) == 0) {
359367
while (len >= 4) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy