cancel
Showing results for 
Search instead for 
Did you mean: 

External flash Loader STM32H745 + MT25QL512A

ATank.1
Associate III

Hello,

Am using STM32H745XI device same as the disco board and external flash on QSPI (MT25QL512A) single chip flash. IAR IDE is used for development. 

Though there are reference driver codes available for MT25QL512A but different controller is used. 

It may take sometime to develop a loader from scratch using STM32H745 and MT25QL512A

Is there a .stldr file available which you can share which uses the same pins as the STM32H745 disco board with MT25QL512A in single flash mode?

Thanks & Regards,

Anuj

 

 

 

 

 

15 REPLIES 15

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

I have an .FLM for Keil in that configuration, should just be able to rebuild something from a current fork.

 

The part starts in 1-bit mode / 3-byte address mode and can then be switched. There are usually several command variants. What you send depends on the current mode of operation.

To be honest, it doesn't make a huge amount of difference, as you're usually reading a line of bytes (32 into a cache line), and the memory has to prefetch and pipe-line the read, so you're often trading cycles to send bits or spinning for dummy cycles for it to be ready.

The loader doesn't need to be optimal, writing is an inherently slower process to the array, where you want speed is reading/executing.

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

Hello @Tesla DeLorean,

Thanks a lot for sharing the loader.

1. The loader is able to program successfully If I directly select the binary and set the address to 0x90000000 and start programming. I read the data and am able to see the data is sucessfully programmed. Checked with different data too and able to see correct data is programmed 

 

2. I observed that if I select full chip erase instead of start program the STM32CubeProgrammer says mass erase sucessful.  But when I read the data again I don't see the data has erased and it shows the old data only which was programmed.

 

It would be really helpfull if any source code is available. I can also check with our code to see where we were going wrong

 

Thanks

Regards,

 

 

Hello @Tesla DeLorean ,

Can you please share source files for the loader?. 

Thanks

Anuj

If protection bits are set the Mass Erase may complete immediately, with no error reported.

I have other builds where I actively go in and clear the BPx bits, that can be set by probing/usage methods for Winbond/Macronix, due to this being a somewhat persistent and annoying issue when it occurs. Not sure this build has this. Perhaps you can dump the Status Register from your usual MSP / App code, and see if you've set the protection bits.

I'll check what's in this build, and perhaps merge in some of the changes from others.

The code is part of a bigger commercial effort, and the source is not freely provided. You can help this project by contributing, as outlined on the github pages

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

Hi @Tesla DeLorean ,

Thanks for the information. The loader you shared works perfectly so no issues. I was able to confiure the external flash in application project and am able to see the images load in external flash. 

One difference I observed in application project and loader project developed is the application project is based on H745 disco board and the loader project was created by selecting specific MCU in cubeMX. The drivers files are exactly same in applicaiton and loader project but some commands fail in the loader project. Plan is to use the applciation project source remove all uncessary files and then add loader files and then verify again.

Thanks

Anuj