diff options
| author | hathach <[email protected]> | 2019-10-03 13:37:10 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2019-10-03 13:37:10 +0700 |
| commit | 7fd68efe7b0d1fe95834828f08014ec97f1e005a (patch) | |
| tree | 41295d1f229df87185c9516854143fb7dfc7df34 /hw | |
| parent | 0a20e91cc972acf0ae0dcf6dae4c7bad4370c3d6 (diff) | |
couldn't get 32L4 running with crystal less mode
Diffstat (limited to 'hw')
| -rw-r--r-- | hw/bsp/stm32l476disco/stm32l476disco.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/hw/bsp/stm32l476disco/stm32l476disco.c b/hw/bsp/stm32l476disco/stm32l476disco.c index ab8f13226..8e01814c6 100644 --- a/hw/bsp/stm32l476disco/stm32l476disco.c +++ b/hw/bsp/stm32l476disco/stm32l476disco.c @@ -28,6 +28,7 @@ #include "stm32l4xx.h" #include "stm32l4xx_hal_conf.h" +#include "stm32l4xx_hal.h" #define LED_PORT GPIOB #define LED_PIN GPIO_PIN_2 @@ -117,8 +118,6 @@ void board_init(void) SystemClock_Config(); - HAL_RCC_MCOConfig(RCC_MCO1, RCC_MCO1SOURCE_MSI, RCC_MCODIV_1);//RCC_MCO1SOURCE_SYSCLK - /* Enable Power Clock*/ __HAL_RCC_PWR_CLK_ENABLE(); @@ -165,20 +164,12 @@ void board_init(void) GPIO_InitStruct.Pull = GPIO_NOPULL; HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); - /* This for ID line */ - GPIO_InitStruct.Pin = GPIO_PIN_12; - GPIO_InitStruct.Mode = GPIO_MODE_AF_OD; - GPIO_InitStruct.Pull = GPIO_PULLUP; - GPIO_InitStruct.Speed = GPIO_SPEED_HIGH; - GPIO_InitStruct.Alternate = GPIO_AF10_OTG_FS; - HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); - /* Enable USB FS Clock */ __HAL_RCC_USB_OTG_FS_CLK_ENABLE(); } //--------------------------------------------------------------------+ -// Board porting API +// board porting API //--------------------------------------------------------------------+ void board_led_write(bool state) |
