I am using S12DJ128. When COP reset, PCAN View captured a number of Stuff Erroe, Rx, and other Rx error while power reset did not. Is there any shutdown procedure for CAN module I shall do before COP reset?
Do you trigger COP reset intentionally or is it some undesired unpexpected event? If 2nd, then you can only fix you FW, so that COP doesn't happen. When COP times out, it is too late to shut down MSCAN. Not only CPU, but also all peripherals including MSCAN are reset, so any ongoing transmission from your MCU may be abrupt cancelled in the middle of message, leading to some CAN errors.
You should make sure MCU CAN pins are pulled up and not floating when reset occurs.
We trigger COP reset intentionally.
How to make sure MCU CAN pins are pulled up and not floating when reset occurs?
You could use oscilloscope.
Add pull up resistors.
I'm not sure, but maybe there's CAN transceiver on market with built in pull up devices on input pins?
What port pins is MSCAN routed to in your application? Port J has pull ups enabled out of reset, but not port M...
Retrieving data ...