CAN communication check

Hi, 

I have implemented the CAN bus module in my code and I am able to send and receive data. 

Here is a simple code when reading data from mailbox 0

while(!(*pREG_CAN1_RMP1 & (1<<0))); 
{
data1= *pREG_CAN1_MB00_DATA3;
data2 = *pREG_CAN1_MB00_DATA2;

......
}

Beside the above code, I want to implement a check on CAN bus communication when I remove the USB cable, so the code jumps to the start address of the code again. 

What is the way to check the CAN communication? any idea?

Using BF706

Thanks