Hello Sir,
I'm using RL 78 (R5F10BAC) to transmit and receive the CAN messages.
When I try to transmit the messages it's working fine.
While receiving the CAN message, buffer is not getting updated. Below I've mentioned the code for your reference.
void main(void) { R_MAIN_UserInit(); CAN0_Init(); tx_done=1; while (1U) { CAN0_Tx(can_id, data_len ,data); if(tx_done) { CAN0_Rx(Trsn_buffer); } CAN0_Tx(can_id1, data_len ,Trsn_buffer); }
In the CAN0_Rx() function (can.c) , the below mentioned register value is not being updated.So conditon is never true.
RFSTS0L &= 0xF7; // CLEAR RFIF flag if((RFSTS0L & 0x01) != 0x01) { }
Please help to solve the issue!!
Thanks in advance.