STM32L562RETX bootloader problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-03 5:24 PM
I'm using the cubeide 1.6.1 version.
There's a problem with using the bootloader this time.
This is bootloader code
​
#define APPLICATION_ADDRESS (uint32_t)0x08010000
typedef void (*pFunction)(void);
pFunction JumpToApplication;
uint32_t JumpAddress;
​int main(void)
{
/* USER CODE BEGIN 1 */
​
/* USER CODE END 1 */
​
/* MCU Configuration--------------------------------------------------------*/
​
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
​
/* USER CODE BEGIN Init */
​
/* USER CODE END Init */
​
/* Configure the system clock */
SystemClock_Config();
​
/* USER CODE BEGIN SysInit */
​
/* USER CODE END SysInit */
​
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_ICACHE_Init();
MX_USART1_UART_Init();
MX_RTC_Init();
/* USER CODE BEGIN 2 */
setvbuf(stdout, NULL, _IONBF,0);
printf("\r\nstart!!!");
Jump_to_app_flash();
HAL_Delay(100);
}
​
void Jump_to_app_flash(void)
{
// HAL_RCC_DeInit();
// SysTick->CTRL=0;
// SysTick->LOAD=0;
// SysTick->VAL=0;
// __disable_irq();
​
// Jump to user application
JumpAddress = *(__IO uint32_t*)(APPLICATION_ADDRESS + 4);
JumpToApplication = (pFunction) JumpAddress;
// Initialize user application's Stack Pointer
__set_MSP(*(__IO uint32_t*) APPLICATION_ADDRESS);
JumpToApplication();
}
​
and
I changed the main code setting like this.
​
I'm want to jump from 0x8000000 bootloader to 0x8010000 main firmware.
There's an error in the jump.
I downloaded the firmware with a cubeprogrammer.
In this case, how should I solve this?
- Labels:
-
Bootloader
-
STM32CubeIDE
-
STM32L5 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-03 11:39 PM
I have same problem.
I’ d be grateful if you could do something to expedite a reply to my query.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-04 1:45 AM
UP !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-08 12:23 AM
Hi,
Try to set Jump variables in "static" like this:
static pFunction Jump_To_Application;
static uint32_t JumpAddress;
I had the same issue using STM32L562VET6 and ARM Compiler V6 on Keil.
