feat(app): 1.6.39 —— 1.6.29 起未上板业务改动入库,启动链与已提交基线对齐
主体为工作区累积的业务改动(CAN/PDO/桥/SSC/task_manager 等,详目见 config.h 版本注释链),新增 CoE 0x100A 真版本上报与 0x2502 APP→BOOT 总线交接。启动链(startup/SystemInit/initial/systick/hardfault)与 HEAD 逐字节一致;1.6.35~38 的跳转诊断实验(3M 化/BKP 面包屑/ haltWithWatchdog)未提交、已整体回退,补丁存 _revert_backup_20260916/。 真机实测(配对 BOOT 1.1.0.18):刷写 warm jump 与 reset cold jump 均可。
This commit is contained in:
@@ -246,8 +246,15 @@ public:
|
||||
/** @brief 软件 TX 队列当前积压帧数(统计/诊断用)。 */
|
||||
static uint32_t txQueueBacklog(uint8_t channelIndex);
|
||||
|
||||
/** @brief 接收队列容量深度(固定为 kRxQueueDepth = 16)。 */
|
||||
static constexpr uint8_t rxQueueDepth() { return kRxQueueDepth; }
|
||||
|
||||
/** @brief 查询指定通道软件接收队列当前积压帧数(无锁 SPSC,由 tail 与 head 计算)。 */
|
||||
static uint32_t rxQueueCount(uint8_t channelIndex);
|
||||
|
||||
private:
|
||||
static constexpr uint8_t kRxQueueDepth = 16U;
|
||||
static constexpr uint8_t kRxQueueMask = kRxQueueDepth - 1U;
|
||||
/** 每通道软件突发队列深度:覆盖整块突发(CAN_BURST_HARD_MAX=16 帧)中同一通道的
|
||||
* 全部超载帧(3 邮箱之外最多 13 帧 = 16-3),保证任意 DLC 的整块突发不因队列满丢帧。 */
|
||||
static constexpr uint8_t kTxQueueDepth = 13U;
|
||||
@@ -259,11 +266,15 @@ private:
|
||||
uint8_t length;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Lock-Free 单生产者单消费者 (SPSC) 环形接收队列。
|
||||
* @note 生产者为 CAN RX ISR (Preempt 0) 写入 tail,消费者为 consumeRxFrame (Thread) 推进 head。
|
||||
* 移除共享 count 变量,消除 BASEPRI=0x10 临界区对 Preempt 0 无效导致的并发撕裂与计数下溢风险。
|
||||
*/
|
||||
struct RxQueue {
|
||||
RxFrame frames[kRxQueueDepth];
|
||||
volatile uint8_t head;
|
||||
volatile uint8_t tail;
|
||||
volatile uint8_t count;
|
||||
};
|
||||
|
||||
/** 排队等待硬件邮箱空位的 CAN 帧(仅 SDO 突发用,payload ≤ 64B)。 */
|
||||
|
||||
Reference in New Issue
Block a user