h7 dfu and comments (#2522)

This commit is contained in:
Matthew Kennedy 2021-04-03 18:58:29 -07:00 committed by GitHub
parent 2aa9b3cd57
commit b7aacbe622
2 changed files with 29 additions and 2 deletions

View File

@ -8,12 +8,19 @@
#ifndef HW_LAYER_PORTS_STM32_STM32F7_DFU_INIT_H_
#define HW_LAYER_PORTS_STM32_STM32F7_DFU_INIT_H_
// looks like this is System Control Block Base Address
// System control block registers base
LDR R1, =0xE000ED00
// location of system memory (DFU bootloader)
LDR R0, =0x1FF00000
// so this must be Vector Table Offset Register?
// Set the vector table offset to the sysmem image
STR R0, [R1, #8]
// load the stack pointer
LDR SP, [R0, #0]
// prepare for jump to bootloader
LDR R0, [R0, #4]
#endif /* HW_LAYER_PORTS_STM32_STM32F7_DFU_INIT_H_ */

View File

@ -1,3 +1,23 @@
// https://community.st.com/s/question/0D50X00009bNBluSAG/boot-stm32h7-after-power-up
// https://community.st.com/s/article/STM32H7-bootloader-jump-from-application
#ifndef HW_LAYER_PORTS_STM32_STM32F7_DFU_INIT_H_
#define HW_LAYER_PORTS_STM32_STM32F7_DFU_INIT_H_
// System control block registers base
LDR R1, =0xE000ED00
// location of system memory (DFU bootloader)
LDR R0, =0x1FF09800
// Set the vector table offset to the sysmem image
STR R0, [R1, #8]
// load the stack pointer
LDR SP, [R0, #0]
// prepare for jump to bootloader
LDR R0, [R0, #4]
#endif /* HW_LAYER_PORTS_STM32_STM32F7_DFU_INIT_H_ */