AnsweredAssumed Answered

S12G CAN

Question asked by Thomas Dowad on Mar 5, 2014
Latest reply on Mar 6, 2014 by Thomas Dowad

I'm working with the S12G128 and S12GA240. By and large I have found these chips to be better documented and easier to work with than Kinetis. If you're look for a good replacement for an 8 bit processor, these are nice chips.

 

Anyway --- I've got a little problem. I've not worked with CAN before. I wrote a CAN driver in C for the GA MCU, and that was very easy to do and has run perfectly.

I am now using the same code with the G128, on more-or-less the same hardware (ie NXP driver chip).

I'm sending what should be the same message as I am with the GA. Same ID and so on.

 

But on the G128, it just keeps on sending...ad infinitum. I have scoped CanRx/Tx, and CANH and CANL. It looks good. The CanRx and CanTx are exactly the same from what I can see.

There is nothing else connected to the bus, but for a CAN monitoring device, and that monitoring device works with the GA MCU. I suppose it could be some other aspect of my code, that is tromping on memory, or something, because while the driver is the same, the rest of the code is not all the same. The G128 is using a lot more memory.

 

Unfortunately my understanding of CAN is weak, and I don't know MSCAN too well either. I am wondering what the conditions are that would cause MSCAN to keep sending.

 

If the signal on CANRX and CANTX are the same, should that not satisfy MSCAN that its tranmission was successful?

Could this problem be caused by a filter setting?

Does the peripheral have the built-in smarts to stop? Or do I need to monitor the error count and kill it?

Outcomes