mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-12 09:17:54 -06:00
stm32: Move VTOR fixup from main() to chip specific code
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
8cb3d09484
commit
80e17b1e53
3 changed files with 10 additions and 3 deletions
|
@ -5,6 +5,7 @@
|
|||
// This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
|
||||
#include "autoconf.h" // CONFIG_CLOCK_REF_8M
|
||||
#include "board/armcm_boot.h" // VectorTable
|
||||
#include "board/irq.h" // irq_disable
|
||||
#include "board/usb_cdc.h" // usb_request_bootloader
|
||||
#include "internal.h" // enable_pclock
|
||||
|
@ -125,6 +126,10 @@ usb_request_bootloader(void)
|
|||
void
|
||||
clock_setup(void)
|
||||
{
|
||||
// The SystemInit() code alters VTOR - restore it
|
||||
SCB->VTOR = (uint32_t)VectorTable;
|
||||
|
||||
// Configure and enable PLL
|
||||
uint32_t cfgr;
|
||||
if (CONFIG_CLOCK_REF_8M) {
|
||||
// Configure 72Mhz PLL from external 8Mhz crystal (HSE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue