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
KDJEM.1
ST Employee

Hello @ATank.1 ,

Could you please try to use "MT25TL01G_STM32H745I-DISCO.stldr" under STM32CubeProgrammer path "...\STM32CubeProgrammer\bin\ExternalLoader".

KDJEM1_1-1723449558591.png

I think it will work because the MT25TL01G_STM32H745I-DISCO" [support memory Size = 128M] for your QSPI memory and MT25QL512A [memory Size = 64MB]. So, the size of your memory is less than the external loader supported by STM32CubeProgrammer. 

Also, to create your own external loader, I advice you to start with MT25TL01G_STM32H747I-DISCO external loader and get inspired by this FAQ "How to implement and use your own external flash loader: An example using STM32U5A9J-DK by following the steps to create your own external loader.

Please let me know if your issue is solved or not?

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.

Hi @KDJEM.1 

I tried using the loader for MT25TL01G_STM32H747I-DISCO and the cube programmer connects successfully and program too is successful without any error but when I read the data the data does not match with the actual binary programmed.

Full chip erase takes only a few seconds which should not be the case. Erase sector operations are also successful but message is shown by the cube programmer that protected sectors are not erased. I think the sectors are protected maybe. Is there a way to enable them? 

 

Also Is there any source available for MT25TL01G_STM32H747I-DISCO project then it would be very helpful.

 

Thanks 

Anuj

KDJEM.1
ST Employee

Hello @ATank.1 ,

 

Does it work with "MT25TL01G_STM32H745I-DISCO.stldr"?

The project source of "MT25TL01G_STM32H747I-DISCO.stld" is available in Project.

May this Mooc "MOOC - External QSPI loader how to - YouTube" can help you to create a customer external loader.

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.

Hi @KDJEM.1 ,

using MT25TL01G_STM32H745I-DISCO.stldr following are the observtions

 

1. The programming is successful but the verification fails

2. The mass erase completes in only 3 seconds which should take around 3-7 min so it is not erasing.

3. Read back programmed data and when compared to the binary, the data does not match.

4. Erasing sectors completes sucessfully but with a message that protected sectors are not erased. If data is read again after erase it is not 0xff so erasing is not happening maybe due to protected sectors

Maybe need to debug and check in code on whether the sectors are protected

 

We have already gone through the link you shared. We are working on creating a new project from scratch and port the driver. 

Thanks 

Anuj

Hi @KDJEM.1 ,

The MT25TL01G_STM32H747I-DISCO project doesn't contain a cube MX file so we have to check the pins configuration manually in code. Can you please share a project which has a cube MX file

Thanks 

Anuj

 

With the Microns it's quite easy to lock the BPx bits in the status registers, especially with Macronix quad enable methods. These are situations where using the wrong loader can break things. The Mass Erase will complete immediately if and of the sectors are locked/protected 

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

I think I've built one in the past, I'll check when I'm at a computer 

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 reply. If you already have a STLDR with STM32H745XI and MT25QL512ABB flash in single mode

(QSPI pins same as H745 DISCO board)

PF10: QSPI_CLK

PG6: QSPI_CS

PD11: QSPI_D0

PF9: QSPI_D1

PF7: QSPI_D2

PF6: QSPI_D3

then it would be very helpful.

Using already existing MT25TL01G stldr does not work as some commands are different. Comparing the commands and changing in the code can be done but it is a tedious process and will take time.If something is missed then the loader will not work and debugging will take time too.

Regards,

Anuj

 

Hi @Tesla DeLorean 

Can you please share a stldr if you already have one as per the configuration above

 

Question: I see lot of different reference codes for MT25QL512 where the instruction is sent over single line or 4 lines

Does it make a difference? why different reference codes have different settings? only speed is the difference I think

 

For e.g. In the link below the intructions mode is 4 lines for Quad mode

https://github.com/STMicroelectronics/stm32-external-loader/blob/main/STM32G4x_boards/MT25QL512ABB_STM32G474E-EVAL/Sources/Library/mt25ql512abb.c  

 

But in the driver file below the commands are same but intructions are sent over only 1 line

https://github.com/STMicroelectronics/stm32-external-loader/blob/contrib/QSPI_Drivers/MT25QL512/quadspi.c

obviously the 4 line instructions will be fast but is this the only difference

 

Thanks,

Anuj