Skip to main content
YGU.1
Associate II
November 25, 2020
Question

STM32H743 External loader problem

  • November 25, 2020
  • 11 replies
  • 9748 views

Hello,

I'm learning STM32 and wrote an quadspi external loader for my NUCLEO -144 (STM32743ZI) and 1M external flash. I've it tested in the Cube IDE and everything looks OK, I can read and write the external flash. When I use the loader in STM32CudeProgrammer I managed to read , but not erase and write accordingly.  Any help will be appreciated. Please find attachments.

Thanks

This topic has been closed for replies.

11 replies

cVass.1
Associate II
November 27, 2020

Hello,

I see you have successfully created an External loader for the H743.

could you send me your project

Thank you

YGU.1
YGU.1Author
Associate II
November 28, 2020

Please find attachment

PFlor.2
Senior II
February 13, 2024

I'm using a STM32H743 and I've tried to use your Loader_src.c, linker.ld, Dev_Inf.c/.h but get read error in programmer when I try to read the flash at 0x90000000.  I've proven the quadspi.h and quadspi.c drivers for the Windbond W25Q64 work fine for Read, Write, and memory mapped.  Any advice?

 

cVass.1
Associate II
November 28, 2020

Hello, I just looked at your files, and I see nothing.

Tell me, when I try the best I have to do a Connect then a Disconnect then a Connect so that it takes the Init.

Do you have a lead.

Sorry, I'm french.

Possible to share the progress of our projects?

Thank you

cVass.1
Associate II
November 30, 2020

Hello,

it does not support Init, do you have any idea.

cVass.1
Associate II
December 1, 2020

Hello.

then me in Init I pass the function in mapped.

And to put in mapped I just check this is a mapped request or other.

In this way I no longer have the problem for erased.

I send you my Loadet_scr as soon as possible.

YGU.1
YGU.1Author
Associate II
December 2, 2020

Hey,

Unfortunately I can engage with the project twice a week only, so I do not have any progress for a while.

I'm waiting for your Loader_scr.

Thanks a lot.

cVass.1
Associate II
December 2, 2020

Hey,

I understand you.

I give you the file.

The only problem I don't understand is that I have to do:

Connect -> Disconnect -> Connect

to read the QuadSPI with STM32Cubeprogrammer.

Do you have the same concern.

thank you

Tesla DeLorean
Guru
December 2, 2020

This was a bug reported to ST a long time ago. It doesn't call the right address on the H7 the first time it loads the ELF file.

ie loads at 0x24000000​, maps Init at 0x20000000

Set Verbose 3, post logs of fail/pass

@Nawres GHARBI​ 

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

I've been complaining about this for over a year

https://community.st.com/s/question/0D50X0000BRWFmKSQX/stm32-cube-programmer-v210-not-working-with-stm32h750bdk-qspi-external-loader

The initial load fails, the connect/disconnect/connect gets it right the second time around.

The ELF loader needs fixing if you're going to modify the addresses passed in the damn header and symbols. They'd actually work properly if left alone.

@STOne-32​ 

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
YGU.1
YGU.1Author
Associate II
December 2, 2020

Thank you.

Yes it is. I also have same issue with STM32Cubeprogrammer. Sometimes it takes 3-4 retries.

YGU.1
YGU.1Author
Associate II
December 2, 2020

cVass.1,

I just try to understand.. You managed read\erase\write an external flash by using STM32Cubeprogrammer and your custom external Quadspi loader (stldr) based on the project I sent you 4 days ago. Is it correct?

clive1 

I get an error when trying to erase a sector of the external nor flash. Error: Sector erase operation has failed at least for one of the existing specified sectors.Please verify flash memory protection (shown on the picture) . I have EnableMemoryMappedMode enabled in my Init() of Loader_Scr.c

Does it make the problem? Have you idea?

Thanks

Tesla DeLorean
Guru
December 2, 2020

If you're in memory-mapped the erase probably will fail with HAL libraries.

Validate all code outside of the External Loader model first. Build a test harness so you can sequence the functions as Cube Programmer would so you can utilize a debugger.

You can always instrument your code to understand what it is doing, how Cube Programmer is interacting with it, and the errors you encounter on the HAL side. The USART and all your board hardware is available and can be used.

You can't really use interrupts, although I've seen some awful hacks from ST to get the HAL internal dependencies to work, you really don't need that for HAL_Delay and Ticks to work.

@STOne-32​ we really need to get some of this code on GitHub so we can fix the broken issues with Cube Programmer and ST-LINK Utilities that have persisted for years, and been ignored despite clear evidence of coding issues and initialization problems.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
cVass.1
Associate II
December 2, 2020

YGU.1

no this is my project, I just compare with mine.

during my tests I noticed that I was in EnableMemoryMappedMode in the Init (); I couldn't erase anymore.