I used MT25QL128 flash memory in my project. This product was obsolute then, I decided to use AT12SF128 flash memory instead of MT25QL128 . Now, I use STM32 Cube Programmer and can not write external memory . Program give "memory edition verification error".
I wrote ".stldr" file for MT25QL128. Pins are quadspi IO pins for my own microcontroller(STM32F746). I arranged gpio settings for these pins in loader code. It work with MT25QL128 . However, these configurations do not work for AT12SF128. Also, pins are same because pcb board is not changed. I can do chip erase and sector erase but I cant read and write in external memory.
Hm, the AT25S128 seems to use a rather conventional instruction set. As long as the block protection bits in status register remain cleared, loader code for MT25QL128 should work after some simple modifications:
If ID is checked, it has to be adjusted, furthermore 0x9F works only in 1-line mode.
Write Enable only in 1-line mode
Read Status Register only in 1-line mode
If Quad I/O Fast Read 0xEB is used: instruction in 1-line, address and data in 4-line mode, and one extra M byte after address has to set up properly (via one alternate byte, or maybe one extra dummy byte with all pull-ups enabled or all pull-downs enabled)
Quad Page Program 0x32: instruction and address 1-line, data 4-line
no configuration required (i.e. no QE bit, no Enter Quad Mode)
In a sense, the AT25S128 is much simpler than the MT25QL128 as there is no configuration required/possible (no QE bit, no Enter Quad Mode). Since chip erase and sector erase works, all boils down to the *different* 1-line/4-line mix for read/program and the extra M byte for read.
Can one of the parties here please establish the model of STM32 involved, the pins used for QSPI (explicitly state the ones you've used/chosen), and the availability of a debug/diagnostic UART connection (again explicit pins, and clocking source for your design)
Again if the board copies the DISCO or EVAL reference design, these details would also be useful in building a test BSP, and External Loader.
Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Microcontroller is STM32F746IGT , then I use PB2(CLK), PF8(IO0) , PF9(IO1), PF7(IO2), PF6(IO3) , PB6(CS). I used default STM Loader code. I changed this code for these pins. Now, I make chip erase and sector erase. But, I do not read in memory, show in picture. My read command is "0x6B" .
I have progressed on the subject but could not reach the result.
I started to write loader code from the beginning. Now , I send write enable command , WEL bit is setted 1. But, chip does not go into QUAD mode, because I do not write status register 2 . I have to do this before I can read memory.
I changed command arrangements then solve problem. Firstly, I create project file and debug methods. Now, Only I have to create Linker file (.stldr file ) for STM32 cube programmer.
I use same flash memory ( at25sf128) in my project and I can read data from flash correctly, I checked it. However, The images does not have correct view on LCD.