Skill
4
Agent
All Skills
Search
Tools
中文
|
EN
Explore
Loading...
Back to Details
stm32-hal-development
Compare original and translation side by side
🇺🇸
Original
English
🇨🇳
Translation
Chinese
STM32 HAL Development
STM32 HAL开发
Treat this skill as the working playbook for CubeMX-based STM32 projects.
将此技能视为基于CubeMX的STM32项目的实用操作手册。
Workflow
工作流程
Read
references/core-guidelines.md
first.
Keep all custom code inside
USER CODE
regions unless the project has an explicit non-CubeMX extension point.
Configure peripherals in CubeMX, regenerate code, then add application or BSP logic.
Read additional references only as needed:
references/peripheral-driver-guide.md
for sensor and bus drivers
references/hal-quick-reference.md
for API lookups
references/troubleshooting-guide.md
for failure analysis
references/usage-examples.md
for implementation patterns
Reuse
assets/bsp-template.c
and
assets/bsp-template.h
when starting a new BSP module.
首先阅读
references/core-guidelines.md
。
除非项目有明确的非CubeMX扩展点,否则所有自定义代码都需放在
USER CODE
区域内。
在CubeMX中配置外设,重新生成代码,然后添加应用程序或BSP逻辑。
仅在需要时阅读额外参考文档:
references/peripheral-driver-guide.md
:用于传感器和总线驱动开发
references/hal-quick-reference.md
:用于API查询
references/troubleshooting-guide.md
:用于故障分析
references/usage-examples.md
:用于实现模式参考
启动新的BSP模块时,复用
assets/bsp-template.c
和
assets/bsp-template.h
。
Notes
注意事项
Prioritize hardware constraints, interrupt safety, and regeneration safety over local code convenience.
Do not modify CubeMX-generated initialization files directly when the same change belongs in the
.ioc
configuration.
优先考虑硬件约束、中断安全性和代码再生安全性,而非本地代码便利性。
当相同修改可通过
.ioc
配置实现时,请勿直接修改CubeMX生成的初始化文件。