S9S12G192F0CLL MSCAN Issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S9S12G192F0CLL MSCAN Issue

1,359 Views
Chicago1984
Contributor II

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[0]. STATUS[0] 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[0] to read TRANSMITTED? Do we need to clear or set some other flags?”

Labels (1)
0 Kudos
5 Replies

963 Views
Martin35804
NXP Employee
NXP Employee

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:

http://cache.freescale.com/files/microcontrollers/doc/app_note/AN2726.pdf?fasp=1&WT_TYPE=Application...

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.3.2.1 MSCAN Control Register 0 (CANCTL0)…

http://cache.freescale.com/files/32bit/doc/ref_manual/MC9S12GRMV1.pdf

I hope this will help.

0 Kudos

963 Views
andrea_mocci
Contributor II

Hi Martin,

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.

Any suggestion?

Thank you in advance,

Best regards,

Andrea Mocci

0 Kudos

963 Views
michaeledwardsc
Contributor I

Hello,

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.

0 Kudos

963 Views
andrea_mocci
Contributor II

Hi Michael,

Have you used an MSCAN library? If yes, where could I find it????

Best Regards,

Andrea Mocci

0 Kudos

962 Views
michaeledwardsc
Contributor I

Hello Andrea,

Yes, I still use it. It works like a charm.  I think you can use this one.  It was freely given to me by Freescale Europe or Germany. But they don't support. 

0 Kudos