2021-10-19 01:43 PM
Hello All,
I am facing an issue with the Driver for MT25QL512 Flash Memory within the STM32H750DK. I followed the MOOC provided by ST and did the same things but it still times out in the CSP_QSPI_Erase_Chip() during the QSPI_AutoPollingMemReady() call. Sometimes it works but nothing is written in the Memory.
Thanks for your help in advance.
Ayoub
2021-10-19 01:51 PM
Depending on the state of the array, and the use/wear a bulk erase can take between 3 and 8 minutes, the timeouts and spin loops need to be accommodating of that.
Also won't work in memory-mapped mode.
2021-10-19 02:15 PM
I was thinking about the same thing so I moved to deal with 1 sector only, but it gives the same result. It is very strange because the other commands work fine but the erase doesn't and once it works (Sporadic Issue), the Readbuffer shows 136 values.
2021-10-19 02:36 PM
136 -> 0x88
The memories are little state machines, doing one thing at a time, until completion.
That is more indicative that the erase is still on going, and the only command that's going to work is reading the status register. Check the datasheet, but there's only going to be a very small subset of commands available whilst busy.
The spin loops polling the status register can't just give up and quit midway through. Check everything has appropriate timeouts specified, perhaps add diagnostics/telemetry to output these things so you have a narrative to follow when it fails.
Reseting the STM32 side QSPI peripheral doesn't typically change what the memory device is doing, most implementation you aren't wiring up an async reset pin to regain control. If the memory off doing an 8-minute task, it's going to keep doing that, and you should keep probing the status, or see if there is a suspend type command/operation.
2021-10-19 02:39 PM
Similarly parts you do reset are apt to revert into default states, which might not be in QPI modes, or with D2/D3 enabled, etc.
A lot of code is set in fixed 1-bit or 4-bit modes, and one needs to be cognizant that both the memory and the MCU have the same idea about the mode each is in.
2021-10-22 03:24 PM
Hello,
I have checked everything, timeouts, registers, preconditions but still doesn't work! what is strange is that I took the same code written by ST developers and shared in one of their MOOCs for the same memory I am using and it doesn't work!
I will keep investigating and update in case it is resolved.
Thanks,
Ayoub
2021-11-05 09:14 AM
Hello,
I'm facing same problem, can you tell me if you've found a solution?
2021-11-05 09:51 AM
Don't assume any of this is well or thoroughly tested..
Me Too / Similar Problem - read the thread, and perhaps provide details about what you've actually tried and tested, in a comprehensive manner, and perhaps we might better understand collectively what the real problem is, and solve that.
I've got a bunch of code that works fine on these and other boards, and with this and other QSPI Flash memory devices.
2022-01-13 01:59 AM
Hello @Andrzej Węglowski,
Sorry for my late response!
I found the solution. You need to configure the QSPI as dual bank as mentioned in the picture. If you check the RM for the STM32H750DK you will find that it has 2 NOR Flashs of MT25QL512 so you need to configure it like that and it worked fine.
Ayoub