QSPI external loader for STM32H750VBT6
I have a custom PCB using STM32H750VBT6 MCU and QSPI memory chip S25HL512TFAMHI010. I have written an external loader file as per the instructions in the STM32 MOOC [I tried to put a link here but the forum doesn't let me].
Testing the QSPI driver in STM32CubeIDE works fine, but when I try to write to the external memory using the .stldr file in STM32CubeProgrammer (v2.13.0), it returns "Error: failed to download the file". The console output is below:
17:07:43:167 : Memory Programming ...
17:07:43:176 : Opening and parsing file: myFile.bin
17:07:43:176 : File : myFile.bin
17:07:43:176 : Size : 1.60 MB
17:07:43:176 : Address : 0x90000000
17:07:43:177 : Erasing memory corresponding to segment 0:
17:07:43:177 : Memory erase...
17:07:43:178 : halt ap 0 Status = 0
17:07:43:179 : halt ap 1 Status = 32
17:07:43:179 : halt ap 2 Status = 32
17:07:43:355 : Erasing external memory sectors [0 6]
17:07:43:356 : Init flashloader...
17:07:43:356 : halt ap 0
17:07:43:366 : run ap 0
17:07:43:367 : halt ap 0
17:07:43:380 : Loader sector erase...
17:07:43:398 : run ap 0
17:07:49:146 : halt ap 0
17:07:49:151 : Download in Progress:
17:07:49:182 : Size : 1675808 Bytes
17:07:49:182 : Address : 0x90000000
17:07:49:262 : halt ap 0 Status = 0
17:07:49:263 : halt ap 1 Status = 32
17:07:49:263 : halt ap 2 Status = 32
17:07:49:337 : Loader write range...
17:07:49:788 : Init flashloader...
17:07:49:789 : halt ap 0
17:07:49:820 : run ap 0
17:07:49:820 : halt ap 0
17:07:49:821 : run ap 0
17:07:54:885 : halt ap 0 Status = 0
17:07:54:895 : halt ap 1 Status = 32
17:07:54:895 : halt ap 2 Status = 32
17:07:54:895 : Loader write range...
17:07:55:328 : halt ap 0
17:07:55:335 : Error: failed to download Segment[0]
17:07:55:341 : Error: failed to download the File
I have tried the workaround suggested in this post - ["Custom-external-loader-failed-to-download-segment-0" on STM32 website - again I am unable to post a link for some reason] - but this did not help.
I also tried using STM32CubeProgrammer to do a Full Chip Erase of the external memory. This claims to be successful (almost instantly), but in fact the contents of the memory are not erased. Console output below:
17:15:49:069 : MASS ERASE ...
17:15:49:074 : Flash erase...
17:15:49:074 : halt ap 0 Status = 0
17:15:49:074 : halt ap 1 Status = 32
17:15:49:074 : halt ap 2 Status = 32
17:15:49:234 : Init flashloader...
17:15:49:234 : halt ap 0
17:15:49:273 : run ap 0
17:15:49:273 : halt ap 0
17:15:49:273 : Loader mass erase...
17:15:49:275 : run ap 0
17:15:49:347 : halt ap 0
17:15:49:348 : Mass erase successfully achieved
17:15:54:617 : UPLOADING ...
17:15:54:619 : Size : 1024 Bytes
17:15:54:619 : Address : 0x8000000
17:15:54:619 : Read progress:
17:15:54:647 : Data read successfully
17:15:54:648 : Time elapsed during the read operation is: 00:00:00.010
I suspect that "Status = 32" is some sort of error code, but I'm unsure how to debug this further - any suggestions greatly appreciated!
