I am trying to communicate between two K60 targets via CAN. I have modified the CAN example project provided for K60 target.
I am using mailbox 0 for transmission and mailbox 1 for reception.
I need to transfer 1K bytes. I am sending it by chunks of 8bytes in a while loop.
When I am giving a delay after one transmit call FLEXCAN_Tx_mailbox() the data is properly receiving at receive end (other K60 target).
But when I am replacing the delay with the _lwevent_wait_ticks() it is not working.
Actually the event is generating from the ISR by checking the IFLAG bit for tranmit complete.
Receive interrupt is generating at the receive end. But "Message box Empty" error is returning on reading the mail box.
Can I replace the delay after transmit with some event mechanism?