2018-03-15 03:03 AM
Hello there,
Using the BSP example code I have composed a function for reading data from an external QSPI flash memory. Here it is:
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:
I would appreciate all help.
#qspi-flash2018-12-28 02:02 AM
Hi,
have You found any solution to this problem?
Best regards!
2018-12-28 02:03 AM
Hi,
have You found any solution to this problem?
Best regards!
2018-12-28 02:03 AM
Hi,
have You found any solution to this problem?
Best regards!
2018-12-28 02:07 AM
Hello @RKrah
This was a while a go. I think the problem was improper settings of the amount of command/ address/ data bytes for the certain memory chip.
2018-12-28 03:41 AM
Thanks for the hint, it pointed me in right direction. My solution was to increase number of dummy cycles (from 8 to 14) for read command during memory mapped access setup. 6 additional dummy cycles corresponds to 6 8's i was receiving (0x888888) each 32 (length of microcontroller qspi read fifo buffer) bytes read.
Hope that will help somebody someday.