diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2022-12-16 17:29:45 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2022-12-16 17:29:45 -0500 |
commit | 0c43ae1fd4d3dc245038b39afe55197c9397f100 (patch) | |
tree | 47001a9173710864d0126baa492a23362bcc4a0f /src/stm32/stm32h7.c | |
parent | 02b45c91fb1e6c02265692555097f34f41f15604 (diff) | |
download | kutter-0c43ae1fd4d3dc245038b39afe55197c9397f100.tar.gz kutter-0c43ae1fd4d3dc245038b39afe55197c9397f100.tar.xz kutter-0c43ae1fd4d3dc245038b39afe55197c9397f100.zip |
stm32: Just clean dcache instead of disabling on stm32h7 dfu reboot
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/stm32/stm32h7.c')
-rw-r--r-- | src/stm32/stm32h7.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/stm32/stm32h7.c b/src/stm32/stm32h7.c index 4f9ec68c..43b7aa6e 100644 --- a/src/stm32/stm32h7.c +++ b/src/stm32/stm32h7.c @@ -216,8 +216,9 @@ static void usb_reboot_for_dfu_bootloader(void) { irq_disable(); - SCB_DisableDCache(); - *(uint64_t*)USB_BOOT_FLAG_ADDR = USB_BOOT_FLAG; + uint64_t *bflag = (void*)USB_BOOT_FLAG_ADDR; + *bflag = USB_BOOT_FLAG; + SCB_CleanDCache_by_Addr((void*)bflag, sizeof(*bflag)); NVIC_SystemReset(); } |