I am working on establishing communication between two MC9S12XEP100 controllers using CAN MAX3050ASA interface.
Is there any sample code available for the same as per your protocol standards?
The application note AN3034 was recommended to you in your first case
Interfacing two MC9S12XEP100 using CAN MAX3050 interface
I can also recommend you to the MSCAN driver for the S12(X) devices:
MSCAN S12 driver
I hope it helps you.