stm32: stm32g0/h7 usb_dfu_bootloader support (#5596)
Signed-off-by: Alan.Ma from BigTreeTech <tech@biqu3d.com>
This commit is contained in:
@@ -147,7 +147,6 @@ usb_request_bootloader(void)
|
||||
void
|
||||
armcm_main(void)
|
||||
{
|
||||
check_usb_dfu_bootloader();
|
||||
SCB->VTOR = (uint32_t)VectorTable;
|
||||
|
||||
// Reset clock registers (in case bootloader has changed them)
|
||||
@@ -164,6 +163,8 @@ armcm_main(void)
|
||||
RCC->APBENR1 = 0x00000000;
|
||||
RCC->APBENR2 = 0x00000000;
|
||||
|
||||
check_usb_dfu_bootloader();
|
||||
|
||||
// Set flash latency
|
||||
FLASH->ACR = (2<<FLASH_ACR_LATENCY_Pos) | FLASH_ACR_ICEN | FLASH_ACR_PRFTEN;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user