AnsweredAssumed Answered

Can_tx_rx same time

Question asked by Praveena F on Apr 30, 2019
Latest reply on May 3, 2019 by Alexandru Nan

How can transmit and receive at a time?? I am using CAN_PAL.Here is my code,CAN any one help me??

/*************************************/

CAN_Init(INST_CAN_PAL1, &can_pal1_Config0); //CAN intialize

can_buff_config_t tx_buff = {
.enableFD = false,
.enableBRS = true,
.fdPadding = 0U,
.idType = CAN_MSG_ID_EXT,
.isRemote = false
};

CAN_ConfigTxBuff(INST_CAN_PAL1,0,&tx_buff);

can_message_t tx_msg = {
// .cs = 0U,
.id = 0x01,
.data[0] = 0x02,
.data[1] = 0x04,
.data[2] = 0x08,
.length = 3
};
can_buff_config_t rx_buff = {
.enableFD = 0,
.enableBRS = true,
.fdPadding = 0U,
.idType = CAN_MSG_ID_EXT,
.isRemote = false
};

 

CAN_ConfigRxBuff(INST_CAN_PAL1,0,&rx_buff,1);

can_message_t rx_msg = {
//.cs = 0U,
.id = 1,
.length = 2

};

while(1)
{
CAN_Send(INST_CAN_PAL1,0,&tx_msg);
CAN_Receive(1,0,&rx_msg);

}

/****************************************/

Outcomes