主题中讨论的其他器件:HALCOGEN
工具/软件:Code Composer Studio
你好
我 一直在尝试使用 halcogen 和 CCS 从 canREG1发送 CAN 消息。 我还将它们包含在 CCS 中。 我的 CCS 中的主代码如下所示:
#include "hL_sys_common.h"
#include "HL_CAN.h"
#include "hL_system.h"
#include "hL_sci.h"
#include "HL_ESM.h"
#define CAN canREG1
#define D_COUNT 9.
uint8_t TX_data1[D_count]={'h'、'e'、'l'、'o'、'o'、'o'、'o'、'o'、'o'、'0'};
uint32_t checkPackets (uint8_t * src_packet、uint8_t * dst_packet、uint32_t psize);
void main (void)
{
canInit();
canTransmit (CAN、canMESSAGE_BOX1、TX_DATa1);
while (1) /*连续显示*/
{
canIoTxGetBit(Can);
}
}
uint32_t checkPackets (uint8_t * src_packet、uint8_t * dst_packet、uint32_t psize)
{
uint32_t err=0;
uint32_t cnt=psize;
while (cnt -)
{
if ((* src_packet++)!=(* dst_packet++))
{
ERR++;/*数据错误*/
}
}
返回(错误);
}
void canMessageNotification (canBASE-t *节点、uint32_t MessageBox)
{
返回;
}
void canErrorNotification (canbase_t *节点、uint32_t 通知)
{
返回;
}
void esmGroup1通知(esmBASE-t * ESM、uint32通道)
{
返回;
}
void esmGroup2通知(esmBASE-t * ESM、uint32通道)
{
返回;
}
但我仍然不知道为什么我无法在使用 canIoTxGetBit(Can)函数从 canREG1 TX 引脚(即 J10 - 45)发送的终端中看到 msg。
此外、我完全确定我的 halcogen 程序中没有任何问题。
plz 帮助我解决问题。
谢谢