2024-08-30 03:09 AM
Hi,
I am using Clives loader for the STM32H with the correct pins etc but it never works in the STM IDE, so I thought I would follow controllertechs videos to try and make my own loader, that didn't work either, but I did verify all the QSPI parts reading/wriitng etc are working. I also learned a good test using the CubeMX Programmer (and that fails using my loader for a different reason) but, I then thought OK will test it with Clives and MX Prog, and that fails on verification when I try and load a 1MB test file. I have emailed Clive and he has been incredibly helpful already, but thought I would also ask in the community in case someone has a quick solution?
Solved! Go to Solution.
2024-08-30 05:22 AM - edited 2024-08-30 06:29 AM
Solved it. USed this video. Mem protection was the ssue (the part when the generator says to enable Mem Protect say NO!
https://www.youtube.com/watch?v=vo92RHKxYA4&list=PLfIJKC1ud8gjUw1ExWVbeLsozbdOOigQx&index=9
Attached is my loader for STM32H743 using PF6,7,8,9 and PPB2/6 for W25Q256! Hopefully helpful to someone! (change the ext back to stdlr!)
2024-08-30 03:45 AM
Didn't understand how are you using the external loader with STM32CubeProgrammer.
But first you need a working loader where you are sure all is fine and compatible with your memory and your board (mainly the GPIOs).
To use an external loader with STM32CubeProgrammer please refer to this tread.
Also, this article may help you.
Hope I answered your question.
2024-08-30 03:49 AM
Hi SofLit - Under CubeProg lower left you can select the loader, then in file writing I set the start address to 0x90000000 - as per the video on ControllerTech
https://youtu.be/WJIzwxiXmOM?list=PLfIJKC1ud8gjUw1ExWVbeLsozbdOOigQx&t=466
Am I missing somethng?
2024-08-30 03:54 AM
We don't take "controller take" as reference. We have our articles and knowledge base. You can follow the article I provided. May be starting from "Add the created external loader to STM32CubeProgrammer"
2024-08-30 03:58 AM
Hi, yes that is what did, and using Clives loader, verification fails.
2024-08-30 03:59 AM
Here is the CubeMX Prog output when loading the test file from the STM QSPI repo ( a 1mb file)
11:58:48 : Reset mode : Software reset
11:58:48 : Device ID : 0x450
11:58:48 : Revision ID : Rev V
11:58:48 : Debug in Low Power mode is not supported for this device.
11:58:48 : UPLOADING OPTION BYTES DATA ...
11:58:48 : Bank : 0x00
11:58:48 : Address : 0x5200201c
11:58:48 : Size : 308 Bytes
11:58:48 : UPLOADING ...
11:58:48 : Size : 1024 Bytes
11:58:48 : Address : 0x8000000
11:58:48 : Read progress:
11:58:48 : Data read successfully
11:58:48 : Time elapsed during the read operation is: 00:00:00.008
11:58:54 : Memory Programming ...
11:58:54 : Opening and parsing file: testbinary1M.bin
11:58:54 : File : testbinary1M.bin
11:58:54 : Size : 1.13 MB
11:58:54 : Address : 0x90000000
11:58:54 : Erasing memory corresponding to segment 0:
11:58:54 : Erasing external memory sectors [0 18]
11:58:54 : Download in Progress:
11:59:01 : File download complete
11:59:01 : Time elapsed during download operation: 00:00:07.901
11:59:01 : Verifying ...
11:59:01 : Read progress:
11:59:12 : Error: Data mismatch found at address 0x90000004 (byte = 0x00 instead of 0x11)
11:59:12 : Error: Download verification failed
11:59:18 : UPLOADING ...
11:59:18 : Size : 1024 Bytes
11:59:18 : Address : 0x90000000
11:59:18 : Read progress:
11:59:18 : Data read successfully
11:59:18 : Time elapsed during the read operation is: 00:00:00.079
2024-08-30 04:02 AM - edited 2024-08-30 04:11 AM
Also, you can see the test binary contents:
And the readback:
So verification is rightly failing becuase the writing oft he data is not happening for some reason?
I can load/debug and operate QSPI directly from sourcecode in the main IDE so we know HW is working properly.
The Hardware n use is an STM32H743IITX coupled to a W25Q256JVEIQ via PTB6/2 and PFF6/7/8/9
Is it possible you can create a loader I can test with STMCubeProg please? That linked article is hard to understand
2024-08-30 05:10 AM
Hello @mtechmatt and welcome to the community :),
Are you watching this MOOC - External QSPI loader how to - YouTube?
Could you please refer to this MOOC and follow the steps. I think these videos can help you to create an external QSPI loader.
I hope this help you!
Thank you.
Kaouthar
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-08-30 05:22 AM - edited 2024-08-30 06:29 AM
Solved it. USed this video. Mem protection was the ssue (the part when the generator says to enable Mem Protect say NO!
https://www.youtube.com/watch?v=vo92RHKxYA4&list=PLfIJKC1ud8gjUw1ExWVbeLsozbdOOigQx&index=9
Attached is my loader for STM32H743 using PF6,7,8,9 and PPB2/6 for W25Q256! Hopefully helpful to someone! (change the ext back to stdlr!)
2024-08-30 05:23 AM
Comment here if you need the file, I cant attach.