Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2301_76519099
rt-thread
提交
a0636e4f
R
rt-thread
项目概览
2301_76519099
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
3
Star
1
Fork
1
代码
文件
提交
分支
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,发现更多精彩内容 >>
未验证
提交
a0636e4f
编写于
2月 01, 2019
作者:
B
Bernard Xiong
提交者:
GitHub
2月 01, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2283 from jinsheng20/stm32f746-disco
Stm32f746 disco
上级
48aa2975
57036d8d
变更
15
展开全部
隐藏空白更改
内联
并排
Showing
15 changed file
with
491 addition
and
884 deletion
+491
-884
bsp/stm32/stm32f746-st-disco/.config
bsp/stm32/stm32f746-st-disco/.config
+4
-23
bsp/stm32/stm32f746-st-disco/README.md
bsp/stm32/stm32f746-st-disco/README.md
+7
-4
bsp/stm32/stm32f746-st-disco/board/CubeMX_Config/.mxproject
bsp/stm32/stm32f746-st-disco/board/CubeMX_Config/.mxproject
+2
-2
bsp/stm32/stm32f746-st-disco/board/CubeMX_Config/CubeMX_Config.ioc
.../stm32f746-st-disco/board/CubeMX_Config/CubeMX_Config.ioc
+51
-15
bsp/stm32/stm32f746-st-disco/board/CubeMX_Config/Inc/stm32f7xx_hal_conf.h
...746-st-disco/board/CubeMX_Config/Inc/stm32f7xx_hal_conf.h
+1
-1
bsp/stm32/stm32f746-st-disco/board/CubeMX_Config/Src/main.c
bsp/stm32/stm32f746-st-disco/board/CubeMX_Config/Src/main.c
+58
-0
bsp/stm32/stm32f746-st-disco/board/CubeMX_Config/Src/stm32f7xx_hal_msp.c
...f746-st-disco/board/CubeMX_Config/Src/stm32f7xx_hal_msp.c
+103
-0
bsp/stm32/stm32f746-st-disco/board/Kconfig
bsp/stm32/stm32f746-st-disco/board/Kconfig
+11
-1
bsp/stm32/stm32f746-st-disco/board/SConscript
bsp/stm32/stm32f746-st-disco/board/SConscript
+3
-0
bsp/stm32/stm32f746-st-disco/board/ports/drv_qspi_flash.c
bsp/stm32/stm32f746-st-disco/board/ports/drv_qspi_flash.c
+77
-0
bsp/stm32/stm32f746-st-disco/project.ewp
bsp/stm32/stm32f746-st-disco/project.ewp
+8
-6
bsp/stm32/stm32f746-st-disco/project.uvoptx
bsp/stm32/stm32f746-st-disco/project.uvoptx
+1
-769
bsp/stm32/stm32f746-st-disco/project.uvprojx
bsp/stm32/stm32f746-st-disco/project.uvprojx
+160
-58
bsp/stm32/stm32f746-st-disco/rtconfig.h
bsp/stm32/stm32f746-st-disco/rtconfig.h
+0
-5
bsp/stm32/stm32f746-st-disco/template.uvoptx
bsp/stm32/stm32f746-st-disco/template.uvoptx
+5
-0
未找到文件。
bsp/stm32/stm32f746-st-disco/.config
浏览文件 @
a0636e4f
...
...
@@ -206,6 +206,7 @@ CONFIG_RT_USING_PIN=y
# CONFIG_PKG_USING_LJSON is not set
# CONFIG_PKG_USING_EZXML is not set
# CONFIG_PKG_USING_NANOPB is not set
# CONFIG_PKG_USING_GAGENT_CLOUD is not set
#
# Wi-Fi
...
...
@@ -223,15 +224,7 @@ CONFIG_RT_USING_PIN=y
# CONFIG_PKG_USING_COAP is not set
# CONFIG_PKG_USING_NOPOLL is not set
# CONFIG_PKG_USING_NETUTILS is not set
# CONFIG_PKG_USING_AT_DEVICE is not set
#
# IoT Cloud
#
# CONFIG_PKG_USING_ONENET is not set
# CONFIG_PKG_USING_GAGENT_CLOUD is not set
# CONFIG_PKG_USING_ALI_IOTKIT is not set
# CONFIG_PKG_USING_AZURE is not set
#
# security packages
...
...
@@ -243,7 +236,6 @@ CONFIG_RT_USING_PIN=y
#
# language packages
#
# CONFIG_PKG_USING_LUA is not set
# CONFIG_PKG_USING_JERRYSCRIPT is not set
# CONFIG_PKG_USING_MICROPYTHON is not set
...
...
@@ -281,16 +273,10 @@ CONFIG_RT_USING_PIN=y
# CONFIG_PKG_USING_STM32F4_HAL is not set
# CONFIG_PKG_USING_STM32F4_DRIVERS is not set
# CONFIG_PKG_USING_REALTEK_AMEBA is not set
# CONFIG_PKG_USING_SHT2X is not set
# CONFIG_PKG_USING_AHT10 is not set
# CONFIG_PKG_USING_AP3216C is not set
# CONFIG_PKG_USING_STM32_SDIO is not set
#
# miscellaneous packages
#
# CONFIG_PKG_USING_LIBCSV is not set
# CONFIG_PKG_USING_OPTPARSE is not set
# CONFIG_PKG_USING_FASTLZ is not set
# CONFIG_PKG_USING_MINILZO is not set
# CONFIG_PKG_USING_QUICKLZ is not set
...
...
@@ -302,14 +288,7 @@ CONFIG_RT_USING_PIN=y
#
# sample package
#
#
# samples: kernel and components samples
#
# CONFIG_PKG_USING_KERNEL_SAMPLES is not set
# CONFIG_PKG_USING_FILESYSTEM_SAMPLES is not set
# CONFIG_PKG_USING_NETWORK_SAMPLES is not set
# CONFIG_PKG_USING_PERIPHERAL_SAMPLES is not set
# CONFIG_PKG_USING_SAMPLES is not set
#
# example package: hello
...
...
@@ -327,6 +306,7 @@ CONFIG_SOC_STM32F746NG=y
# Onboard Peripheral Drivers
#
CONFIG_BSP_USING_USB_TO_USART
=
y
# CONFIG_BSP_USING_QSPI_FLASH is not set
#
# On-chip Peripheral Drivers
...
...
@@ -335,6 +315,7 @@ CONFIG_BSP_USING_GPIO=y
CONFIG_BSP_USING_UART
=
y
CONFIG_BSP_USING_UART1
=
y
# CONFIG_BSP_UART1_RX_USING_DMA is not set
# CONFIG_BSP_USING_QSPI is not set
#
# Board extended module Drivers
...
...
bsp/stm32/stm32f746-st-disco/README.md
浏览文件 @
a0636e4f
...
...
@@ -35,21 +35,23 @@ STM32F746-disco 是 ST 推出的一款基于 ARM Cortex-M7 内核的开发板,
## 外设支持
本 BSP 目前对外设的支持情况如下:
|
**板载外设**
|
**支持情况**
|
**备注**
|
| :----------------- | :----------: | :------------------------------------- |
| USB 转串口 | 支持 | UART1 |
| QSPI Flash |
暂不
支持 | |
| QSPI Flash | 支持 | |
| 以太网 | 暂不支持 | |
| SDRAM | 暂不支持 | |
| SD卡 | 暂不支持 | |
| 4.3寸电容屏 | 暂不支持 | |
| MEMS麦克风 | 暂不支持 | |
|
**片上外设**
|
**支持情况**
|
**备注**
|
| :------------
| :----------: | :-----------------------------------:
|
| :------------
----- | :----------: | :-------------------------------------
|
| GPIO | 支持 | PA0, PA1... PK7 ---> PIN: 0, 1...168 |
| UART | 支持 | UART1 |
| SPI | 暂不支持 | 即将支持 |
| QSPI |
暂不支持 | 即将支持
|
| QSPI |
支持 | QSPI1
|
| I2C | 暂不支持 | 即将支持 |
| FLASH | 暂不支持 | 即将支持 |
| WDT | 暂不支持 | 即将支持 |
...
...
@@ -94,10 +96,11 @@ STM32F746-disco 是 ST 推出的一款基于 ARM Cortex-M7 内核的开发板,
```
bash
\
| /
- RT - Thread Operating System
/ |
\
4.0.0 build
Dec 10 2018
/ |
\
4.0.0 build
Jan 30 2019
2006 - 2018 Copyright by rt-thread team
msh
>
```
### 进阶使用
此 BSP 默认只开启了 GPIO 和 串口1 的功能,更多高级功能,需要利用 ENV 工具对 BSP 进行配置,步骤如下:
...
...
bsp/stm32/stm32f746-st-disco/board/CubeMX_Config/.mxproject
浏览文件 @
a0636e4f
...
...
@@ -5,9 +5,9 @@ SourcePath=E:/rt-thread/bsp/stm32/stm32f746-st-disco/board/CubeMX_Config/Src
SourceFiles=stm32f7xx_it.c;stm32f7xx_hal_msp.c;main.c;
[PreviousLibFiles]
LibFiles=Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_cortex.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_
tim.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_tim_ex.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_uart.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_uart_ex.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_rcc.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_rcc_ex.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_flash.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_flash_ex.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_gpio.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_gpio_ex.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_dma.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_dma_ex.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_pwr.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_pwr_ex.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_def.h;Drivers/STM32F7xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_i2c.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_i2c_ex.h;Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_cortex.c;Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_tim.c;Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_tim_ex.c;Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_uart.c;Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_rcc.c;Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_rcc_ex.c;Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_flash.c;Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_flash_ex.c;Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_gpio.c;Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_dma.c;Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_dma_ex.c;Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_pwr.c;Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_pwr_ex.c;Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal.c;Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_i2c.c;Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_i2c_ex.c;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_cortex
.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_tim.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_tim_ex.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_uart.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_uart_ex.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_rcc.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_rcc_ex.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_flash.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_flash_ex.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_gpio.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_gpio_ex.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_dma.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_dma_ex.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_pwr.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_pwr_ex.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_def.h;Drivers/STM32F7xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_i2c.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_i2c_ex.h;Drivers/CMSIS/Device/ST/STM32F7xx/Include/stm32f746xx.h;Drivers/CMSIS/Device/ST/STM32F7xx/Include/stm32f7xx.h;Drivers/CMSIS/Device/ST/STM32F7xx/Include/system_stm32f7xx.h;Drivers/CMSIS/Device/ST/STM32F7xx/Source/Templates/system_stm32f7xx.c;Drivers/CMSIS/Include/arm_common_tables.h;Drivers/CMSIS/Include/arm_const_structs.h;Drivers/CMSIS/Include/arm_math.h;Drivers/CMSIS/Include/cmsis_armcc.h;Drivers/CMSIS/Include/cmsis_armcc_V6.h;Drivers/CMSIS/Include/cmsis_gcc.h;Drivers/CMSIS/Include/core_cm0.h;Drivers/CMSIS/Include/core_cm0plus.h;Drivers/CMSIS/Include/core_cm3.h;Drivers/CMSIS/Include/core_cm4.h;Drivers/CMSIS/Include/core_cm7.h;Drivers/CMSIS/Include/core_cmFunc.h;Drivers/CMSIS/Include/core_cmInstr.h;Drivers/CMSIS/Include/core_cmSimd.h;Drivers/CMSIS/Include/core_sc000.h;Drivers/CMSIS/Include/core_sc300.h;
LibFiles=Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_cortex.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_
qspi.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_tim.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_tim_ex.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_uart.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_uart_ex.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_rcc.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_rcc_ex.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_flash.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_flash_ex.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_gpio.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_gpio_ex.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_dma.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_dma_ex.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_pwr.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_pwr_ex.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_def.h;Drivers/STM32F7xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_i2c.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_i2c_ex.h;Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_cortex.c;Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_qspi.c;Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_tim.c;Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_tim_ex.c;Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_uart.c;Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_rcc.c;Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_rcc_ex.c;Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_flash.c;Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_flash_ex.c;Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_gpio.c;Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_dma.c;Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_dma_ex.c;Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_pwr.c;Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_pwr_ex.c;Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal.c;Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_i2c.c;Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_i2c_ex.c;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_cortex.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_qspi
.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_tim.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_tim_ex.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_uart.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_uart_ex.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_rcc.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_rcc_ex.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_flash.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_flash_ex.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_gpio.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_gpio_ex.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_dma.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_dma_ex.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_pwr.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_pwr_ex.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_def.h;Drivers/STM32F7xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_i2c.h;Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_i2c_ex.h;Drivers/CMSIS/Device/ST/STM32F7xx/Include/stm32f746xx.h;Drivers/CMSIS/Device/ST/STM32F7xx/Include/stm32f7xx.h;Drivers/CMSIS/Device/ST/STM32F7xx/Include/system_stm32f7xx.h;Drivers/CMSIS/Device/ST/STM32F7xx/Source/Templates/system_stm32f7xx.c;Drivers/CMSIS/Include/arm_common_tables.h;Drivers/CMSIS/Include/arm_const_structs.h;Drivers/CMSIS/Include/arm_math.h;Drivers/CMSIS/Include/cmsis_armcc.h;Drivers/CMSIS/Include/cmsis_armcc_V6.h;Drivers/CMSIS/Include/cmsis_gcc.h;Drivers/CMSIS/Include/core_cm0.h;Drivers/CMSIS/Include/core_cm0plus.h;Drivers/CMSIS/Include/core_cm3.h;Drivers/CMSIS/Include/core_cm4.h;Drivers/CMSIS/Include/core_cm7.h;Drivers/CMSIS/Include/core_cmFunc.h;Drivers/CMSIS/Include/core_cmInstr.h;Drivers/CMSIS/Include/core_cmSimd.h;Drivers/CMSIS/Include/core_sc000.h;Drivers/CMSIS/Include/core_sc300.h;
[PreviousUsedKeilFiles]
SourceFiles=..\Src\main.c;..\Src\stm32f7xx_it.c;..\Src\stm32f7xx_hal_msp.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_cortex.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_
tim.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_tim_ex.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_uart.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_rcc.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_rcc_ex.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_flash.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_flash_ex.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_gpio.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_dma.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_dma_ex.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_pwr.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_pwr_ex.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_i2c.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_i2c_ex.c;../\Src/system_stm32f7xx.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_cortex
.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_tim.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_tim_ex.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_uart.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_rcc.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_rcc_ex.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_flash.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_flash_ex.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_gpio.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_dma.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_dma_ex.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_pwr.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_pwr_ex.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_i2c.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_i2c_ex.c;../\Src/system_stm32f7xx.c;../Drivers/CMSIS/Device/ST/STM32F7xx/Source/Templates/system_stm32f7xx.c;null;
SourceFiles=..\Src\main.c;..\Src\stm32f7xx_it.c;..\Src\stm32f7xx_hal_msp.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_cortex.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_
qspi.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_tim.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_tim_ex.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_uart.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_rcc.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_rcc_ex.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_flash.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_flash_ex.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_gpio.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_dma.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_dma_ex.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_pwr.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_pwr_ex.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_i2c.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_i2c_ex.c;../\Src/system_stm32f7xx.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_cortex.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_qspi
.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_tim.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_tim_ex.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_uart.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_rcc.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_rcc_ex.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_flash.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_flash_ex.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_gpio.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_dma.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_dma_ex.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_pwr.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_pwr_ex.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_i2c.c;../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_i2c_ex.c;../\Src/system_stm32f7xx.c;../Drivers/CMSIS/Device/ST/STM32F7xx/Source/Templates/system_stm32f7xx.c;null;
HeaderPath=..\Drivers\STM32F7xx_HAL_Driver\Inc;..\Drivers\STM32F7xx_HAL_Driver\Inc\Legacy;..\Drivers\CMSIS\Device\ST\STM32F7xx\Include;..\Drivers\CMSIS\Include;..\Inc;
bsp/stm32/stm32f746-st-disco/board/CubeMX_Config/CubeMX_Config.ioc
浏览文件 @
a0636e4f
...
...
@@ -4,22 +4,31 @@ KeepUserPlacement=false
Mcu.Family=STM32F7
Mcu.IP0=CORTEX_M7
Mcu.IP1=NVIC
Mcu.IP2=RCC
Mcu.IP3=SYS
Mcu.IP4=USART1
Mcu.IPNb=5
Mcu.IP2=QUADSPI
Mcu.IP3=RCC
Mcu.IP4=SYS
Mcu.IP5=USART1
Mcu.IPNb=6
Mcu.Name=STM32F746NGHx
Mcu.Package=TFBGA216
Mcu.Pin0=PA14
Mcu.Pin1=PA13
Mcu.Pin2=PB7
Mcu.Pin3=PC14/OSC32_IN
Mcu.Pin4=PA9
Mcu.Pin5=PC15/OSC32_OUT
Mcu.Pin6=PH0/OSC_IN
Mcu.Pin7=PH1/OSC_OUT
Mcu.Pin8=VP_SYS_VS_Systick
Mcu.PinsNb=9
Mcu.Pin0=PE2
Mcu.Pin1=PA14
Mcu.Pin10=PH1/OSC_OUT
Mcu.Pin11=PJ8
Mcu.Pin12=PB2
Mcu.Pin13=PD12
Mcu.Pin14=PD13
Mcu.Pin15=PD11
Mcu.Pin16=VP_SYS_VS_Systick
Mcu.Pin2=PA13
Mcu.Pin3=PB7
Mcu.Pin4=PB6
Mcu.Pin5=PC14/OSC32_IN
Mcu.Pin6=PA9
Mcu.Pin7=PC15/OSC32_OUT
Mcu.Pin8=PK1
Mcu.Pin9=PH0/OSC_IN
Mcu.PinsNb=17
Mcu.ThirdPartyNb=0
Mcu.UserConstants=
Mcu.UserName=STM32F746NGHx
...
...
@@ -42,6 +51,10 @@ PA14.Signal=SYS_JTCK-SWCLK
PA9.Locked=true
PA9.Mode=Asynchronous
PA9.Signal=USART1_TX
PB2.Mode=Single Bank 1
PB2.Signal=QUADSPI_CLK
PB6.Mode=Single Bank 1
PB6.Signal=QUADSPI_BK1_NCS
PB7.Mode=Asynchronous
PB7.Signal=USART1_RX
PC14/OSC32_IN.Mode=LSE-External-Oscillator
...
...
@@ -56,10 +69,26 @@ PCC.Seq0=0
PCC.Series=STM32F7
PCC.Temperature=25
PCC.Vdd=3.3
PD11.Locked=true
PD11.Mode=Single Bank 1
PD11.Signal=QUADSPI_BK1_IO0
PD12.Locked=true
PD12.Mode=Single Bank 1
PD12.Signal=QUADSPI_BK1_IO1
PD13.Locked=true
PD13.Mode=Single Bank 1
PD13.Signal=QUADSPI_BK1_IO3
PE2.Locked=true
PE2.Mode=Single Bank 1
PE2.Signal=QUADSPI_BK1_IO2
PH0/OSC_IN.Mode=HSE-External-Oscillator
PH0/OSC_IN.Signal=RCC_OSC_IN
PH1/OSC_OUT.Mode=HSE-External-Oscillator
PH1/OSC_OUT.Signal=RCC_OSC_OUT
PJ8.Locked=true
PJ8.Signal=GPXTI8
PK1.Locked=true
PK1.Signal=EVENTOUT
PinOutPanel.CurrentBGAView=Top
PinOutPanel.RotationAngle=0
ProjectManager.AskForMigrate=true
...
...
@@ -88,7 +117,12 @@ ProjectManager.StackSize=0x400
ProjectManager.TargetToolchain=MDK-ARM V5
ProjectManager.ToolChainLocation=
ProjectManager.UnderRoot=false
ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-SystemClock_Config-RCC-false-HAL-false,3-MX_CORTEX_M7_Init-CORTEX_M7-false-HAL-true,4-MX_USART1_UART_Init-USART1-false-HAL-true
ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-SystemClock_Config-RCC-false-HAL-false,3-MX_CORTEX_M7_Init-CORTEX_M7-false-HAL-true,4-MX_USART1_UART_Init-USART1-false-HAL-true,5-MX_QUADSPI_Init-QUADSPI-false-HAL-true
QUADSPI.ChipSelectHighTime=QSPI_CS_HIGH_TIME_6_CYCLE
QUADSPI.ClockPrescaler=1
QUADSPI.FifoThreshold=4
QUADSPI.IPParameters=ClockPrescaler,FifoThreshold,SampleShifting,ChipSelectHighTime
QUADSPI.SampleShifting=QSPI_SAMPLE_SHIFTING_HALFCYCLE
RCC.AHBFreq_Value=216000000
RCC.APB1CLKDivider=RCC_HCLK_DIV4
RCC.APB1Freq_Value=54000000
...
...
@@ -148,6 +182,8 @@ RCC.VCOI2SOutputFreq_Value=192000000
RCC.VCOInputFreq_Value=1000000
RCC.VCOOutputFreq_Value=432000000
RCC.VCOSAIOutputFreq_Value=192000000
SH.GPXTI8.0=GPIO_EXTI8
SH.GPXTI8.ConfNb=1
USART1.IPParameters=VirtualMode-Asynchronous
USART1.VirtualMode-Asynchronous=VM_ASYNC
VP_SYS_VS_Systick.Mode=SysTick
...
...
bsp/stm32/stm32f746-st-disco/board/CubeMX_Config/Inc/stm32f7xx_hal_conf.h
浏览文件 @
a0636e4f
...
...
@@ -68,7 +68,7 @@
/* #define HAL_IWDG_MODULE_ENABLED */
/* #define HAL_LPTIM_MODULE_ENABLED */
/* #define HAL_LTDC_MODULE_ENABLED */
/* #define HAL_QSPI_MODULE_ENABLED */
#define HAL_QSPI_MODULE_ENABLED
/* #define HAL_RNG_MODULE_ENABLED */
/* #define HAL_RTC_MODULE_ENABLED */
/* #define HAL_SAI_MODULE_ENABLED */
...
...
bsp/stm32/stm32f746-st-disco/board/CubeMX_Config/Src/main.c
浏览文件 @
a0636e4f
...
...
@@ -63,6 +63,8 @@
/* Private variables ---------------------------------------------------------*/
QSPI_HandleTypeDef
hqspi
;
UART_HandleTypeDef
huart1
;
/* USER CODE BEGIN PV */
...
...
@@ -73,6 +75,7 @@ UART_HandleTypeDef huart1;
void
SystemClock_Config
(
void
);
static
void
MX_GPIO_Init
(
void
);
static
void
MX_USART1_UART_Init
(
void
);
static
void
MX_QUADSPI_Init
(
void
);
/* USER CODE BEGIN PFP */
/* USER CODE END PFP */
...
...
@@ -111,6 +114,7 @@ int main(void)
/* Initialize all configured peripherals */
MX_GPIO_Init
();
MX_USART1_UART_Init
();
MX_QUADSPI_Init
();
/* USER CODE BEGIN 2 */
/* USER CODE END 2 */
...
...
@@ -184,6 +188,41 @@ void SystemClock_Config(void)
}
}
/**
* @brief QUADSPI Initialization Function
* @param None
* @retval None
*/
static
void
MX_QUADSPI_Init
(
void
)
{
/* USER CODE BEGIN QUADSPI_Init 0 */
/* USER CODE END QUADSPI_Init 0 */
/* USER CODE BEGIN QUADSPI_Init 1 */
/* USER CODE END QUADSPI_Init 1 */
/* QUADSPI parameter configuration*/
hqspi
.
Instance
=
QUADSPI
;
hqspi
.
Init
.
ClockPrescaler
=
1
;
hqspi
.
Init
.
FifoThreshold
=
4
;
hqspi
.
Init
.
SampleShifting
=
QSPI_SAMPLE_SHIFTING_HALFCYCLE
;
hqspi
.
Init
.
FlashSize
=
1
;
hqspi
.
Init
.
ChipSelectHighTime
=
QSPI_CS_HIGH_TIME_6_CYCLE
;
hqspi
.
Init
.
ClockMode
=
QSPI_CLOCK_MODE_0
;
hqspi
.
Init
.
FlashID
=
QSPI_FLASH_ID_1
;
hqspi
.
Init
.
DualFlash
=
QSPI_DUALFLASH_DISABLE
;
if
(
HAL_QSPI_Init
(
&
hqspi
)
!=
HAL_OK
)
{
Error_Handler
();
}
/* USER CODE BEGIN QUADSPI_Init 2 */
/* USER CODE END QUADSPI_Init 2 */
}
/**
* @brief USART1 Initialization Function
* @param None
...
...
@@ -226,12 +265,31 @@ static void MX_USART1_UART_Init(void)
*/
static
void
MX_GPIO_Init
(
void
)
{
GPIO_InitTypeDef
GPIO_InitStruct
=
{
0
};
/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOE_CLK_ENABLE
();
__HAL_RCC_GPIOA_CLK_ENABLE
();
__HAL_RCC_GPIOB_CLK_ENABLE
();
__HAL_RCC_GPIOC_CLK_ENABLE
();
__HAL_RCC_GPIOK_CLK_ENABLE
();
__HAL_RCC_GPIOH_CLK_ENABLE
();
__HAL_RCC_GPIOJ_CLK_ENABLE
();
__HAL_RCC_GPIOD_CLK_ENABLE
();
/*Configure GPIO pin : PK1 */
GPIO_InitStruct
.
Pin
=
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_AF15_EVENTOUT
;
HAL_GPIO_Init
(
GPIOK
,
&
GPIO_InitStruct
);
/*Configure GPIO pin : PJ8 */
GPIO_InitStruct
.
Pin
=
GPIO_PIN_8
;
GPIO_InitStruct
.
Mode
=
GPIO_MODE_IT_RISING
;
GPIO_InitStruct
.
Pull
=
GPIO_NOPULL
;
HAL_GPIO_Init
(
GPIOJ
,
&
GPIO_InitStruct
);
}
...
...
bsp/stm32/stm32f746-st-disco/board/CubeMX_Config/Src/stm32f7xx_hal_msp.c
浏览文件 @
a0636e4f
...
...
@@ -97,6 +97,109 @@ void HAL_MspInit(void)
/* USER CODE END MspInit 1 */
}
/**
* @brief QSPI MSP Initialization
* This function configures the hardware resources used in this example
* @param hqspi: QSPI handle pointer
* @retval None
*/
void
HAL_QSPI_MspInit
(
QSPI_HandleTypeDef
*
hqspi
)
{
GPIO_InitTypeDef
GPIO_InitStruct
=
{
0
};
if
(
hqspi
->
Instance
==
QUADSPI
)
{
/* USER CODE BEGIN QUADSPI_MspInit 0 */
/* USER CODE END QUADSPI_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_QSPI_CLK_ENABLE
();
__HAL_RCC_GPIOE_CLK_ENABLE
();
__HAL_RCC_GPIOB_CLK_ENABLE
();
__HAL_RCC_GPIOD_CLK_ENABLE
();
/**QUADSPI GPIO Configuration
PE2 ------> QUADSPI_BK1_IO2
PB6 ------> QUADSPI_BK1_NCS
PB2 ------> QUADSPI_CLK
PD12 ------> QUADSPI_BK1_IO1
PD13 ------> QUADSPI_BK1_IO3
PD11 ------> QUADSPI_BK1_IO0
*/
GPIO_InitStruct
.
Pin
=
GPIO_PIN_2
;
GPIO_InitStruct
.
Mode
=
GPIO_MODE_AF_PP
;
GPIO_InitStruct
.
Pull
=
GPIO_NOPULL
;
GPIO_InitStruct
.
Speed
=
GPIO_SPEED_FREQ_VERY_HIGH
;
GPIO_InitStruct
.
Alternate
=
GPIO_AF9_QUADSPI
;
HAL_GPIO_Init
(
GPIOE
,
&
GPIO_InitStruct
);
GPIO_InitStruct
.
Pin
=
GPIO_PIN_6
;
GPIO_InitStruct
.
Mode
=
GPIO_MODE_AF_PP
;
GPIO_InitStruct
.
Pull
=
GPIO_NOPULL
;
GPIO_InitStruct
.
Speed
=
GPIO_SPEED_FREQ_VERY_HIGH
;
GPIO_InitStruct
.
Alternate
=
GPIO_AF10_QUADSPI
;
HAL_GPIO_Init
(
GPIOB
,
&
GPIO_InitStruct
);
GPIO_InitStruct
.
Pin
=
GPIO_PIN_2
;
GPIO_InitStruct
.
Mode
=
GPIO_MODE_AF_PP
;
GPIO_InitStruct
.
Pull
=
GPIO_NOPULL
;
GPIO_InitStruct
.
Speed
=
GPIO_SPEED_FREQ_VERY_HIGH
;
GPIO_InitStruct
.
Alternate
=
GPIO_AF9_QUADSPI
;
HAL_GPIO_Init
(
GPIOB
,
&
GPIO_InitStruct
);
GPIO_InitStruct
.
Pin
=
GPIO_PIN_12
|
GPIO_PIN_13
|
GPIO_PIN_11
;
GPIO_InitStruct
.
Mode
=
GPIO_MODE_AF_PP
;
GPIO_InitStruct
.
Pull
=
GPIO_NOPULL
;
GPIO_InitStruct
.
Speed
=
GPIO_SPEED_FREQ_VERY_HIGH
;
GPIO_InitStruct
.
Alternate
=
GPIO_AF9_QUADSPI
;
HAL_GPIO_Init
(
GPIOD
,
&
GPIO_InitStruct
);
/* USER CODE BEGIN QUADSPI_MspInit 1 */
/* USER CODE END QUADSPI_MspInit 1 */
}
}
/**
* @brief QSPI MSP De-Initialization
* This function freeze the hardware resources used in this example
* @param hqspi: QSPI handle pointer
* @retval None
*/
void
HAL_QSPI_MspDeInit
(
QSPI_HandleTypeDef
*
hqspi
)
{
if
(
hqspi
->
Instance
==
QUADSPI
)
{
/* USER CODE BEGIN QUADSPI_MspDeInit 0 */
/* USER CODE END QUADSPI_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_QSPI_CLK_DISABLE
();
/**QUADSPI GPIO Configuration
PE2 ------> QUADSPI_BK1_IO2
PB6 ------> QUADSPI_BK1_NCS
PB2 ------> QUADSPI_CLK
PD12 ------> QUADSPI_BK1_IO1
PD13 ------> QUADSPI_BK1_IO3
PD11 ------> QUADSPI_BK1_IO0
*/
HAL_GPIO_DeInit
(
GPIOE
,
GPIO_PIN_2
);
HAL_GPIO_DeInit
(
GPIOB
,
GPIO_PIN_6
|
GPIO_PIN_2
);
HAL_GPIO_DeInit
(
GPIOD
,
GPIO_PIN_12
|
GPIO_PIN_13
|
GPIO_PIN_11
);
/* USER CODE BEGIN QUADSPI_MspDeInit 1 */
/* USER CODE END QUADSPI_MspDeInit 1 */
}
}
/**
* @brief UART MSP Initialization
* This function configures the hardware resources used in this example
...
...
bsp/stm32/stm32f746-st-disco/board/Kconfig
浏览文件 @
a0636e4f
...
...
@@ -11,6 +11,12 @@ menu "Onboard Peripheral Drivers"
select BSP_USING_UART
select BSP_USING_UART1
default y
config BSP_USING_QSPI_FLASH
bool "Enable QSPI FLASH (N25Q256 qspi1)"
select BSP_USING_QSPI
select RT_USING_SFUD
select RT_SFUD_USING_QSPI
default n
endmenu
...
...
@@ -20,7 +26,6 @@ menu "On-chip Peripheral Drivers"
bool "Enable GPIO"
select RT_USING_PIN
default y
menuconfig BSP_USING_UART
bool "Enable UART"
default y
...
...
@@ -35,6 +40,11 @@ menu "On-chip Peripheral Drivers"
depends on BSP_USING_UART1 && RT_SERIAL_USING_DMA
default n
endif
config BSP_USING_QSPI
bool "Enable QSPI BUS"
select RT_USING_QSPI
select RT_USING_SPI
default n
endmenu
...
...
bsp/stm32/stm32f746-st-disco/board/SConscript
浏览文件 @
a0636e4f
...
...
@@ -7,8 +7,11 @@ cwd = GetCurrentDir()
src
=
Glob
(
'board.c'
)
src
+=
Glob
(
'CubeMX_Config/Src/stm32f7xx_hal_msp.c'
)
if
GetDepend
([
'BSP_USING_QSPI_FLASH'
]):
src
+=
Glob
(
'ports/drv_qspi_flash.c'
)
path
=
[
cwd
]
path
+=
[
cwd
+
'/CubeMX_Config/Inc'
]
path
+=
[
cwd
+
'/ports'
]
if
rtconfig
.
CROSS_TOOL
==
'gcc'
:
src
+=
[
cwd
+
'/../../libraries/STM32F7xx_HAL/CMSIS/Device/ST/STM32F7xx/Source/Templates/gcc/startup_stm32f746xx.s'
]
...
...
bsp/stm32/stm32f746-st-disco/board/ports/drv_qspi_flash.c
0 → 100644
浏览文件 @
a0636e4f
/*
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2019-01-26 jinsheng first version
*/
#include <board.h>
#include <drv_qspi.h>
#include <rtdevice.h>
#include <rthw.h>
#include <finsh.h>
#ifdef BSP_USING_QSPI_FLASH
#include "spi_flash.h"
#include "spi_flash_sfud.h"
char
n25qxx_read_status_register2
(
struct
rt_qspi_device
*
device
)
{
/* 0x35 read status register2 */
char
instruction
=
0x35
,
status
;
rt_qspi_send_then_recv
(
device
,
&
instruction
,
1
,
&
status
,
1
);
return
status
;
}
void
n25qxx_write_enable
(
struct
rt_qspi_device
*
device
)
{
/* 0x06 write enable */
char
instruction
=
0x06
;
rt_qspi_send
(
device
,
&
instruction
,
1
);
}
void
n25qxx_enter_qspi_mode
(
struct
rt_qspi_device
*
device
)
{
char
status
=
0
;
/* 0x38 enter qspi mode */
char
instruction
=
0x38
;
char
write_status2_buf
[
2
]
=
{
0
};
/* 0x31 write status register2 */
write_status2_buf
[
0
]
=
0x31
;
status
=
n25qxx_read_status_register2
(
device
);
if
(
!
(
status
&
0x02
))
{
status
|=
1
<<
1
;
n25qxx_write_enable
(
device
);
write_status2_buf
[
1
]
=
status
;
rt_qspi_send
(
device
,
&
write_status2_buf
,
2
);
rt_qspi_send
(
device
,
&
instruction
,
1
);
rt_kprintf
(
"flash already enter qspi mode
\n
"
);
rt_thread_mdelay
(
10
);
}
}
static
int
rt_hw_qspi_flash_with_sfud_init
(
void
)
{
stm32_qspi_bus_attach_device
(
"qspi1"
,
"qspi10"
,
RT_NULL
,
4
,
n25qxx_enter_qspi_mode
,
RT_NULL
);
/* init n25q128 */
if
(
RT_NULL
==
rt_sfud_flash_probe
(
"n25q128"
,
"qspi10"
))
{
return
-
RT_ERROR
;
}
return
RT_EOK
;
}
INIT_COMPONENT_EXPORT
(
rt_hw_qspi_flash_with_sfud_init
);
#endif
/* BSP_USING_QSPI_FLASH */
bsp/stm32/stm32f746-st-disco/project.ewp
浏览文件 @
a0636e4f
...
...
@@ -346,6 +346,7 @@
<state>$PROJ_DIR$\..\..\..\components\finsh</state>
<state>$PROJ_DIR$\..\..\..\libcpu\arm\common</state>
<state>$PROJ_DIR$\..\..\..\libcpu\arm\cortex-m7</state>
<state>$PROJ_DIR$\board\ports</state>
<state>$PROJ_DIR$\..\..\..\components\drivers\include</state>
<state>$PROJ_DIR$\.</state>
<state>$PROJ_DIR$\applications</state>
...
...
@@ -1375,6 +1376,7 @@
<state>$PROJ_DIR$\..\..\..\components\finsh</state>
<state>$PROJ_DIR$\..\..\..\libcpu\arm\common</state>
<state>$PROJ_DIR$\..\..\..\libcpu\arm\cortex-m7</state>
<state>$PROJ_DIR$\board\ports</state>
<state>$PROJ_DIR$\..\..\..\components\drivers\include</state>
<state>$PROJ_DIR$\.</state>
<state>$PROJ_DIR$\applications</state>
...
...
@@ -2135,21 +2137,21 @@
</file>
</group>
<group>
<name>
CORTEX-M7
</name>
<name>
cpu
</name>
<file>
<name>$PROJ_DIR$\..\..\..\libcpu\arm\co
rtex-m7\cpuport
.c</name>
<name>$PROJ_DIR$\..\..\..\libcpu\arm\co
mmon\backtrace
.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\libcpu\arm\co
rtex-m7\context_iar.S
</name>
<name>$PROJ_DIR$\..\..\..\libcpu\arm\co
mmon\div0.c
</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\libcpu\arm\common\
backtrace
.c</name>
<name>$PROJ_DIR$\..\..\..\libcpu\arm\common\
showmem
.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\libcpu\arm\co
mmon\div0
.c</name>
<name>$PROJ_DIR$\..\..\..\libcpu\arm\co
rtex-m7\cpuport
.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\libcpu\arm\co
mmon\showmem.c
</name>
<name>$PROJ_DIR$\..\..\..\libcpu\arm\co
rtex-m7\context_iar.S
</name>
</file>
</group>
<group>
...
...
bsp/stm32/stm32f746-st-disco/project.uvoptx
浏览文件 @
a0636e4f
此差异已折叠。
点击以展开。
bsp/stm32/stm32f746-st-disco/project.uvprojx
浏览文件 @
a0636e4f
此差异已折叠。
点击以展开。
bsp/stm32/stm32f746-st-disco/rtconfig.h
浏览文件 @
a0636e4f
...
...
@@ -125,9 +125,6 @@
/* Wiced WiFi */
/* IoT Cloud */
/* security packages */
...
...
@@ -151,8 +148,6 @@
/* sample package */
/* samples: kernel and components samples */
/* example package: hello */
...
...
bsp/stm32/stm32f746-st-disco/template.uvoptx
浏览文件 @
a0636e4f
...
...
@@ -187,6 +187,11 @@
<pMon>
STLink\ST-LINKIII-KEIL_SWO.dll
</pMon>
</DebugOpt>
<TargetDriverDllRegistry>
<SetRegEntry>
<Number>
0
</Number>
<Key>
ST-LINKIII-KEIL_SWO
</Key>
<Name>
-U0670FF505356867767062043 -O206 -S0 -C0 -A0 -N00("ARM CoreSight SW-DP") -D00(5BA02477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20010000 -FC1000 -FN1 -FF0STM32F7x_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F746NGHx$CMSIS\Flash\STM32F7x_1024.FLM)
</Name>
</SetRegEntry>
<SetRegEntry>
<Number>
0
</Number>
<Key>
UL2CM3
</Key>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录