Other Parts Discussed in Thread: HALCOGEN
Tool/software: Code Composer Studio
hello
i've been trying to send a can msg from canREG1 using halcogen & ccs. i included them in the ccs also . the main code in my ccs is given below :
#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','l','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) /* continious display */
{
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++; /* data error */
}
}
return (err);
}
void canMessageNotification(canBASE_t *node, uint32_t messageBOX)
{
return;
}
void canErrorNotification(canBASE_t *node, uint32_t notification)
{
return;
}
void esmGroup1Notification(esmBASE_t *esm, uint32 channel)
{
return;
}
void esmGroup2Notification(esmBASE_t *esm, uint32 channel)
{
return;
}
but i still don't know why i'm not able to see the msg in the terminal which i'm sending from the canREG1 TX pin(i.e J10 - 45) using the canIoTxGetBit(CAN) function .
Also i'm completely sure there is nothing wrong in my halcogen program.
plz help me where i am going wrong.
thank you ...