I am using CAN protocol example given by KEIL for MCB2300. I connected two can ports through RS232 cables. when i am debugging the code CAN1 sends a message, but CAN2 is nor able to receive a message. please can any one explain what is the flow in receiving a message.
Can is not RS232. It is a bus standard, not a point-to-point standard.
Are you sure that you are connecting high signal to high signal and low signal to low signal?
Normally, you should also have a termination, but in this case I assume your cable is too short for it to really matter.
Length is not the only factor that determines whether you need termination, though. The high-speed physical layer of CAN bus always needs some termination, because it's a strictly differential, current-driven bus. If the two wires aren't connected by anything except CAN transceivers, there's no chance you'll get communication.