tested all the stm32f4 board, work great

This commit is contained in:
hathach
2019-09-11 17:37:23 +07:00
parent 8a2b228c3f
commit de659be83e
7 changed files with 24 additions and 17 deletions
+2 -1
View File
@@ -83,7 +83,7 @@ static void SystemClock_Config(void)
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2);
/* Enable Power Clock */
/* Enable Power Clock */
__HAL_RCC_PWR_CLK_ENABLE();
}
@@ -117,6 +117,7 @@ void board_init(void)
HAL_GPIO_Init(BUTTON_PORT, &GPIO_InitStruct);
/* Configure USB DM and DP pins */
__HAL_RCC_GPIOA_CLK_ENABLE();
GPIO_InitStruct.Pin = (GPIO_PIN_11 | GPIO_PIN_12);
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;