cancel
Showing results for 
Search instead for 
Did you mean: 

[STM32H750BX DK][QSPI] Issue with MT25QL512 Flash Driver

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

8 REPLIES 8

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

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.

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

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

Hello,

I'm facing same problem, can you tell me if you've found a solution?

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

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. 0693W00000HrVULQA3.pngIf 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