cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE, debug/run problem with my application in external SPI. STM32H750B-DK evb.

MGira.1
Associate II

With the evb STM32H750B-DK I create an application that is completely loaded in external flash and when I try to debug it there is a problem, it seems that there is an execution in place problem. The debugger starts from the right point but after one step goes in error.0690X00000Bvac4QAB.png

I have a board that isn't fully supported, it mounts two flashes spi MT25QL512ABB8ESF-0SIT and when I try to program it wth STM32Programmer I have to use the MT25TL01G_STM32H750B-DISCO.stldr that is for another type of flash. The read/write operation goes well but the flash isn't right ... this is linked with my debug problem? Could someone assure that this is the right flash loader for read/write and debug the spi flash mounted in the evb STM32H750B-DK?

5 REPLIES 5

Ok, so the MT25L01G basically has two 512 die in it, so probably not the unreasonable choice providing the pin usage remains the same.

From your screen you're far too early to see the QSPI interface working. The external memory needs to be initialized before you can look into it. In most systems this would need to be done in SystemInit(), and prior to the setup code unpacking or zeroing the statics into RAM

To see the QSPI from where you are you'd need to have initialized the memory interfaces in a debugger script which walks the processor through the sequencing of the RCC, GPIO, and QSPI register configurations.

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

Thanks for the advice, now I have to find my road ...

I have posted only the application but there is also a bootloader that has to configure the QSPI before jumping to application. I was used to IAR and switching to another IDE (STM32CubeIDE) increase the difficulty of the project. At the moment I have to find in STM32CubeIDE the way to preload the bootloader that configures the QSPI before jumping in the application for the debug purpose.

berendi
Principal

If the bootloader is already working, just load it into the internal flash once, then start debugging the application.

If it doesn't work right away, you can force the debugger to start at a specific address by entering the address of the bootloader Reset_Handler() (the word at offset 4/address 0x08000004 of the bootloader image) into Run / Debug Configurations / Startup / Set program counter at (hex).

MGira.1
Associate II

Thanks!!!

I have just found the right way to load the bootloader in internal flash before writing in external flash (QSPI) the application. To do it I use the Debug configuration tab inside STm32CubeIDE

0690X00000Bvb93QAB.png

With previous hints and my progress on the topic I consider the question solved.

Can you please tell me, whether you were able to debug code which is placed in external qspi memory