2021-02-04 01:52 AM
Hello. i try to write simple bootloader that run simple program (blink with 1 led)
This works fine on stm32f103 but the same code not working on f105 :(
bootloader start from 0x08000000 and main app from 0x08008000
both program made in cube ide ()
code of bootloader
uint32_t appJumpAddress;
void (*GoToApp)(void);
appJumpAddress = *((volatile uint32_t*)(FLASH_USER_START_ADDR + 4));
GoToApp = (void (*)(void))appJumpAddress;
__set_MSP(*((volatile uint32_t*) FLASH_USER_START_ADDR));
GoToApp();
code of main app
while (1)
{
HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_12);
HAL_Delay(1000);
}
in system_stm32f1xx.c of main app i uncomment #define USER_VECT_TAB_ADDRESS and change #define VECT_TAB_OFFSET to 0x00008000U
then i build both projects and write with CubeProgrammer (booloader with in 8000000 and app in 8008000)
what the difference between 103 and 105 for bootloader?
P.S. i spend 3 days with this problem and tryed many examples of disabling,clearing, masking different registers and etc. Maybe some one have working example for f105?