2018-02-18 11:50 PM
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-bootloader2018-02-19 06:31 AM
,
,
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
2018-02-19 07:17 AM
>> Modified
>> FLASH (rx) : ORIGIN = 0x8004000, LENGTH = 512K
If you're adding 0x4000 to ORIGIN, LENGTH can't be 512K.
should be 512K - 0x4000 = 507904
2018-02-19 07:26 AM
By the way, I would not recommend to change FLASH_BASE in stm32f407xx.h.
2018-02-19 07:28 AM
I change the line in the file 'system_stm32f4xx.c' like below.
SCB->VTOR =
0x8004000
| VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */2018-02-19 07:37 AM
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