aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2022-12-12 22:54:17 -0500
committerKevin O'Connor <kevin@koconnor.net>2022-12-15 09:52:21 -0500
commit9d668d63a7183a62b9f78ef7e40f1a2089a43097 (patch)
treef889c6cc364d89de2196883371d125147f76e499 /src
parentf6199ef61360c06a29aba48bdb3b6e8f44a8b301 (diff)
downloadkutter-9d668d63a7183a62b9f78ef7e40f1a2089a43097.tar.gz
kutter-9d668d63a7183a62b9f78ef7e40f1a2089a43097.tar.xz
kutter-9d668d63a7183a62b9f78ef7e40f1a2089a43097.zip
stm32: Rework usb_reboot_for_dfu_bootloader() so it works on stm32h723
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src')
-rw-r--r--src/stm32/stm32h7.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/stm32/stm32h7.c b/src/stm32/stm32h7.c
index 3423e7eb..4f9ec68c 100644
--- a/src/stm32/stm32h7.c
+++ b/src/stm32/stm32h7.c
@@ -208,7 +208,7 @@ clock_setup(void)
* Bootloader
****************************************************************/
-#define USB_BOOT_FLAG_ADDR (CONFIG_RAM_START + CONFIG_RAM_SIZE - 1024)
+#define USB_BOOT_FLAG_ADDR (0x24000000 + 0x8000) // Place flag in "AXI SRAM"
#define USB_BOOT_FLAG 0x55534220424f4f54 // "USB BOOT"
// Flag that bootloader is desired and reboot
@@ -216,6 +216,7 @@ static void
usb_reboot_for_dfu_bootloader(void)
{
irq_disable();
+ SCB_DisableDCache();
*(uint64_t*)USB_BOOT_FLAG_ADDR = USB_BOOT_FLAG;
NVIC_SystemReset();
}