Jump Application Code And Eeprom Fault
I am trying to jump user application from boot code:
Boot code only include below lines:
HAL_Init();
SystemClock_Config();
// Jump proccess start
uint32_t reset_handler_add=*((volatile uint32_t*)(FLASH_APP_START_ADDRESS+4));
void (*app_reset_handler)(void) = (void*)reset_handler_add;
HAL_RCC_DeInit();
HAL_DeInit();
__HAL_RCC_SYSCFG_CLK_DISABLE();
SysTick->CTRL = 0;
SysTick->LOAD = 0;
SysTick->VAL = 0;
__disable_irq();
SCB->VTOR = FLASH_APP_START_ADDRESS;
uint32_t msp_value = *((volatile uint32_t*)(FLASH_APP_START_ADDRESS));
__set_MSP(msp_value);
app_reset_handler();Also #define FLASH_APP_START_ADDRESS 0x080A0000 this is application code start address.
But when I jump the User application I2C and DMA not working so, I couldnt use eeprom
In the User application I stuck in while (HAL_I2C_GetState(hi2c) != HAL_I2C_STATE_READY) function when I jump the User App. But If User App work on the base 0x080000000 address everything successfull, When I jump I have problem.
I changed flash.Ld file:
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 192K
CCMRAM (rw) : ORIGIN = 0x10000000, LENGTH = 64K
FLASH (rx) : ORIGIN = 0x080A0000, LENGTH = 256K
}And changed #define VECT_TAB_OFFSET 0xA0000 value.
Where is the faults ?
