cancel
Showing results for 
Search instead for 
Did you mean: 

Algorithm for loading into external memory MT25QL512A & STM32H7

Denys_T
Associate III

Hi, I'm trying to write an algorithm to load into external memory in QSPI_Dual_mode MT25QL512A for KEIL. I followed this instruction. The algorithm works BUT! when the firmware exceeds 90040001H an error occurs during verification. Smaller programs are  flashed and work fine.

Project algorithm  

Programming External Flash with STM32 Devices 

 

Error.png

5 REPLIES 5

So failing 256 KB in

Either issue with Erasure, or content written incorrectly, or into the wrong location.

You can instrument the algorithm to output diagnostic info via a serial port

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

If you set “erase full chip” then the error disappears, apparently the problem is in erasing the sector, as I understand it, the algorithm erases only the first 2 sectors.MEM_MAP.png

this is a good idea, otherwise I couldn’t understand how to debug this code =))

Not seeing anything egregious in there, perhaps a couple of things I'd approach differently.

BSP_QSPI_GetStatus() only checks one IC. Needs to read 2 bytes and check both

The erase block size will be 128KB, page write size is 512B for DUAL

Not immediately failing, so not an errant load (Winbond / Macronix) setting Block Protection bits.

MT25TL01G / DUAL MT25QL512A

PB2:AF9 CLK
PG6:AF10 NCS

PD11:AF9 BK1_IO0
PF9:AF10 BK1_IO1
PF7:AF9 BK1_IO2
PF6:AF9 BK1_IO3

PH2:AF9 BK2_IO0
PH3:AF9 BK2_IO1
PG9:AF9 BK2_IO2
PG14:AF9 BK2_IO3

Not spent a lot of time on these as ST provides programmer for these parts as they use them. Will check the build system when I get home as I have other FLM / STLDR projects.

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

https://github.com/cturvey/stm32extldr/blob/main/h7_mt25tl01g/README.md

CUSTOM24 PB2, PG6, PD11, PF9, PF7, PF6, PH2, PH3, PG9, PG14 (KEIL/FLM)

https://github.com/cturvey/stm32extldr/blob/main/h7_mt25ql512a/MT25QL512A_STM32H7XX-CUSTOM24.FLM

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