2019-04-03 06:46 AM
I try to get the QSPI flash memory on STM32F769i-discovery running.
so far it works, however I have an address shift on one byte.
e.g. I can erase the first sector, write e.g. the string "test" to address 4.
when I read it back, I find the string "test" at address 3 ?
Writing to different addresses always results in reading back at (writeaddress-1).
serflash hexdump: address: 0x0000 size:16
0x00000000: ff ff ff 74 65 73 74 ff ff ff ff ff ff ff ff ff ...test.........
I modified the "STM32F769I_EVAL/Examples/QSPI/QSPI_ReadWrite_IT" example to run on an stm32f769idiscovery board,
it also fails, when comparing aTxBuffer with aRxBuffer,
i can also see here the address shift (first blank character missing).
Name : aTxBuffer
Details:" ****QSPI communication based on IT**** ****QSPI communi ....
Name : aRxBuffer
Details:"****QSPI communication based on IT**** ****QSPI communi
what can be the problem ?
2019-04-03 02:40 PM
The MX25L51245G on the disco board uses 3- or 4-byte addresses depending on mode and/or command. So, if it is 3-byte-mode or 3-byte command is used and you send 4 address bytes when reading, there will be a one byte shift.
If it's the other way round there will be a byte shift, too, but probably not by exactly one.
Or there is a similar problem during programming.
Hence; I'd recommend to use only the special 4-byte read/write instructions 0x13/0xEC/0x12 commands and program the QSPI interface to 4-byte address mode. Or before any operation, always send the enter-4-byte-mode command.
Another possibility would be that you use one of the fast read modes and the number of dummy cycles of the chip and QSPI interface do not coincide.
2019-04-04 03:13 AM
Thanks for the answer,
I already used an N25Q128 with STM32L4 and thought the MX25L512 would be compatible.
The example I used seems not to be up to date (or the N25Q512A on the eval board is not compatible with MX25L512 on the discovery).
I now tested the driver stm32f769i_discovery_qspi.c from the BSP and this seems to work ok.
2019-04-04 03:26 AM
The N25Q128 has only 16 MBytes, hence it needs only 3-byte addresses. The MX25L512 has 64 MBytes, so 4-bytes addresses are necessary (unless 'paging' for the topmost 2 address bits is used, but that's cumbersome). So no way to avoid 4-byte addresses ...