cancel
Showing results for 
Search instead for 
Did you mean: 

Corrupt data while reading using quadspi

phenom
Associate II

Hi,

I am working on stm32f779 eval kit.

I am using quad spi.

Following sequence works fine:

Sequence 1:

Erase any sector-> write value to particular sector -> read values from correct sector.

Not working sequence ->

Sequence 2:

Erase a sector -> read values of that sector -> write values to that sector-> read values from that sector. Here at last read from sector shows unwanted value(e.g. 0x80) at 5th byte(start from 0).

Why I am seeing 0x80 at 5th byte?

For read, I am using HAL function HAL_QSPI_Receive();

If I use sequence 1 , I can not observe any unwanted values at 5th byte. But if I use sequence 2, I am observing unwanted value.

Issue always occurs If I read values before writing and then again reading same sector and same area size.

One more thing I want to add that while debugging,

 __IO uint32_t *data_reg = &hqspi->Instance->DR;

Value of data register is showing 0x80 at 5th byte.

Can any one please suggest me why it's happening?

I have also tested the example code and observed same behavior.

2 REPLIES 2

Make sure the erase completes properly. If there are two interleaved memories, make sure BOTH actually complete.

Make sure there F7 isn't caching content on the QSPI, if you erase make sure to manage concurrency issues.

Can't say I've validated the F779-EVAL implementation/examples, might be some underlying issues there.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
phenom
Associate II

Hi All,

I have also tried read/ write in DMA mode also.

Still getting unawanted data i.e. 0x99 at fixed 5 bytes offset.