summaryrefslogtreecommitdiff
path: root/bsp
diff options
context:
space:
mode:
authorluhuadong <[email protected]>2020-04-24 21:58:06 +0800
committerluhuadong <[email protected]>2020-04-24 21:58:06 +0800
commitdb327dc2e6736843a41012b3903df2dd69cc432a (patch)
tree20f76b72fba39f8e0c44ba105b0c285e43b9bc01 /bsp
parentae724e447f951a1406f3dab75ffe84fc4a29072d (diff)
[BSP] Adjust RCC for stm32l412-st-nucleo BSP
Diffstat (limited to 'bsp')
-rw-r--r--bsp/stm32/stm32l412-st-nucleo/README.md2
-rw-r--r--bsp/stm32/stm32l412-st-nucleo/applications/main.c12
-rw-r--r--bsp/stm32/stm32l412-st-nucleo/board/board.c3
3 files changed, 8 insertions, 9 deletions
diff --git a/bsp/stm32/stm32l412-st-nucleo/README.md b/bsp/stm32/stm32l412-st-nucleo/README.md
index 73b83e6fee..ce4af7d1f8 100644
--- a/bsp/stm32/stm32l412-st-nucleo/README.md
+++ b/bsp/stm32/stm32l412-st-nucleo/README.md
@@ -86,7 +86,7 @@ USB 虚拟 COM 端口默认连接串口 2,在终端工具里打开相应的串
```bash
\ | /
- RT - Thread Operating System
- / | \ 4.0.0 build Jan 9 2020
+ / | \ 4.0.3 build Apr 24 2020
2006 - 2020 Copyright by rt-thread team
msh >
```
diff --git a/bsp/stm32/stm32l412-st-nucleo/applications/main.c b/bsp/stm32/stm32l412-st-nucleo/applications/main.c
index ad5174ccb7..2511e7a3bc 100644
--- a/bsp/stm32/stm32l412-st-nucleo/applications/main.c
+++ b/bsp/stm32/stm32l412-st-nucleo/applications/main.c
@@ -12,20 +12,20 @@
#include <rtdevice.h>
#include <board.h>
-/* defined the LED0 pin: PB3 */
-#define LED0_PIN GET_PIN(B, 3)
+/* defined the LD4 pin: PB13 */
+#define LD4_PIN GET_PIN(B, 13)
int main(void)
{
int count = 1;
- /* set LED0 pin mode to output */
- rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
+ /* set LD4 pin mode to output */
+ rt_pin_mode(LD4_PIN, PIN_MODE_OUTPUT);
while (count++)
{
- rt_pin_write(LED0_PIN, PIN_HIGH);
+ rt_pin_write(LD4_PIN, PIN_HIGH);
rt_thread_mdelay(500);
- rt_pin_write(LED0_PIN, PIN_LOW);
+ rt_pin_write(LD4_PIN, PIN_LOW);
rt_thread_mdelay(500);
}
diff --git a/bsp/stm32/stm32l412-st-nucleo/board/board.c b/bsp/stm32/stm32l412-st-nucleo/board/board.c
index f1896c3dc5..70a17da702 100644
--- a/bsp/stm32/stm32l412-st-nucleo/board/board.c
+++ b/bsp/stm32/stm32l412-st-nucleo/board/board.c
@@ -33,8 +33,7 @@ void SystemClock_Config(void)
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_MSI;
RCC_OscInitStruct.PLL.PLLM = 1;
- RCC_OscInitStruct.PLL.PLLN = 16;
- RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV7;
+ RCC_OscInitStruct.PLL.PLLN = 40;
RCC_OscInitStruct.PLL.PLLQ = RCC_PLLQ_DIV2;
RCC_OscInitStruct.PLL.PLLR = RCC_PLLR_DIV2;
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)