cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 IAP UART Bootlader

voyvoda .
Senior
Posted on February 19, 2018 at 08:50

Hello,

      I want to use the STM32 IAP UART Bootlarder in the CubeMX. The example is working fine. However I have a problem with my own code. When I use HAL_Delay() function, the code is crashing. If I do not use the HAL_Delay() function, everything is so good.

     What could be the problem ? Can anybody help ?

Best Regards 

#stm32-f4 #bootloader #stm32-uart-bootloader
14 REPLIES 14
Posted on February 19, 2018 at 14:31

 ,

 ,

Hello I resolve the issue by just changing the the following line in the 'stm32f407xx.h' file.

Original:

♯ define FLASH_BASE ,  ,  ,  ,  ,  , 0x08000000U

Modified:

♯ define FLASH_BASE ,  ,  ,  ,  ,  , 0x08004000U

Posted on February 19, 2018 at 15:17

>> Modified

>> FLASH (rx)      : ORIGIN = 0x8004000, LENGTH = 512K

If you're adding 0x4000 to ORIGIN, LENGTH can't be 512K.

should be 512K - 0x4000 = 507904

Posted on February 19, 2018 at 15:26

By the way, I would not recommend to change FLASH_BASE in stm32f407xx.h.

Posted on February 19, 2018 at 15:28

I change the line in the file 'system_stm32f4xx.c' like below.

SCB->VTOR =

0x8004000 

| VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */
Posted on February 19, 2018 at 15:37

It would help significantly if you just used the Linker to fixup the __Vectors address as built and program that into SCB->VTOR instead of this &sharpdefine stupidity.

https://community.st.com/0D70X000006SeCDSA0

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