mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 19:20:22 +01:00
stm32: Remove SystemInit funcs, use stm32lib versions instead.
stm32lib now provides system_stm32XXxx.c source files for all MCU variants, which includes SystemInit and prescaler tables. Since these are quite standard and don't need to be changed, switch to use them instead of custom variants, making the start-up code cleaner. The SystemInit code in stm32lib was checked and is equivalent to what is removed from the stm32 port in this commit.
This commit is contained in:
@@ -368,6 +368,14 @@ STATIC uint update_reset_mode(uint reset_mode) {
|
||||
#endif
|
||||
|
||||
void stm32_main(uint32_t reset_mode) {
|
||||
#if !defined(STM32F0) && defined(MICROPY_HW_VTOR)
|
||||
// Change IRQ vector table if configured differently
|
||||
SCB->VTOR = MICROPY_HW_VTOR;
|
||||
#endif
|
||||
|
||||
// Enable 8-byte stack alignment for IRQ handlers, in accord with EABI
|
||||
SCB->CCR |= SCB_CCR_STKALIGN_Msk;
|
||||
|
||||
// Check if bootloader should be entered instead of main application
|
||||
powerctrl_check_enter_bootloader();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user