-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Feature/bsp stm32f407 spi flash #10979
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Feature/bsp stm32f407 spi flash #10979
Conversation
|
👋 感谢您对 RT-Thread 的贡献!Thank you for your contribution to RT-Thread! 为确保代码符合 RT-Thread 的编码规范,请在你的仓库中执行以下步骤运行代码格式化工作流(如果格式化CI运行失败)。 🛠 操作步骤 | Steps
完成后,提交将自动更新至 如有问题欢迎联系我们,再次感谢您的贡献!💐 |
📌 Code Review Assignment🏷️ Tag: bsp_stm32Reviewers: Liang1795 hamburger-os wdfk-prog Changed Files (Click to expand)
🏷️ Tag: bsp_stm32f407-micuReviewers: Dailingxiang1 Changed Files (Click to expand)
📊 Current Review Status (Last Updated: 2025-11-27 15:01 CST)
📝 Review Instructions
|
82fdaff to
9acd9b7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds SPI flash support to the bsp/stm32/stm32f407-micu board, enabling the use of an onboard ZD25WQ32 SPI flash chip with the SFUD (Serial Flash Universal Driver) library and DFS (Device Virtual File System) support.
Key Changes
- Added SPI1 peripheral configuration with DMA support for TX/RX
- Integrated SFUD library for SPI flash operations with ZD25WQ32 chip
- Enabled DFS with ELM-FAT filesystem support for file operations
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| bsp/stm32/stm32f407-micu/rtconfig.h | Added DFS, SPI, and SFUD configuration macros; contains spelling error in RT_HWCRYPTO_DEFAULT_NAME |
| bsp/stm32/stm32f407-micu/board/ports/spi_flash_init.c | New file implementing SPI flash initialization for ZD25WQ32 chip on SPI1 bus |
| bsp/stm32/stm32f407-micu/board/ports/SConscript | New build script for ports directory with debug print statement that should be removed |
| bsp/stm32/stm32f407-micu/board/Kconfig | Added BSP configuration options for virtual USART and onboard SPI flash with dependencies |
| bsp/stm32/stm32f407-micu/board/CubeMX_Config/Src/stm32f4xx_hal_msp.c | Added MSP init/deinit functions for SPI1, I2C1, and SDIO peripherals; removed drv_common.h include |
| bsp/stm32/stm32f407-micu/board/CubeMX_Config/Src/main.c | Added SPI1, I2C1, SDIO peripheral initialization; updated PLL PLLQ divider from 4 to 7 |
| bsp/stm32/stm32f407-micu/board/CubeMX_Config/Inc/stm32f4xx_hal_conf.h | Enabled HAL modules for I2C, SD, and SPI |
| bsp/stm32/stm32f407-micu/board/CubeMX_Config/Inc/main.h | Added SPI1_CS pin definitions (PA4) |
| bsp/stm32/stm32f407-micu/board/CubeMX_Config/CubeMX_Config.ioc | Updated CubeMX configuration with SPI1, I2C1, SDIO pin assignments and clock settings |
| bsp/stm32/stm32f407-micu/.config | Updated runtime configuration enabling DFS, ELM-FAT, SPI, and SFUD drivers |
| bsp/stm32/stm32f407-micu/project.uvprojx | Updated Keil project file with reorganized source groups and new SPI/filesystem driver files |
| bsp/stm32/stm32f407-micu/project.uvoptx | Simplified Keil project options file with generic group naming |
bsp/stm32/stm32f407-micu/board/CubeMX_Config/Src/stm32f4xx_hal_msp.c
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…_msp.c Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
😃有什么问题请接着指出 |
|
SPI Flash宏定义关闭重新生成一下.config以及rtcobnfig.h,还有mdk文件同步一下,默认bsp保持最小系统即可,交给用户手动去开启 |
拉取/合并请求描述:(PR description)
[
为什么提交这份PR (why to submit this PR)
为bsp/stm32/stm32f407-micu添加spi flash支持
你的解决方案是什么 (what is your solution)
请提供验证的bsp和config (provide the config and bsp)
]
当前拉取/合并请求的状态 Intent for your PR
必须选择一项 Choose one (Mandatory):
代码质量 Code Quality:
我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:
#if 0代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up