I set up the CAN interface using the MSCAN driver and I can see that data is being transmitted ( as verified by being correctly received on another device). However, after the first transmission, TRANSMITTED (or 6) is never being set when we look at STATUS. STATUS always returns QUEUED2( or 3) to us. Since STATUS is never changing to TRANSMITTED we cannot send more data. What is required to get STATUS to read TRANSMITTED? Do we need to clear or set some other flags?”
Try to check whether the flags are set up correctly for the MSCAN driver. There is a function for this page 33, 6.4.5 Check_CAN_Status of the MSCANDriver For S12 + S12X UserManual (attached).
Or e.g., page 7:
This reads out the registers for the MSCAN set up and status. This function obtains the status of the msCAN module. This function will write the status of the msCAN module to the address specified in the argument. The status will be 3 bytes with bits corresponding to the following register names of the msCAN that can be found with description in datasheet of MC9S12G Family, page 573, 18.104.22.168 MSCAN Control Register 0 (CANCTL0)…
I hope this will help.
I have found the document but I am not able to locate the MSCAN driver source code; I am using an MC9S12G48 and, unfortunately, it does not have xGATE co-processor and AN2726 is useless in this case.
Thank you in advance,
I have used CAN driver for 10 or more years. I have never found source code to driver. I was told there was no plans to release but that was some time ago.
My experience has been on a MC912DG128 and not to many issues.