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:
Damien George
2019-07-08 15:16:26 +10:00
parent c15dc2c4b9
commit 5fd62c8992
4 changed files with 15 additions and 402 deletions

View File

@@ -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();