STM32F105 problem jumping to application
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-06-23 6:35 AM
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); Jump_To_Application(); } 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.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-06-25 6:07 AM
Awesome, I hope this all works out for you, but the presented facts appear internally inconsistent.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-06-26 12:06 AM
Look the ''stsw-stm32121_USB\STM32_USB-FS-Device_Lib_V4.0.0\Projects\Device_Firmware_Upgrade\binary_template'' use same method.
Bootloader ==> 0x08000000 to 0x08003000 Application ==> 0x08003000 to 0x08020000 In the main function set the Vector Table base location at 0x3000: NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x3000); The option target for application is:- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-06-26 5:03 AM
Look the ''stsw-stm32121_USB\STM32_USB-FS-Device_Lib_V4.0.0\Projects\Device_Firmware_Upgrade\binary_template'' use same method.
Bootloader ==> 0x08000000 to 0x08003000
Application ==> 0x08003000 to 0x08020000
In the main function set the Vector Table base location at 0x3000:
NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x3000);
Previously: The VECT_TAB_OFFSET must be equal 0x7000 ( 0x8000 - offset) else not function! So 0x7000 when it's 0x8000 is consistent with this? 64K-0x8000 = 0x9000! And the binary generated with a ResetHandler at ~0x08007000 when the linker is set at 0x08008000
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-06-27 12:19 AM
I agree with
you!
This is the only
method
that works!
I asked
clarifications
the
ST
support
,
but
do not respond
!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-06-27 12:30 AM
I've got quite a lot of mileage on these types of solutions (boot loader + app, STM32), if it misbehaves in the manner you describe the problem is most likely in the project (options/metadata), the files it actually uses (paths, defines, pre-processor), and the tool chain (linker).
Keil support might be a better avenue. For ST you'd probably want to go via your local distributor and their FAE's, and have them thoroughly replicate and understand your issue.Up vote any posts that you find helpful, it shows what's working..

- « Previous
-
- 1
- 2
- Next »