Hi Arvind,
see attached example. It is not loopback mode but it should help. Two FRDM boards are used.
Pushing SW2 on Tx board starts sending CAN message, then Rx board reply same message to Tx board.
You can configure project for Rx and Tx at line 41 in main.c.
Regards,
Lukas