stm32f4xx_hal_driver icon indicating copy to clipboard operation
stm32f4xx_hal_driver copied to clipboard

Going beyond the address space of external QUAD SPI FLASH memory.

Open SimonTechv opened this issue 1 year ago • 5 comments

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: image

SimonTechv avatar Feb 18 '24 14:02 SimonTechv

See also STM32CubeH7#176

ALABSTM avatar Feb 20 '24 13:02 ALABSTM

ST Internal Reference: 174336

KRASTM avatar Feb 22 '24 10:02 KRASTM

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,

KRASTM avatar Sep 09 '24 10:09 KRASTM