Jump to internal bootloader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2010-05-07 10:20 AM
Jump to internal bootloader
#bootloader-gpio- Labels:
-
Bootloader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-08-21 2:34 PM
Even addresses are assumed to indicate 32-bit ARM code, rather than Thumb. The M3/M4 can't execute 32-bit ARM code and faults.
Be sure that you're calling code, not vector points to code.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-01-09 12:44 PM
how do you initialize temp and Jump_to_Bootloader?
on launch_dfu request i'm writing a 'code word' to the last flash section, then at the top of main I check for the code word before launching the program. Nothing has been configured except whatever is called in system_startup (I think only HSE). I just can't figure out how to do the jump in c.. thanks!- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-01-09 1:46 PM
Post#4 from Trevor would seem to have all the definitions you'd be looking for.
The address is for the F1's Boot Loader The startup code typically calls System_Init() prior to main(), so what ever you set up there for the HSE/PLL will be in effect, not running from HSI It's loading vectors for SP and PC from the vector table at the beginning of the image, C does the call as a POINTER to a FUNCTION. Observe how you pass compare routines to qsort(), see K&R or other C Language texts.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-11-26 2:48 PM
First off, thank you Clive for all your help. I am still coming up to speed on microcontroller coding.
I have a computer with a stm32f05 chip that controls the PWM of the LED screen backlight among other things. I created a special serial command that tells the chip to jump to the bootloader. I have the jump working good and can flash the new firmware fine but the trouble is that the LED backlight turns off once you hit the SysMemBootJump(); code. I tried disabling PWM and setting the pins PA11 and PB3 high with this code before I do the jump. GPIO_ResetBits(GPIOA,GPIO_Pin_11); GPIO_Struct.GPIO_Pin = GPIO_Pin_11; GPIO_Struct.GPIO_Mode = GPIO_Mode_OUT; GPIO_Struct.GPIO_PuPd = GPIO_PuPd_UP; GPIO_Struct.GPIO_OType = GPIO_OType_PP; GPIO_Init(GPIOA, &GPIO_Struct); GPIO_WriteBit(GPIOA, GPIO_Pin_11, Bit_SET); GPIO_SetBits(GPIOA,GPIO_Pin_11); //turns on GPIO_WriteBit(GPIOA,GPIO_Pin_11,Bit_SET); Any way to keep a PIN level high after jumping to the bootloader? Or is it that the GPIO clock gets disabled once you enter the bootloader? Is my only solution to create a custom bootloader? This is the jump function I am using void (*SysMemBootJump)(void) = (void (*)(void)) (*((uint32_t *) 0x1fffec04)); Thanks, Miles- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-11-26 4:26 PM
More probably just writing some hard-coded values into the GPIO configuration registers.
Generally I think you're going to want to build your own loader, depending on your requirements and space constrains, the flashing code could be downloaded by the updating application into RAM. I might also be feasible to jump into a different area of the ROM, in a fashion that preserves the GPIO pins, but this would require you to disassemble the ROM, and would be complicated if the version of code in the ROM changes. You might want to look for IAP (In Application Programming) for this and other STM32 platforms.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
‎2015-10-30 4:19 AM
Hi Miles,
Did you ever get this working? I am using a stm32f051 device and I would like to be able to remotely update it. How did you handle the vector relocation on this device and the bootloading?Many regardsBb Carter- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-10-04 11:05 AM
https://community.st.com/0D50X00009Xkh3DSAR
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
‎2018-03-20 10:58 PM
I have made this code working without uart driver but with uart this code is not working for STM32L073RZ
void Bootloader_JumpToSysMem(void)
{ uint32_t JumpAddress = *(__IO uint32_t*)(SYSMEM_ADDRESS + 4); pFunction Jump = (pFunction)JumpAddress; HAL_NVIC_DisableIRQ(USARTX_IRQn); HAL_UART_DeInit(&UartHandle); HAL_RCC_DeInit(); HAL_DeInit(); SysTick->CTRL = 0; SysTick->LOAD = 0; SysTick->VAL = 0; __HAL_SYSCFG_REMAPMEMORY_SYSTEMFLASH(); __set_MSP(*(__IO uint32_t*)SYSMEM_ADDRESS); Jump(); // HAL_GPIO_TogglePin(LED2_GPIO_PORT, LED2_PIN); while(1);}
- « Previous
- Next »