stm32f4xx_hal_driver
stm32f4xx_hal_driver copied to clipboard
Going beyond the address space of external QUAD SPI FLASH memory.
I ran into a problem when reading data through QUAD SPI.
I use discovery board MB1209D with STM32F412ZGT6U and 128 MBIT QUAD SPI flash NOR memory N25Q128 (Micron).
When I read the last block (subsector part of 512 bytes) of data by address 0xfffe00 from memory via DMA, I get a transmission error. I found out that this is due to the receiving amount of data and going beyond the address space in memory.
In this line 16 bytes more are read than is necessary to bypass the restriction, however, this leads to going beyond the address space of QSPI FLASH memory. Accordingly, the SPI peripheral generates a TRANSFER ERROR interrupt.
QSPI peripheral state after TE interrupt is occured:
See also STM32CubeH7#176
ST Internal Reference: 174336
Hello @SimonTechv,
Regarding your issue, I think there is a mistake.
According to your screenshot, the value of the DLR is 0x20f, in decimal it's 527 Bytes and you want to read the last 512 bytes of data from address 0xfffe00. Based on the datasheet of the flash memory, and from the address 0xfffe00 you have only 512 Bytes.
So, it's normal to get an error when receiving data from an address that surpasses the memory address space
With regards,