AnsweredAssumed Answered

Stm32f427 system memory bootloader

Question asked by tasan.yasin on Nov 29, 2014
Latest reply on Nov 29, 2014 by Clive One
i have custom board with STM32F427VI and want to boot from usart3 via bootloader inside system memory. 

boot0 pin is low and boot1 pin is NC. i dont want to switch boot pins. because eventually these pin connections must be permanent.

just want to jump system bootloader address by my embedded software.

if i set boot0 to high, i can drop the code to the bootloader and can update firmware by usart3. i used below software (STSW-MCU005) for this. so i can understand that my pinout connections are not wrong.
http://www.st.com/web/en/catalog/tools/PF257525

i read following passage from reference guide (RM0090) page 70 
"To select boot from Flash memory bank 2, clear the BFB2 bit in the user option bytes. When this bit is set and the boot pins are in the boot from main Flash memory configuration, the device boots from system memory, and the boot loader jumps to execute the user application programmed in Flash memory bank 2. For further details, please refer to AN2606."

so i used following code for jumping to bootloader address:
RCC_DeInit(); // shutdown any tasks
// reset the systick timer
SysTick->CTRL = 0;
SysTick->LOAD = 0;
SysTick->VAL = 0;
__set_PRIMASK(1); // disable interrupts
FLASH_OB_Unlock(); // flash option bytes unlock
FLASH->OPTCR |= 0x10; // set BFB2 bit
FLASH_OB_Lock(); // flash option bytes lock
__set_MSP(*(__IO uint32_t*) 0x20002318); // Initialize user application's Stack Pointer
(*((void (*)(void))(*(unsigned long *)0x1fff0004)))(); // jump address

after the last line, code jumps to address of 0x1fff4abf. because in the memory address of 0x1fff0004 contains value of 0x1fff4abf. this address value is from system memory (below image) but it is not the start address of the bootloader. because i tried it with STSW-MCU005 software and could not make contact with bootloader.
yt_mem_add.JPG

so how can i jump to system memory bootloader with my software, without using mcu boot pins?

Outcomes