AnsweredAssumed Answered

STM32F105 problem jumping to application

Question asked by LaserElettronicaSRL on Jun 23, 2014
Latest reply on Jun 27, 2014 by Clive One
I have problem with jump to application by bootloader.
The device used is the STM32F105R8.
The bootloader does not jump in the application,it crashes in the function "Jump_To_Application()".

The code of the bootloader making the jump is:

#define APPLICATIONADDRESS    (uint32_t)0x08008000

/* Test if user code is programmed starting from address "ApplicationAddress" */
if (((*(__IO uint32_t*)APPLICATIONADDRESS) & 0x2FFE0000 ) == 0x20000000)
        /* Jump to user application */
        JumpAddress = *(__IO uint32_t*) (APPLICATIONADDRESS + 4);
        Jump_To_Application = (pFunction) JumpAddress;
        /* Initialize user application's Stack Pointer */
        __set_MSP(*(__IO uint32_t*) APPLICATIONADDRESS);

In the application i have relocate the vector table:

int main(void)
    //    __disable_irq();  
      /* Set the Vector Table base location at 0x8000 */
      NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x8000);

    //    __enable_irq();  

    /***************** Add your application code here   ***************************/



I attached the image (bootloader + application) downloaded  from flash.