Problem getting Application to run with DFU (STM32F4)
Hello there,
i have a Application based on FreeRTOS running on STM32F429ZI-Nucleo with LwIP. FreeRTOS Tick is based on TIM6. The Application runs well.
So i have tried now the demo for DFU and it works correctly. So i was trying to push my application instead of the demo application.
Before this i changed the linker configuration in IAR for my application:
Verctor table: -> .invec start: 0x08008000
Memory Regions: -> ROM Start: 0x08008000.
Downloading the code via dfu works fine.
But when my application starts it jumps at a specific location below the base address.
While debugging there come 2 different problems:
1. Debuging the USBD_DFU project in IAR.
It Jumps to application and then Hangs up in TIM6_DAC_IRQHandler (startup_stm32F429xx.s) [Disassembly 0x80031dc] which is somewhere in the dfu code.
2. Debugging my application:
Disassembly is suddenly located at 0x80031dc which is basically somewhere in the memory region of the dfu bootloader. Step by step i went through the code.
Point after the jump backwards happens int stm32f4xx_hal_timebase_TIM.c function HAL_InitTick() ->
if(HAL_TIM_Base_Init(&htim6) == HAL_OK)
{
/* Start the TIM time Base generation in interrupt mode */
return HAL_TIM_Base_Start_IT(&htim6); //<----- happens while/after this
}
I guess it has something to do with the interrupts.
So I had a look at the element htim6 and found out weird values :
htim6->hdma->[0]->parent Value: 0x0800308B
->XferCpltCallback Value: 0x0800308D
and so on.
Since i have never had to deal with any bootloaders i have trouble to find a solution.
Did I made mistakes setting up the linker? Do I have to change source code for the init of my application code?
Did I miss any points i should have considered to set up the application to run on a different base address?
I dont know where to start ?
Please Help
#run-application #stm32f429 #usb #dfu #stm32f4