Modify include of HAL, and remove CMSIS clock configuration code, and implement UART for STM32F407Disco
This commit is contained in:
		| @@ -26,8 +26,6 @@ | ||||
|  | ||||
| #include "../board.h" | ||||
|  | ||||
| #include "stm32l4xx.h" | ||||
| #include "stm32l4xx_hal_conf.h" | ||||
| #include "stm32l4xx_hal.h" | ||||
|  | ||||
| #define LED_PORT              GPIOB | ||||
| @@ -118,6 +116,9 @@ static void SystemClock_Config(void) | ||||
|  | ||||
| void board_init(void) | ||||
| { | ||||
|   SystemClock_Config(); | ||||
|   all_rcc_clk_enable(); | ||||
|  | ||||
| #if CFG_TUSB_OS  == OPT_OS_NONE | ||||
|   // 1ms tick timer | ||||
|   SysTick_Config(SystemCoreClock / 1000); | ||||
| @@ -126,10 +127,6 @@ void board_init(void) | ||||
|   //NVIC_SetPriority(USB0_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY ); | ||||
| #endif | ||||
|  | ||||
|   SystemClock_Config(); | ||||
|   SystemCoreClockUpdate(); | ||||
|   all_rcc_clk_enable(); | ||||
|  | ||||
|   /* Enable Power Clock*/ | ||||
|   __HAL_RCC_PWR_CLK_ENABLE(); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Nathan Conrad
					Nathan Conrad