AT32F403: Increase core clock speed to 144MHz.

This commit is contained in:
Keir Fraser
2021-06-21 10:54:30 +01:00
parent c894f9f02b
commit 9dac3e110e
4 changed files with 18 additions and 5 deletions

View File

@@ -17,3 +17,9 @@ void identify_board_config(void);
void early_fatal(int blinks) __attribute__((noreturn));
#define early_delay_ms(ms) (delay_ticks((ms)*1000))
#define early_delay_us(us) (delay_ticks((us)*1))
#undef SYSCLK_MHZ
#define SYSCLK_MHZ 144
#define AHB_MHZ (SYSCLK_MHZ / 1) /* 144MHz */
#define APB1_MHZ (SYSCLK_MHZ / 2) /* 72MHz */
#define APB2_MHZ (SYSCLK_MHZ / 2) /* 72MHz */

View File

@@ -1,4 +1,10 @@
#include "../stm32/f1_regs.h"
#define RCC_CFGR_PLLRANGE_GT72MHZ (1u<<31)
#define RCC_CFGR_PLLMUL_18 ((uint32_t)0x20040000)
#define RCC_CFGR_USBPSC_3 ((uint32_t)0x08400000)
#define RCC_CFGR_APB2PSC_2 (4u<<11)
#define RCC_CFGR_APB1PSC_2 (4u<< 8)
#define TIM_CR1_PMEN (1u<<10)