主题中讨论的其他器件:HALCOGEN、
工具/软件:
尊敬的:
我无法通过其中一个 HALCoGen 单元测试。 发生在所有三个 CAN 接口上。 失败的测试用例是 CAN1_UT_07:4 — 测试 canGetData API 以及数据丢失情况。
我已经确保根据 xlsx 文件中规定的测试序列要求配置消息框和中断:
1) Enable All CAN Interrupts in VIM Tab 2) Message 1,2,3,4,5,6 are activated 3) Message 1 config - TX, DLC = 8, No Interrupt, ID = 1 4) Message 2 config - RX, DLC = 8, Low Priority Interrupt Enabled, ID = 1 5) Message 3 config - TX, DLC = 8, No Interrupt, ID = 3 6) Message 4 config - RX, DLC = 8, High Priority Interrupt Enabled, ID = 3 7) Message 5 config - TX, DLC = 8, No Interrupt, ID = 5, Enable RTR 8) Message 6 config - RX, DLC = 8, High Priority Interrupt Enabled, ID = 5.
我已进一步确保所有其他消息框均已停用、以便测试消息不会被其他消息框窃取。
测试用例启动代码如下所示:
canTransmit(canREG1, canMESSAGE_BOX3, tx_data); while(!canIsRxMessageArrived(canREG1, canMESSAGE_BOX4)); canTransmit(canREG1, canMESSAGE_BOX3, tx_data);
因此、代码发送到消息框 4、等待消息到达、但不收集数据、然后发送另一条消息以强制消息丢失指示。 显然,信息丢失的指示没有得到设置,我是出于想法为什么。 所有其他测试用例都可以通过、但每个 CAN 接口的测试用例都无法通过。

