AnsweredAssumed Answered

QSPI prefix bytes when reading data

Question asked by Lukasz Przenioslo on Mar 15, 2018

Hello there,

Using the BSP example code I have composed a function for reading data from an external QSPI flash memory. Here it is: [C] /** * @brief Reads the data starting from \ref address and saves it under \ref - 

I am facing a peculiar problem at the moment. When I read the data, i notice that it is not saved right at the start of the buffer, but it is shifted by 2 bytes (0x88 both). For for example, i under address 0x00 I have previously saved values 01 02 03 04, the data I read will be equal to: 88 88 01 02 03 04 (saved under provided buffer). This works this way both for regular and DMA reading. At the moment I have made a workaround in the code to ignore this offset, but because of that I need to copy bytes, which is not optimal. I cannot drive from what operation are those bytes comming from. I have a feeling that it has to do something with the Alternate byte mode, but I am not sure how. I was also not able to find why are the alternate bytes set this way in the example and what does it do.


here is the original BSP example code:

[C] qspi.c - 

[C] qspi.h - 

I would appreciate all help.