mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-19 04:37:54 -06:00
stm32: stm32g0/h7 usb_dfu_bootloader support (#5596)
Signed-off-by: Alan.Ma from BigTreeTech <tech@biqu3d.com>
This commit is contained in:
parent
167736ad1c
commit
1636a9759b
3 changed files with 36 additions and 2 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue