2024-03-26 04:23 AM - edited 2024-03-26 04:26 AM
hi,
how to clean SRAM before jumping to main application from bootloader .
In the SD card boot loader code we use local , global & static variable and what will happen to these variables during the transition from boot loader to main application .
how to reset SRAM before jump .
__HAL_RCC_GPIOC_CLK_DISABLE();
HAL_RCC_DeInit();
HAL_DeInit();
SysTick->CTRL = 0;
SysTick->LOAD = 0;
SysTick->VAL = 0;
asm("msr msp, %0; bx %1;" : : "r"(vector_p->stack_addr), "r"(vector_p->func_p));