Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lfmiao0
rt-thread
提交
0876c25a
R
rt-thread
项目概览
lfmiao0
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
0876c25a
编写于
3月 14, 2019
作者:
B
Bernard Xiong
提交者:
GitHub
3月 14, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2448 from misonyo/pwm
[bsp/stm32f411]add pwm driver
上级
8c230ba1
c135b34b
变更
16
展开全部
隐藏空白更改
内联
并排
Showing
16 changed file
with
492 addition
and
887 deletion
+492
-887
bsp/es32f0654/project.uvoptx
bsp/es32f0654/project.uvoptx
+13
-2
bsp/es32f0654/project.uvprojx
bsp/es32f0654/project.uvprojx
+3
-2
bsp/es32f0654/template.uvoptx
bsp/es32f0654/template.uvoptx
+13
-2
bsp/es32f0654/template.uvprojx
bsp/es32f0654/template.uvprojx
+2
-1
bsp/stm32/stm32f411-st-nucleo/.config
bsp/stm32/stm32f411-st-nucleo/.config
+7
-1
bsp/stm32/stm32f411-st-nucleo/board/CubeMX_Config/.mxproject
bsp/stm32/stm32f411-st-nucleo/board/CubeMX_Config/.mxproject
+2
-2
bsp/stm32/stm32f411-st-nucleo/board/CubeMX_Config/CubeMX_Config.ioc
...stm32f411-st-nucleo/board/CubeMX_Config/CubeMX_Config.ioc
+37
-12
bsp/stm32/stm32f411-st-nucleo/board/CubeMX_Config/Inc/main.h
bsp/stm32/stm32f411-st-nucleo/board/CubeMX_Config/Inc/main.h
+2
-0
bsp/stm32/stm32f411-st-nucleo/board/CubeMX_Config/Inc/stm32f4xx_hal_conf.h
...11-st-nucleo/board/CubeMX_Config/Inc/stm32f4xx_hal_conf.h
+1
-1
bsp/stm32/stm32f411-st-nucleo/board/CubeMX_Config/Src/main.c
bsp/stm32/stm32f411-st-nucleo/board/CubeMX_Config/Src/main.c
+74
-0
bsp/stm32/stm32f411-st-nucleo/board/CubeMX_Config/Src/stm32f4xx_hal_msp.c
...411-st-nucleo/board/CubeMX_Config/Src/stm32f4xx_hal_msp.c
+88
-1
bsp/stm32/stm32f411-st-nucleo/board/Kconfig
bsp/stm32/stm32f411-st-nucleo/board/Kconfig
+44
-0
bsp/stm32/stm32f411-st-nucleo/board/board.c
bsp/stm32/stm32f411-st-nucleo/board/board.c
+1
-2
bsp/stm32/stm32f411-st-nucleo/project.uvoptx
bsp/stm32/stm32f411-st-nucleo/project.uvoptx
+2
-758
bsp/stm32/stm32f411-st-nucleo/project.uvprojx
bsp/stm32/stm32f411-st-nucleo/project.uvprojx
+201
-102
bsp/stm32/stm32f411-st-nucleo/rtconfig.h
bsp/stm32/stm32f411-st-nucleo/rtconfig.h
+2
-1
未找到文件。
bsp/es32f0654/project.uvoptx
浏览文件 @
0876c25a
...
@@ -77,7 +77,7 @@
...
@@ -77,7 +77,7 @@
<tvExpOptDlg>
0
</tvExpOptDlg>
<tvExpOptDlg>
0
</tvExpOptDlg>
<IsCurrentTarget>
1
</IsCurrentTarget>
<IsCurrentTarget>
1
</IsCurrentTarget>
</OPTFL>
</OPTFL>
<CpuCode>
0
</CpuCode>
<CpuCode>
255
</CpuCode>
<DebugOpt>
<DebugOpt>
<uSim>
0
</uSim>
<uSim>
0
</uSim>
<uTrg>
1
</uTrg>
<uTrg>
1
</uTrg>
...
@@ -101,6 +101,8 @@
...
@@ -101,6 +101,8 @@
<sRunDeb>
0
</sRunDeb>
<sRunDeb>
0
</sRunDeb>
<sLrtime>
0
</sLrtime>
<sLrtime>
0
</sLrtime>
<bEvRecOn>
1
</bEvRecOn>
<bEvRecOn>
1
</bEvRecOn>
<bSchkAxf>
0
</bSchkAxf>
<bTchkAxf>
0
</bTchkAxf>
<nTsel>
3
</nTsel>
<nTsel>
3
</nTsel>
<sDll></sDll>
<sDll></sDll>
<sDllPa></sDllPa>
<sDllPa></sDllPa>
...
@@ -112,9 +114,14 @@
...
@@ -112,9 +114,14 @@
<tDlgDll></tDlgDll>
<tDlgDll></tDlgDll>
<tDlgPa></tDlgPa>
<tDlgPa></tDlgPa>
<tIfile></tIfile>
<tIfile></tIfile>
<pMon>
Segger\JL2CM3
.dll
</pMon>
<pMon>
BIN\CMSIS_AGDI
.dll
</pMon>
</DebugOpt>
</DebugOpt>
<TargetDriverDllRegistry>
<TargetDriverDllRegistry>
<SetRegEntry>
<Number>
0
</Number>
<Key>
CMSIS_AGDI
</Key>
<Name>
-X"" -O206 -S0 -C0 -P00 -TO18 -TC10000000 -TP20 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC1000 -FN1 -FF0ES32F065x.FLM -FS00 -FL040000 -FP0($$Device:ES32F0654LT$Flash\ES32F065x.FLM)
</Name>
</SetRegEntry>
<SetRegEntry>
<SetRegEntry>
<Number>
0
</Number>
<Number>
0
</Number>
<Key>
JL2CM3
</Key>
<Key>
JL2CM3
</Key>
...
@@ -165,6 +172,10 @@
...
@@ -165,6 +172,10 @@
<pszMrule></pszMrule>
<pszMrule></pszMrule>
<pSingCmds></pSingCmds>
<pSingCmds></pSingCmds>
<pMultCmds></pMultCmds>
<pMultCmds></pMultCmds>
<pMisraNamep></pMisraNamep>
<pszMrulep></pszMrulep>
<pSingCmdsp></pSingCmdsp>
<pMultCmdsp></pMultCmdsp>
</TargetOption>
</TargetOption>
</Target>
</Target>
...
...
bsp/es32f0654/project.uvprojx
浏览文件 @
0876c25a
...
@@ -7,11 +7,12 @@
...
@@ -7,11 +7,12 @@
<TargetName>
rt-thread
</TargetName>
<TargetName>
rt-thread
</TargetName>
<ToolsetNumber>
0x4
</ToolsetNumber>
<ToolsetNumber>
0x4
</ToolsetNumber>
<ToolsetName>
ARM-ADS
</ToolsetName>
<ToolsetName>
ARM-ADS
</ToolsetName>
<uAC6>
0
</uAC6>
<TargetOption>
<TargetOption>
<TargetCommonOption>
<TargetCommonOption>
<Device>
ES32F0654LT
</Device>
<Device>
ES32F0654LT
</Device>
<Vendor>
Eastsoft
</Vendor>
<Vendor>
Eastsoft
</Vendor>
<PackID>
Eastsoft.ES32_DFP.1.0.
1
</PackID>
<PackID>
Eastsoft.ES32_DFP.1.0.
2
</PackID>
<PackURL>
http://www.essemi.com
</PackURL>
<PackURL>
http://www.essemi.com
</PackURL>
<Cpu>
IRAM(0x20000000,0x00008000) IROM(0x00000000,0x00040000) CPUTYPE("Cortex-M0") CLOCK(12000000) ELITTLE
</Cpu>
<Cpu>
IRAM(0x20000000,0x00008000) IROM(0x00000000,0x00040000) CPUTYPE("Cortex-M0") CLOCK(12000000) ELITTLE
</Cpu>
<FlashUtilSpec
/>
<FlashUtilSpec
/>
...
@@ -365,7 +366,7 @@
...
@@ -365,7 +366,7 @@
<ScatterFile
/>
<ScatterFile
/>
<IncludeLibs
/>
<IncludeLibs
/>
<IncludeLibsPath
/>
<IncludeLibsPath
/>
<Misc
>
--keep *.o(.rti_fn.*) --keep *.o(FSymTab)
</Misc
>
<Misc
/
>
<LinkerInputFile
/>
<LinkerInputFile
/>
<DisabledWarnings
/>
<DisabledWarnings
/>
</LDads>
</LDads>
...
...
bsp/es32f0654/template.uvoptx
浏览文件 @
0876c25a
...
@@ -77,7 +77,7 @@
...
@@ -77,7 +77,7 @@
<tvExpOptDlg>
0
</tvExpOptDlg>
<tvExpOptDlg>
0
</tvExpOptDlg>
<IsCurrentTarget>
1
</IsCurrentTarget>
<IsCurrentTarget>
1
</IsCurrentTarget>
</OPTFL>
</OPTFL>
<CpuCode>
0
</CpuCode>
<CpuCode>
255
</CpuCode>
<DebugOpt>
<DebugOpt>
<uSim>
0
</uSim>
<uSim>
0
</uSim>
<uTrg>
1
</uTrg>
<uTrg>
1
</uTrg>
...
@@ -101,6 +101,8 @@
...
@@ -101,6 +101,8 @@
<sRunDeb>
0
</sRunDeb>
<sRunDeb>
0
</sRunDeb>
<sLrtime>
0
</sLrtime>
<sLrtime>
0
</sLrtime>
<bEvRecOn>
1
</bEvRecOn>
<bEvRecOn>
1
</bEvRecOn>
<bSchkAxf>
0
</bSchkAxf>
<bTchkAxf>
0
</bTchkAxf>
<nTsel>
3
</nTsel>
<nTsel>
3
</nTsel>
<sDll></sDll>
<sDll></sDll>
<sDllPa></sDllPa>
<sDllPa></sDllPa>
...
@@ -112,9 +114,14 @@
...
@@ -112,9 +114,14 @@
<tDlgDll></tDlgDll>
<tDlgDll></tDlgDll>
<tDlgPa></tDlgPa>
<tDlgPa></tDlgPa>
<tIfile></tIfile>
<tIfile></tIfile>
<pMon>
Segger\JL2CM3
.dll
</pMon>
<pMon>
BIN\CMSIS_AGDI
.dll
</pMon>
</DebugOpt>
</DebugOpt>
<TargetDriverDllRegistry>
<TargetDriverDllRegistry>
<SetRegEntry>
<Number>
0
</Number>
<Key>
CMSIS_AGDI
</Key>
<Name>
-X"" -O206 -S0 -C0 -P00 -TO18 -TC10000000 -TP20 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC1000 -FN1 -FF0ES32F065x.FLM -FS00 -FL040000 -FP0($$Device:ES32F0654LT$Flash\ES32F065x.FLM)
</Name>
</SetRegEntry>
<SetRegEntry>
<SetRegEntry>
<Number>
0
</Number>
<Number>
0
</Number>
<Key>
JL2CM3
</Key>
<Key>
JL2CM3
</Key>
...
@@ -165,6 +172,10 @@
...
@@ -165,6 +172,10 @@
<pszMrule></pszMrule>
<pszMrule></pszMrule>
<pSingCmds></pSingCmds>
<pSingCmds></pSingCmds>
<pMultCmds></pMultCmds>
<pMultCmds></pMultCmds>
<pMisraNamep></pMisraNamep>
<pszMrulep></pszMrulep>
<pSingCmdsp></pSingCmdsp>
<pMultCmdsp></pMultCmdsp>
</TargetOption>
</TargetOption>
</Target>
</Target>
...
...
bsp/es32f0654/template.uvprojx
浏览文件 @
0876c25a
...
@@ -10,11 +10,12 @@
...
@@ -10,11 +10,12 @@
<TargetName>
rt-thread
</TargetName>
<TargetName>
rt-thread
</TargetName>
<ToolsetNumber>
0x4
</ToolsetNumber>
<ToolsetNumber>
0x4
</ToolsetNumber>
<ToolsetName>
ARM-ADS
</ToolsetName>
<ToolsetName>
ARM-ADS
</ToolsetName>
<uAC6>
0
</uAC6>
<TargetOption>
<TargetOption>
<TargetCommonOption>
<TargetCommonOption>
<Device>
ES32F0654LT
</Device>
<Device>
ES32F0654LT
</Device>
<Vendor>
Eastsoft
</Vendor>
<Vendor>
Eastsoft
</Vendor>
<PackID>
Eastsoft.ES32_DFP.1.0.
1
</PackID>
<PackID>
Eastsoft.ES32_DFP.1.0.
2
</PackID>
<PackURL>
http://www.essemi.com
</PackURL>
<PackURL>
http://www.essemi.com
</PackURL>
<Cpu>
IRAM(0x20000000,0x00008000) IROM(0x00000000,0x00040000) CPUTYPE("Cortex-M0") CLOCK(12000000) ELITTLE
</Cpu>
<Cpu>
IRAM(0x20000000,0x00008000) IROM(0x00000000,0x00040000) CPUTYPE("Cortex-M0") CLOCK(12000000) ELITTLE
</Cpu>
<FlashUtilSpec></FlashUtilSpec>
<FlashUtilSpec></FlashUtilSpec>
...
...
bsp/stm32/stm32f411-st-nucleo/.config
浏览文件 @
0876c25a
...
@@ -63,7 +63,7 @@ CONFIG_RT_USING_DEVICE=y
...
@@ -63,7 +63,7 @@ CONFIG_RT_USING_DEVICE=y
CONFIG_RT_USING_CONSOLE
=
y
CONFIG_RT_USING_CONSOLE
=
y
CONFIG_RT_CONSOLEBUF_SIZE
=
128
CONFIG_RT_CONSOLEBUF_SIZE
=
128
CONFIG_RT_CONSOLE_DEVICE_NAME
=
"uart2"
CONFIG_RT_CONSOLE_DEVICE_NAME
=
"uart2"
CONFIG_RT_VER_NUM
=
0
x4000
0
CONFIG_RT_VER_NUM
=
0
x4000
1
CONFIG_ARCH_ARM
=
y
CONFIG_ARCH_ARM
=
y
CONFIG_ARCH_ARM_CORTEX_M
=
y
CONFIG_ARCH_ARM_CORTEX_M
=
y
CONFIG_ARCH_ARM_CORTEX_M4
=
y
CONFIG_ARCH_ARM_CORTEX_M4
=
y
...
@@ -113,6 +113,7 @@ CONFIG_RT_USING_DEVICE_IPC=y
...
@@ -113,6 +113,7 @@ CONFIG_RT_USING_DEVICE_IPC=y
CONFIG_RT_PIPE_BUFSZ
=
512
CONFIG_RT_PIPE_BUFSZ
=
512
CONFIG_RT_USING_SERIAL
=
y
CONFIG_RT_USING_SERIAL
=
y
# CONFIG_RT_SERIAL_USING_DMA is not set
# CONFIG_RT_SERIAL_USING_DMA is not set
CONFIG_RT_SERIAL_RB_BUFSZ
=
64
# CONFIG_RT_USING_CAN is not set
# CONFIG_RT_USING_CAN is not set
# CONFIG_RT_USING_HWTIMER is not set
# CONFIG_RT_USING_HWTIMER is not set
# CONFIG_RT_USING_CPUTIME is not set
# CONFIG_RT_USING_CPUTIME is not set
...
@@ -129,6 +130,7 @@ CONFIG_RT_USING_PIN=y
...
@@ -129,6 +130,7 @@ CONFIG_RT_USING_PIN=y
# CONFIG_RT_USING_SPI is not set
# CONFIG_RT_USING_SPI is not set
# CONFIG_RT_USING_WDT is not set
# CONFIG_RT_USING_WDT is not set
# CONFIG_RT_USING_AUDIO is not set
# CONFIG_RT_USING_AUDIO is not set
# CONFIG_RT_USING_SENSOR is not set
#
#
# Using WiFi
# Using WiFi
...
@@ -313,6 +315,7 @@ CONFIG_RT_USING_PIN=y
...
@@ -313,6 +315,7 @@ CONFIG_RT_USING_PIN=y
# CONFIG_PKG_USING_ZLIB is not set
# CONFIG_PKG_USING_ZLIB is not set
# CONFIG_PKG_USING_DSTR is not set
# CONFIG_PKG_USING_DSTR is not set
# CONFIG_PKG_USING_TINYFRAME is not set
# CONFIG_PKG_USING_TINYFRAME is not set
# CONFIG_PKG_USING_KENDRYTE_DEMO is not set
#
#
# samples: kernel and components samples
# samples: kernel and components samples
...
@@ -322,6 +325,7 @@ CONFIG_RT_USING_PIN=y
...
@@ -322,6 +325,7 @@ CONFIG_RT_USING_PIN=y
# CONFIG_PKG_USING_NETWORK_SAMPLES is not set
# CONFIG_PKG_USING_NETWORK_SAMPLES is not set
# CONFIG_PKG_USING_PERIPHERAL_SAMPLES is not set
# CONFIG_PKG_USING_PERIPHERAL_SAMPLES is not set
# CONFIG_PKG_USING_HELLO is not set
# CONFIG_PKG_USING_HELLO is not set
# CONFIG_PKG_USING_VI is not set
CONFIG_SOC_FAMILY_STM32
=
y
CONFIG_SOC_FAMILY_STM32
=
y
CONFIG_SOC_SERIES_STM32F4
=
y
CONFIG_SOC_SERIES_STM32F4
=
y
...
@@ -340,6 +344,8 @@ CONFIG_SOC_STM32F411RE=y
...
@@ -340,6 +344,8 @@ CONFIG_SOC_STM32F411RE=y
CONFIG_BSP_USING_GPIO
=
y
CONFIG_BSP_USING_GPIO
=
y
CONFIG_BSP_USING_UART
=
y
CONFIG_BSP_USING_UART
=
y
CONFIG_BSP_USING_UART2
=
y
CONFIG_BSP_USING_UART2
=
y
# CONFIG_BSP_USING_I2C1 is not set
# CONFIG_BSP_USING_PWM is not set
# CONFIG_BSP_USING_ON_CHIP_FLASH is not set
# CONFIG_BSP_USING_ON_CHIP_FLASH is not set
#
#
...
...
bsp/stm32/stm32f411-st-nucleo/board/CubeMX_Config/.mxproject
浏览文件 @
0876c25a
[PreviousGenFiles]
[PreviousGenFiles]
HeaderPath=D:/repository/
BspFramework/rt-thread
/bsp/stm32/stm32f411-st-nucleo/board/CubeMX_Config/Inc
HeaderPath=D:/repository/
rt-thread-rtt
/bsp/stm32/stm32f411-st-nucleo/board/CubeMX_Config/Inc
HeaderFiles=stm32f4xx_it.h;stm32f4xx_hal_conf.h;main.h;
HeaderFiles=stm32f4xx_it.h;stm32f4xx_hal_conf.h;main.h;
SourcePath=D:/repository/
BspFramework/rt-thread
/bsp/stm32/stm32f411-st-nucleo/board/CubeMX_Config/Src
SourcePath=D:/repository/
rt-thread-rtt
/bsp/stm32/stm32f411-st-nucleo/board/CubeMX_Config/Src
SourceFiles=stm32f4xx_it.c;stm32f4xx_hal_msp.c;main.c;
SourceFiles=stm32f4xx_it.c;stm32f4xx_hal_msp.c;main.c;
[PreviousLibFiles]
[PreviousLibFiles]
...
...
bsp/stm32/stm32f411-st-nucleo/board/CubeMX_Config/CubeMX_Config.ioc
浏览文件 @
0876c25a
...
@@ -5,28 +5,34 @@ Mcu.Family=STM32F4
...
@@ -5,28 +5,34 @@ Mcu.Family=STM32F4
Mcu.IP0=NVIC
Mcu.IP0=NVIC
Mcu.IP1=RCC
Mcu.IP1=RCC
Mcu.IP2=SYS
Mcu.IP2=SYS
Mcu.IP3=USART2
Mcu.IP3=TIM3
Mcu.IPNb=4
Mcu.IP4=USART2
Mcu.IPNb=5
Mcu.Name=STM32F411R(C-E)Tx
Mcu.Name=STM32F411R(C-E)Tx
Mcu.Package=LQFP64
Mcu.Package=LQFP64
Mcu.Pin0=PC13-ANTI_TAMP
Mcu.Pin0=PC13-ANTI_TAMP
Mcu.Pin1=PC14-OSC32_IN
Mcu.Pin1=PC14-OSC32_IN
Mcu.Pin10=PB3
Mcu.Pin10=PB0
Mcu.Pin11=VP_SYS_VS_Systick
Mcu.Pin11=PB1
Mcu.Pin12=PA13
Mcu.Pin13=PA14
Mcu.Pin14=PB3
Mcu.Pin15=VP_SYS_VS_Systick
Mcu.Pin16=VP_TIM3_VS_ClockSourceINT
Mcu.Pin2=PC15-OSC32_OUT
Mcu.Pin2=PC15-OSC32_OUT
Mcu.Pin3=PH0 - OSC_IN
Mcu.Pin3=PH0 - OSC_IN
Mcu.Pin4=PH1 - OSC_OUT
Mcu.Pin4=PH1 - OSC_OUT
Mcu.Pin5=PA2
Mcu.Pin5=PA2
Mcu.Pin6=PA3
Mcu.Pin6=PA3
Mcu.Pin7=PA5
Mcu.Pin7=PA5
Mcu.Pin8=PA
13
Mcu.Pin8=PA
6
Mcu.Pin9=PA
14
Mcu.Pin9=PA
7
Mcu.PinsNb=1
2
Mcu.PinsNb=1
7
Mcu.ThirdPartyNb=0
Mcu.ThirdPartyNb=0
Mcu.UserConstants=
Mcu.UserConstants=
Mcu.UserName=STM32F411RETx
Mcu.UserName=STM32F411RETx
MxCube.Version=5.0.
0
MxCube.Version=5.0.
1
MxDb.Version=DB.5.0.
0
MxDb.Version=DB.5.0.
1
NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:true
NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:true
NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:true
NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:true
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:true
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:true
...
@@ -55,6 +61,10 @@ PA5.GPIOParameters=GPIO_Label
...
@@ -55,6 +61,10 @@ PA5.GPIOParameters=GPIO_Label
PA5.GPIO_Label=LD2 [Green Led]
PA5.GPIO_Label=LD2 [Green Led]
PA5.Locked=true
PA5.Locked=true
PA5.Signal=GPIO_Output
PA5.Signal=GPIO_Output
PA6.Signal=S_TIM3_CH1
PA7.Signal=S_TIM3_CH2
PB0.Signal=S_TIM3_CH3
PB1.Signal=S_TIM3_CH4
PB3.GPIOParameters=GPIO_Label
PB3.GPIOParameters=GPIO_Label
PB3.GPIO_Label=SWO
PB3.GPIO_Label=SWO
PB3.Locked=true
PB3.Locked=true
...
@@ -90,8 +100,8 @@ ProjectManager.BackupPrevious=false
...
@@ -90,8 +100,8 @@ ProjectManager.BackupPrevious=false
ProjectManager.CompilerOptimize=6
ProjectManager.CompilerOptimize=6
ProjectManager.ComputerToolchain=false
ProjectManager.ComputerToolchain=false
ProjectManager.CoupleFile=false
ProjectManager.CoupleFile=false
ProjectManager.CustomerFirmwarePackage=
..\\..\\..\\..\\..\\..\\..\\..\\board\\stm32cubefx-repo\\STM32Cube_FW_F4_V1.11.0
ProjectManager.CustomerFirmwarePackage=
ProjectManager.DefaultFWLocation=
fals
e
ProjectManager.DefaultFWLocation=
tru
e
ProjectManager.DeletePrevious=true
ProjectManager.DeletePrevious=true
ProjectManager.DeviceId=STM32F411RETx
ProjectManager.DeviceId=STM32F411RETx
ProjectManager.FirmwarePackage=STM32Cube FW_F4 V1.23.0
ProjectManager.FirmwarePackage=STM32Cube FW_F4 V1.23.0
...
@@ -111,7 +121,7 @@ ProjectManager.StackSize=0x400
...
@@ -111,7 +121,7 @@ ProjectManager.StackSize=0x400
ProjectManager.TargetToolchain=MDK-ARM V5
ProjectManager.TargetToolchain=MDK-ARM V5
ProjectManager.ToolChainLocation=
ProjectManager.ToolChainLocation=
ProjectManager.UnderRoot=false
ProjectManager.UnderRoot=false
ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-SystemClock_Config-RCC-false-HAL-false,3-MX_USART2_UART_Init-USART2-false-HAL-true
ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-SystemClock_Config-RCC-false-HAL-false,3-MX_USART2_UART_Init-USART2-false-HAL-true
,4-MX_TIM3_Init-TIM3-false-HAL-true
RCC.48MHZClocksFreq_Value=42000000
RCC.48MHZClocksFreq_Value=42000000
RCC.AHBFreq_Value=84000000
RCC.AHBFreq_Value=84000000
RCC.APB1CLKDivider=RCC_HCLK_DIV2
RCC.APB1CLKDivider=RCC_HCLK_DIV2
...
@@ -147,9 +157,24 @@ RCC.VCOOutputFreq_Value=168000000
...
@@ -147,9 +157,24 @@ RCC.VCOOutputFreq_Value=168000000
RCC.VcooutputI2S=48000000
RCC.VcooutputI2S=48000000
SH.GPXTI13.0=GPIO_EXTI13
SH.GPXTI13.0=GPIO_EXTI13
SH.GPXTI13.ConfNb=1
SH.GPXTI13.ConfNb=1
SH.S_TIM3_CH1.0=TIM3_CH1,PWM Generation1 CH1
SH.S_TIM3_CH1.ConfNb=1
SH.S_TIM3_CH2.0=TIM3_CH2,PWM Generation2 CH2
SH.S_TIM3_CH2.ConfNb=1
SH.S_TIM3_CH3.0=TIM3_CH3,PWM Generation3 CH3
SH.S_TIM3_CH3.ConfNb=1
SH.S_TIM3_CH4.0=TIM3_CH4,PWM Generation4 CH4
SH.S_TIM3_CH4.ConfNb=1
TIM3.Channel-PWM\ Generation1\ CH1=TIM_CHANNEL_1
TIM3.Channel-PWM\ Generation2\ CH2=TIM_CHANNEL_2
TIM3.Channel-PWM\ Generation3\ CH3=TIM_CHANNEL_3
TIM3.Channel-PWM\ Generation4\ CH4=TIM_CHANNEL_4
TIM3.IPParameters=Channel-PWM Generation1 CH1,Channel-PWM Generation2 CH2,Channel-PWM Generation3 CH3,Channel-PWM Generation4 CH4
USART2.IPParameters=VirtualMode
USART2.IPParameters=VirtualMode
USART2.VirtualMode=VM_ASYNC
USART2.VirtualMode=VM_ASYNC
VP_SYS_VS_Systick.Mode=SysTick
VP_SYS_VS_Systick.Mode=SysTick
VP_SYS_VS_Systick.Signal=SYS_VS_Systick
VP_SYS_VS_Systick.Signal=SYS_VS_Systick
VP_TIM3_VS_ClockSourceINT.Mode=Internal
VP_TIM3_VS_ClockSourceINT.Signal=TIM3_VS_ClockSourceINT
board=NUCLEO-F411RE
board=NUCLEO-F411RE
boardIOC=true
boardIOC=true
bsp/stm32/stm32f411-st-nucleo/board/CubeMX_Config/Inc/main.h
浏览文件 @
0876c25a
...
@@ -70,6 +70,8 @@ extern "C" {
...
@@ -70,6 +70,8 @@ extern "C" {
/* USER CODE END EM */
/* USER CODE END EM */
void
HAL_TIM_MspPostInit
(
TIM_HandleTypeDef
*
htim
);
/* Exported functions prototypes ---------------------------------------------*/
/* Exported functions prototypes ---------------------------------------------*/
void
Error_Handler
(
void
);
void
Error_Handler
(
void
);
...
...
bsp/stm32/stm32f411-st-nucleo/board/CubeMX_Config/Inc/stm32f4xx_hal_conf.h
浏览文件 @
0876c25a
...
@@ -74,7 +74,7 @@
...
@@ -74,7 +74,7 @@
/* #define HAL_SD_MODULE_ENABLED */
/* #define HAL_SD_MODULE_ENABLED */
/* #define HAL_MMC_MODULE_ENABLED */
/* #define HAL_MMC_MODULE_ENABLED */
/* #define HAL_SPI_MODULE_ENABLED */
/* #define HAL_SPI_MODULE_ENABLED */
/* #define HAL_TIM_MODULE_ENABLED */
#define HAL_TIM_MODULE_ENABLED
#define HAL_UART_MODULE_ENABLED
#define HAL_UART_MODULE_ENABLED
/* #define HAL_USART_MODULE_ENABLED */
/* #define HAL_USART_MODULE_ENABLED */
/* #define HAL_IRDA_MODULE_ENABLED */
/* #define HAL_IRDA_MODULE_ENABLED */
...
...
bsp/stm32/stm32f411-st-nucleo/board/CubeMX_Config/Src/main.c
浏览文件 @
0876c25a
...
@@ -62,6 +62,8 @@
...
@@ -62,6 +62,8 @@
/* USER CODE END PM */
/* USER CODE END PM */
/* Private variables ---------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
TIM_HandleTypeDef
htim3
;
UART_HandleTypeDef
huart2
;
UART_HandleTypeDef
huart2
;
/* USER CODE BEGIN PV */
/* USER CODE BEGIN PV */
...
@@ -72,6 +74,7 @@ UART_HandleTypeDef huart2;
...
@@ -72,6 +74,7 @@ UART_HandleTypeDef huart2;
void
SystemClock_Config
(
void
);
void
SystemClock_Config
(
void
);
static
void
MX_GPIO_Init
(
void
);
static
void
MX_GPIO_Init
(
void
);
static
void
MX_USART2_UART_Init
(
void
);
static
void
MX_USART2_UART_Init
(
void
);
static
void
MX_TIM3_Init
(
void
);
/* USER CODE BEGIN PFP */
/* USER CODE BEGIN PFP */
/* USER CODE END PFP */
/* USER CODE END PFP */
...
@@ -110,6 +113,7 @@ int main(void)
...
@@ -110,6 +113,7 @@ int main(void)
/* Initialize all configured peripherals */
/* Initialize all configured peripherals */
MX_GPIO_Init
();
MX_GPIO_Init
();
MX_USART2_UART_Init
();
MX_USART2_UART_Init
();
MX_TIM3_Init
();
/* USER CODE BEGIN 2 */
/* USER CODE BEGIN 2 */
/* USER CODE END 2 */
/* USER CODE END 2 */
...
@@ -167,6 +171,76 @@ void SystemClock_Config(void)
...
@@ -167,6 +171,76 @@ void SystemClock_Config(void)
}
}
}
}
/**
* @brief TIM3 Initialization Function
* @param None
* @retval None
*/
static
void
MX_TIM3_Init
(
void
)
{
/* USER CODE BEGIN TIM3_Init 0 */
/* USER CODE END TIM3_Init 0 */
TIM_ClockConfigTypeDef
sClockSourceConfig
=
{
0
};
TIM_MasterConfigTypeDef
sMasterConfig
=
{
0
};
TIM_OC_InitTypeDef
sConfigOC
=
{
0
};
/* USER CODE BEGIN TIM3_Init 1 */
/* USER CODE END TIM3_Init 1 */
htim3
.
Instance
=
TIM3
;
htim3
.
Init
.
Prescaler
=
0
;
htim3
.
Init
.
CounterMode
=
TIM_COUNTERMODE_UP
;
htim3
.
Init
.
Period
=
0
;
htim3
.
Init
.
ClockDivision
=
TIM_CLOCKDIVISION_DIV1
;
if
(
HAL_TIM_Base_Init
(
&
htim3
)
!=
HAL_OK
)
{
Error_Handler
();
}
sClockSourceConfig
.
ClockSource
=
TIM_CLOCKSOURCE_INTERNAL
;
if
(
HAL_TIM_ConfigClockSource
(
&
htim3
,
&
sClockSourceConfig
)
!=
HAL_OK
)
{
Error_Handler
();
}
if
(
HAL_TIM_PWM_Init
(
&
htim3
)
!=
HAL_OK
)
{
Error_Handler
();
}
sMasterConfig
.
MasterOutputTrigger
=
TIM_TRGO_RESET
;
sMasterConfig
.
MasterSlaveMode
=
TIM_MASTERSLAVEMODE_DISABLE
;
if
(
HAL_TIMEx_MasterConfigSynchronization
(
&
htim3
,
&
sMasterConfig
)
!=
HAL_OK
)
{
Error_Handler
();
}
sConfigOC
.
OCMode
=
TIM_OCMODE_PWM1
;
sConfigOC
.
Pulse
=
0
;
sConfigOC
.
OCPolarity
=
TIM_OCPOLARITY_HIGH
;
sConfigOC
.
OCFastMode
=
TIM_OCFAST_DISABLE
;
if
(
HAL_TIM_PWM_ConfigChannel
(
&
htim3
,
&
sConfigOC
,
TIM_CHANNEL_1
)
!=
HAL_OK
)
{
Error_Handler
();
}
if
(
HAL_TIM_PWM_ConfigChannel
(
&
htim3
,
&
sConfigOC
,
TIM_CHANNEL_2
)
!=
HAL_OK
)
{
Error_Handler
();
}
if
(
HAL_TIM_PWM_ConfigChannel
(
&
htim3
,
&
sConfigOC
,
TIM_CHANNEL_3
)
!=
HAL_OK
)
{
Error_Handler
();
}
if
(
HAL_TIM_PWM_ConfigChannel
(
&
htim3
,
&
sConfigOC
,
TIM_CHANNEL_4
)
!=
HAL_OK
)
{
Error_Handler
();
}
/* USER CODE BEGIN TIM3_Init 2 */
/* USER CODE END TIM3_Init 2 */
HAL_TIM_MspPostInit
(
&
htim3
);
}
/**
/**
* @brief USART2 Initialization Function
* @brief USART2 Initialization Function
* @param None
* @param None
...
...
bsp/stm32/stm32f411-st-nucleo/board/CubeMX_Config/Src/stm32f4xx_hal_msp.c
浏览文件 @
0876c25a
...
@@ -78,7 +78,9 @@
...
@@ -78,7 +78,9 @@
/* USER CODE BEGIN 0 */
/* USER CODE BEGIN 0 */
/* USER CODE END 0 */
/* USER CODE END 0 */
/**
void
HAL_TIM_MspPostInit
(
TIM_HandleTypeDef
*
htim
);
/**
* Initializes the Global MSP.
* Initializes the Global MSP.
*/
*/
void
HAL_MspInit
(
void
)
void
HAL_MspInit
(
void
)
...
@@ -99,6 +101,91 @@ void HAL_MspInit(void)
...
@@ -99,6 +101,91 @@ void HAL_MspInit(void)
/* USER CODE END MspInit 1 */
/* USER CODE END MspInit 1 */
}
}
/**
* @brief TIM_Base MSP Initialization
* This function configures the hardware resources used in this example
* @param htim_base: TIM_Base handle pointer
* @retval None
*/
void
HAL_TIM_Base_MspInit
(
TIM_HandleTypeDef
*
htim_base
)
{
if
(
htim_base
->
Instance
==
TIM3
)
{
/* USER CODE BEGIN TIM3_MspInit 0 */
/* USER CODE END TIM3_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_TIM3_CLK_ENABLE
();
/* USER CODE BEGIN TIM3_MspInit 1 */
/* USER CODE END TIM3_MspInit 1 */
}
}
void
HAL_TIM_MspPostInit
(
TIM_HandleTypeDef
*
htim
)
{
GPIO_InitTypeDef
GPIO_InitStruct
=
{
0
};
if
(
htim
->
Instance
==
TIM3
)
{
/* USER CODE BEGIN TIM3_MspPostInit 0 */
/* USER CODE END TIM3_MspPostInit 0 */
__HAL_RCC_GPIOA_CLK_ENABLE
();
__HAL_RCC_GPIOB_CLK_ENABLE
();
/**TIM3 GPIO Configuration
PA6 ------> TIM3_CH1
PA7 ------> TIM3_CH2
PB0 ------> TIM3_CH3
PB1 ------> TIM3_CH4
*/
GPIO_InitStruct
.
Pin
=
GPIO_PIN_6
|
GPIO_PIN_7
;
GPIO_InitStruct
.
Mode
=
GPIO_MODE_AF_PP
;
GPIO_InitStruct
.
Pull
=
GPIO_NOPULL
;
GPIO_InitStruct
.
Speed
=
GPIO_SPEED_FREQ_LOW
;
GPIO_InitStruct
.
Alternate
=
GPIO_AF2_TIM3
;
HAL_GPIO_Init
(
GPIOA
,
&
GPIO_InitStruct
);
GPIO_InitStruct
.
Pin
=
GPIO_PIN_0
|
GPIO_PIN_1
;
GPIO_InitStruct
.
Mode
=
GPIO_MODE_AF_PP
;
GPIO_InitStruct
.
Pull
=
GPIO_NOPULL
;
GPIO_InitStruct
.
Speed
=
GPIO_SPEED_FREQ_LOW
;
GPIO_InitStruct
.
Alternate
=
GPIO_AF2_TIM3
;
HAL_GPIO_Init
(
GPIOB
,
&
GPIO_InitStruct
);
/* USER CODE BEGIN TIM3_MspPostInit 1 */
/* USER CODE END TIM3_MspPostInit 1 */
}
}
/**
* @brief TIM_Base MSP De-Initialization
* This function freeze the hardware resources used in this example
* @param htim_base: TIM_Base handle pointer
* @retval None
*/
void
HAL_TIM_Base_MspDeInit
(
TIM_HandleTypeDef
*
htim_base
)
{
if
(
htim_base
->
Instance
==
TIM3
)
{
/* USER CODE BEGIN TIM3_MspDeInit 0 */
/* USER CODE END TIM3_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_TIM3_CLK_DISABLE
();
/* USER CODE BEGIN TIM3_MspDeInit 1 */
/* USER CODE END TIM3_MspDeInit 1 */
}
}
/**
/**
* @brief UART MSP Initialization
* @brief UART MSP Initialization
* This function configures the hardware resources used in this example
* This function configures the hardware resources used in this example
...
...
bsp/stm32/stm32f411-st-nucleo/board/Kconfig
浏览文件 @
0876c25a
...
@@ -31,6 +31,50 @@ menu "On-chip Peripheral Drivers"
...
@@ -31,6 +31,50 @@ menu "On-chip Peripheral Drivers"
default n
default n
endif
endif
menuconfig BSP_USING_I2C1
bool "Enable I2C1 BUS (software simulation)"
default n
select RT_USING_I2C
select RT_USING_I2C_BITOPS
select RT_USING_PIN
if BSP_USING_I2C1
config BSP_I2C1_SCL_PIN
int "i2c1 scl pin number"
range 0 80
default 30
config BSP_I2C1_SDA_PIN
int "I2C1 sda pin number"
range 0 80
default 31
endif
menuconfig BSP_USING_PWM
bool "Enable pwm"
default n
select RT_USING_PWM
if BSP_USING_PWM
menuconfig BSP_USING_PWM3
bool "Enable timer3 output pwm"
default n
if BSP_USING_PWM3
config BSP_USING_PWM3_CH1
bool "Enable PWM3 channel1 (PA6)"
default n
config BSP_USING_PWM3_CH2
bool "Enable PWM3 channel2 (PA7)"
default n
config BSP_USING_PWM3_CH3
bool "Enable PWM3 channel3 (PB0)"
default n
config BSP_USING_PWM3_CH4
bool "Enable PWM3 channel4 (PB1)"
default n
endif
endif
config BSP_USING_ON_CHIP_FLASH
config BSP_USING_ON_CHIP_FLASH
bool "Enable on-chip FLASH"
bool "Enable on-chip FLASH"
default n
default n
...
...
bsp/stm32/stm32f411-st-nucleo/board/board.c
浏览文件 @
0876c25a
...
@@ -21,9 +21,8 @@ void SystemClock_Config(void)
...
@@ -21,9 +21,8 @@ void SystemClock_Config(void)
__HAL_PWR_VOLTAGESCALING_CONFIG
(
PWR_REGULATOR_VOLTAGE_SCALE1
);
__HAL_PWR_VOLTAGESCALING_CONFIG
(
PWR_REGULATOR_VOLTAGE_SCALE1
);
/**Initializes the CPU, AHB and APB busses clocks
/**Initializes the CPU, AHB and APB busses clocks
*/
*/
RCC_OscInitStruct
.
OscillatorType
=
RCC_OSCILLATORTYPE_
LSI
|
RCC_OSCILLATORTYPE_
HSE
;
RCC_OscInitStruct
.
OscillatorType
=
RCC_OSCILLATORTYPE_HSE
;
RCC_OscInitStruct
.
HSEState
=
RCC_HSE_BYPASS
;
RCC_OscInitStruct
.
HSEState
=
RCC_HSE_BYPASS
;
RCC_OscInitStruct
.
LSIState
=
RCC_LSI_ON
;
RCC_OscInitStruct
.
PLL
.
PLLState
=
RCC_PLL_ON
;
RCC_OscInitStruct
.
PLL
.
PLLState
=
RCC_PLL_ON
;
RCC_OscInitStruct
.
PLL
.
PLLSource
=
RCC_PLLSOURCE_HSE
;
RCC_OscInitStruct
.
PLL
.
PLLSource
=
RCC_PLLSOURCE_HSE
;
RCC_OscInitStruct
.
PLL
.
PLLM
=
4
;
RCC_OscInitStruct
.
PLL
.
PLLM
=
4
;
...
...
bsp/stm32/stm32f411-st-nucleo/project.uvoptx
浏览文件 @
0876c25a
此差异已折叠。
点击以展开。
bsp/stm32/stm32f411-st-nucleo/project.uvprojx
浏览文件 @
0876c25a
此差异已折叠。
点击以展开。
bsp/stm32/stm32f411-st-nucleo/rtconfig.h
浏览文件 @
0876c25a
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
#define RT_USING_CONSOLE
#define RT_USING_CONSOLE
#define RT_CONSOLEBUF_SIZE 128
#define RT_CONSOLEBUF_SIZE 128
#define RT_CONSOLE_DEVICE_NAME "uart2"
#define RT_CONSOLE_DEVICE_NAME "uart2"
#define RT_VER_NUM 0x4000
0
#define RT_VER_NUM 0x4000
1
#define ARCH_ARM
#define ARCH_ARM
#define ARCH_ARM_CORTEX_M
#define ARCH_ARM_CORTEX_M
#define ARCH_ARM_CORTEX_M4
#define ARCH_ARM_CORTEX_M4
...
@@ -78,6 +78,7 @@
...
@@ -78,6 +78,7 @@
#define RT_USING_DEVICE_IPC
#define RT_USING_DEVICE_IPC
#define RT_PIPE_BUFSZ 512
#define RT_PIPE_BUFSZ 512
#define RT_USING_SERIAL
#define RT_USING_SERIAL
#define RT_SERIAL_RB_BUFSZ 64
#define RT_USING_PIN
#define RT_USING_PIN
/* Using WiFi */
/* Using WiFi */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录