stm32: Just clean dcache instead of disabling on stm32h7 dfu reboot

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2022-12-16 17:29:45 -05:00
parent 02b45c91fb
commit 0c43ae1fd4
1 changed files with 3 additions and 2 deletions

View File

@ -216,8 +216,9 @@ static void
usb_reboot_for_dfu_bootloader(void) usb_reboot_for_dfu_bootloader(void)
{ {
irq_disable(); irq_disable();
SCB_DisableDCache(); uint64_t *bflag = (void*)USB_BOOT_FLAG_ADDR;
*(uint64_t*)USB_BOOT_FLAG_ADDR = USB_BOOT_FLAG; *bflag = USB_BOOT_FLAG;
SCB_CleanDCache_by_Addr((void*)bflag, sizeof(*bflag));
NVIC_SystemReset(); NVIC_SystemReset();
} }