Skip to main content
APate.18
Associate III
February 9, 2024
Question

Issue with QSPI External Flash Loader Verification Functionality for STM32H745

  • February 9, 2024
  • 4 replies
  • 6513 views

I am writing to address a concern regarding the QSPI External Flash Loader that I have developed, which I have attached below for your reference.

The functionality of reading, writing, and erasing operations with the ".stldr" file in conjunction with other project files is working seamlessly. However, I am encountering an issue when attempting to verify the data during the loading/debugging process.

 

I would greatly appreciate your assistance in resolving this matter. If there are any insights or suggestions you could provide to help rectify this issue, it would be immensely helpful.

Thank you for your attention to this matter. I look forward to your prompt response.

 

4 replies

KDJEM.1
Technical Moderator
February 9, 2024

Hello @APate.18 ,

Which memory device are you using?

Could you please refer to How to implement and use your own external flash loader: An example using STM32U5A9J-DK and check Dev_Inf.c and Loader_Src.c files.  

This FAQ can help to Verify your External Loader using the STM32CubeProgrammer.

Also, I recommend you to take a look to How to create an external QSPI loader MOOC may help you.

I hope this help 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.
APate.18
APate.18Author
Associate III
February 12, 2024

I am Using "Winboard 25Q512JVEQ" foe external memory . 

Please Find Attached Snap shot while i am verify.

1) This Image is related to Verification start process

VerificationStart.png

2) After Verification I am getting error message 

VerificationFaildmessage.png

VerificationFaild02.png

 

4) Verifications failed console message 

Verificatiofailed03.png

 

KDJEM.1
Technical Moderator
February 14, 2024

Hello @APate.18 ,

Could you please verify the device size and the programing page size settings.

Also I advise you to check the Debug configurations as mentioned in UM2609 section 3.1.4.1 Debug using the ST-LINK GDB server section. 

I hope this help 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.
Tesla DeLorean
Guru
February 9, 2024

What exactly is happening with the Verify?

It's supposed to allow for a  quick read-back check for data already in RAM for the purposes of Write to ensure the data was in fact written correctly, and if not, where it failed.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
urbito
Senior II
February 14, 2024

You may check manually through the CubeProgrammer what is in the External Flash.

 

After writting to the external QSPI but failing at validation, you can check through the Cube Programmer. You can check if there is a missaligment or corruption.

I say this because sometimes there can be a missaligment while writting because an unintended offset, for example.

 

Hope this helps.

 

Greetings

Tesla DeLorean
Guru
February 14, 2024

A data shift can be seen if the address width or dummy cycles are in disagreement. Repetitive nibbles would suggest the command is not supported in the current mode.

An illustration of what was written and what's read back would be instructive.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
urbito
Senior II
February 16, 2024

May i ask if you could use to write/read the code you have use with this Loader?

 

If you follow the STM32 video guide, or by your own, when you write the code for an external loader, one think you may do is to test that with the code before generating the EL you can write and read it back. I am asking you this because my guess is, the write operations is happening but not as intended. Thats my guess since your data, for me, has no sence, but maybe i am wrong and it does make sence for you.

 

Greetings

APate.18
APate.18Author
Associate III
February 24, 2024

Hi i have Debug My code with Testing code of  in that i am getting right data but while i have loaded with CubeProgrammer i am getting following debug log and getting verification failed

my loader file memory defination is 

/* Memories definition */
MEMORY
{
RAM_D1 (xrw) : ORIGIN = 0x24000000, LENGTH = 512K
/* Occupies both core's memory banks minus the bootloader and app header size.
Must remain in sync with bootloader_def.h, APPLICATION_PRIMARY_MAX_SIZE__BYTES.
Matched with the Release app just to enforce an expectation on the overall app
size.
*/
FLASH (rx) : ORIGIN = 0x08040400, LENGTH = 1791K
DTCMRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 288K
RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 64K
ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K
QUADSPI (r) : ORIGIN = 0x90000000, LENGTH = 64M
}

 

 

===========Debug Logs==================

18:20:58:158 : Verifying ...
18:20:58:158 : Read progress:
18:20:58:159 : Reading data...
18:21:04:271 : r ap 0 @0x08000000 0x000D9540 bytes Data 0x24080000
18:21:04:274 : Reading data...

////.....

.....////

18:21:07:924 : r ap 0 @0x90000000 0x00064E00 bytes Data 0x99999999
18:21:10:732 : r ap 0 @0x90064E00 0x00064E00 bytes Data 0x00000000
18:21:13:546 : r ap 0 @0x900C9C00 0x00064E00 bytes Data 0x00000000
18:21:16:354 : r ap 0 @0x9012EA00 0x00064E00 bytes Data 0x00000000
18:21:19:137 : r ap 0 @0x90193800 0x00064E00 bytes Data 0x00000000
18:21:21:945 : r ap 0 @0x901F8600 0x00064E00 bytes Data 0x00000000
18:21:24:748 : r ap 0 @0x9025D400 0x00064E00 bytes Data 0x00000000
18:21:27:535 : r ap 0 @0x902C2200 0x00064E00 bytes Data 0x00000000
18:21:30:340 : r ap 0 @0x90327000 0x00064E00 bytes Data 0x00000000
18:21:33:145 : r ap 0 @0x9038BE00 0x00064E00 bytes Data 0x00000000
18:21:35:945 : r ap 0 @0x903F0C00 0x00064E00 bytes Data 0x00000000

 

 

 

Please help me on urgent basis its require.

1) Is this problem is related to  hardware

2) Is this problem related to linker file 

3) Is this problem related to any logical or method error

 

Or can you provide any .stldr file for winboard25Q512JV extrenal flash QSPI 

Tesla DeLorean
Guru
February 24, 2024

The memory basis for H7 External Loaders is 0x24000004

https://github.com/cturvey/stm32extldr/blob/main/ExternalLoader.ld

Posted a bunch of loaders for H7 W25Q512 and others, check if your pin selection is already supported

https://github.com/cturvey/stm32extldr/tree/main/h7_w25q512

Urgent custom work can be done at premium rates..

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