cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F746BGTX bootloader jump to user application failing in HAL_Init

PHolz.1
Associate II
Hello,
I have a custom borad with a STM32F746BGTX and I use GFX Touch 4.20. I would like to have a bootloader and an application on the STM32F746BGTX.
I have different images in gfx Touch for the bootloader and the application.
The bootloader is stored in flash memory: 0x0800 0000 - 0x0803 FFFF
The application is saved in flash memory: 0x0804 0000 - 0x080F FFFF

I use an external Quad SPI Flash Memory (W25Q128FVSQ). I divided the RAM into 2 areas again.
The bootloader gets 3MBytes (from 0x90000000 to 0x902EE000) The application gets 13MByte (from 0x902EE000 to 0x90FFFFFF).
I want to jump from the bootloader into the application.
The process: 1. Jump from Boorloader into the application. A value is written into RAM. 2. The function is called: NVIC_SystemReset() 3. In Main() I check whether a value is stored in RAM. If there is a value in the RAM, I jump into my application This process works perfectly and the application is also started. An error then occurs in HAL_Init().

 In debug mode the uC runs up to a certain point (until Breakpoint - picture below). Then the uC disappears somewhere. But no HardDefault Handler is called, otherwise there is an error.

 

Fehler_exakt2.PNG

Can someone help me solve the problem?

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello again @PHolz.1 ,

Sorry for the delay, So in this case the problem arises from the fact that you are initializing the peripherals twice. I suggest initializing it once or at least using HAL_TIM_Base_DeInit() first before initializing the timer again.

 

I hope this helps you.

Mohammad MORADI
ST Software Developer | TouchGFX

View solution in original post

5 REPLIES 5

Hello @PHolz.1 ,

To be honest, I'm not completely sure if I understood your problem or what exactly goes wrong in HAL_Init(). Could you please provide more information about the error? And are you initializing your hardware in the Bootloader and your application? Or is the initialization only in your application?

Mohammad MORADI
ST Software Developer | TouchGFX
PHolz.1
Associate II

Hi Mohammad,

Yes, I initialize in the bootloader and in the application because I have images in GFX Touch for the bootloader and the application.

The problem arises in the HAL_InitTick() function when Timer6 is started.

picture1.PNG

picture2.PNG

 

Hello again @PHolz.1 ,

Sorry for the delay, So in this case the problem arises from the fact that you are initializing the peripherals twice. I suggest initializing it once or at least using HAL_TIM_Base_DeInit() first before initializing the timer again.

 

I hope this helps you.

Mohammad MORADI
ST Software Developer | TouchGFX
PHolz.1
Associate II
Hello, thanks for the suggestion. It fixed my error.

Hello,

thanks for the suggestion. It fixed my error. 

Glad to hear! 
Would please select it as accepted solution? 

Mohammad MORADI
ST Software Developer | TouchGFX