- 在CAN通信类中添加了CAN_Sleep()和CAN_Wakeup()方法,支持设备进入低功耗模式 - 优化CAN通信检查逻辑,通过解析接收数据的首字节和末字节实现多种控制命令 - 支持远程复位电机、保存角度、清零角度、进入睡眠等操作 - 解决CAN发送邮箱满时可能导致的通信阻塞问题,增加重初始化机制 - 调整mailbox不可用计数逻辑,防止持续打印错误信息 refactor(flash): 移除软件CRC计算模块,改用硬件CRC外设 - 删除自定义CRC.cpp和CRC.h文件及其相关类实现 - 使用GD32硬件CRC模块替代软件算法,提高效率和可靠性 - 更新FlashEEPROM类中的CRC校验方式,调用crc_block_data_calculate进行计算 - 修正Flash地址遍历范围以适配新CRC逻辑及页面管理策略 - 修改save_angle接口签名,不再手动传入角度值,改为内部读取FOC实时角度 feat(timer): 新增RTC闹钟中断处理函数声明 - 在Timer.h中声明rtc_set_wakeup_interval和RTC_ALARM_IRQHandler - 为后续实现基于RTC的定时唤醒功能做准备 chore(config): 同步csolution工具版本更新并调整组件配置 - 更新RTE_Components.h生成工具版本至2.12.0 - 启用BKP、CRC、RTC等标准外设组件宏定义 - 从项目配置文件中移除旧CRC源文件引用 - 添加SystemCoreClockUpdate调用确保系统时钟同步 refactor(main): 主循环任务调度重构并增强初始化流程 - 将主循环中的任务处理提取为独立do_task函数,提升代码可读性 - 提前执行电机初始化,并根据看门狗复位标志决定是否立即进入深度睡眠 - 调整EEPROM初始化顺序,保证依赖关系正确 - 添加sys/initial.h头文件包含以支持新增系统初始化逻辑
84 lines
2.5 KiB
YAML
84 lines
2.5 KiB
YAML
project:
|
|
groups:
|
|
- group: Source Files
|
|
files:
|
|
- file: main.h
|
|
- file: main.cpp
|
|
- group: sys
|
|
files:
|
|
- file: sys/systick.cpp
|
|
- file: sys/systick.h
|
|
- file: sys/initial.cpp
|
|
- file: sys/initial.h
|
|
- file: sys/health.h
|
|
- file: sys/health.cpp
|
|
- file: sys/flash.h
|
|
- file: sys/flash.cpp
|
|
- group: device
|
|
files:
|
|
- file: device/Can.cpp
|
|
- file: device/Can.h
|
|
- file: device/ang_sensor.cpp
|
|
- file: device/ang_sensor.h
|
|
- file: device/ADC.cpp
|
|
- file: device/adc.h
|
|
- file: device/Timer.cpp
|
|
- file: device/Timer.h
|
|
- file: device/test.cpp
|
|
- file: device/motor.cpp
|
|
- file: device/motor.h
|
|
- group: Algorithm
|
|
files:
|
|
- file: Algorithm/Filter.cpp
|
|
- file: Algorithm/Filter.h
|
|
- file: Algorithm/DengFOC.cpp
|
|
- file: Algorithm/DengFOC.h
|
|
- file: Algorithm/pid.cpp
|
|
- file: Algorithm/pid.h
|
|
components:
|
|
- component: ARM::CMSIS:CORE
|
|
- component: Device:Startup
|
|
- component: Device:GD32C10x_StdPeripherals:ADC
|
|
- component: Device:GD32C10x_StdPeripherals:CAN
|
|
- component: Device:GD32C10x_StdPeripherals:DMA
|
|
- component: Device:GD32C10x_StdPeripherals:EXTI
|
|
- component: Device:GD32C10x_StdPeripherals:FMC
|
|
- component: Device:GD32C10x_StdPeripherals:GPIO
|
|
- component: Device:GD32C10x_StdPeripherals:MISC
|
|
- component: Device:GD32C10x_StdPeripherals:PMU
|
|
- component: Device:GD32C10x_StdPeripherals:RCU
|
|
- component: Device:GD32C10x_StdPeripherals:SPI_I2S
|
|
- component: Device:GD32C10x_StdPeripherals:TIMER
|
|
- component: Device:GD32C10x_StdPeripherals:USART
|
|
- component: Device:GD32C10x_libopt
|
|
- component: Device:GD32C10x_StdPeripherals:DBG
|
|
- component: Device:EVAL:GD32C10x
|
|
- component: Device:GD32C10x_StdPeripherals:FWDGT
|
|
- component: Device:GD32C10x_StdPeripherals:WWDGT
|
|
- component: Device:GD32C10x_StdPeripherals:BKP
|
|
- component: Device:GD32C10x_StdPeripherals:CRC
|
|
- component: Device:GD32C10x_StdPeripherals:RTC
|
|
output:
|
|
type:
|
|
- elf
|
|
- hex
|
|
- map
|
|
packs:
|
|
- pack: ARM::CMSIS
|
|
- pack: GigaDevice::GD32C10x_DFP
|
|
misc:
|
|
- for-compiler: AC6
|
|
C-CPP:
|
|
- -fshort-enums
|
|
- -fshort-wchar
|
|
- -D__MICROLIB
|
|
- -Wno-register
|
|
C:
|
|
- -D__packed=packed
|
|
ASM:
|
|
- -D__packed=packed
|
|
- -D__MICROLIB
|
|
Link:
|
|
- --library_type=microlib
|
|
- --entry=Reset_Handler
|