summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2019-10-03 13:37:10 +0700
committerhathach <[email protected]>2019-10-03 13:37:10 +0700
commit7fd68efe7b0d1fe95834828f08014ec97f1e005a (patch)
tree41295d1f229df87185c9516854143fb7dfc7df34
parent0a20e91cc972acf0ae0dcf6dae4c7bad4370c3d6 (diff)
couldn't get 32L4 running with crystal less mode
-rw-r--r--hw/bsp/stm32l476disco/stm32l476disco.c13
-rw-r--r--src/device/dcd.h2
2 files changed, 3 insertions, 12 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)
diff --git a/src/device/dcd.h b/src/device/dcd.h
index 168eb181c..bef062fb1 100644
--- a/src/device/dcd.h
+++ b/src/device/dcd.h
@@ -42,7 +42,7 @@ typedef enum
DCD_EVENT_BUS_RESET = 1,
DCD_EVENT_UNPLUGGED,
DCD_EVENT_SOF,
- DCD_EVENT_SUSPEND,
+ DCD_EVENT_SUSPEND, // TODO LPM Sleep L1 support
DCD_EVENT_RESUME,
DCD_EVENT_SETUP_RECEIVED,