9S12XEP100 CAN 2,0B

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

9S12XEP100 CAN 2,0B

388 Views
peteyo
Contributor II

Hi,

I am using 9S12XEP100 and want to know about CAN module setting.

My question is how to set to receive a CAN 2.0B message.

Which REG or bit needs to be set for CAN 2.0A/2.0B receive?

 

Or in receive mode, CAN module can receive both 2.0A and 2.0B, and I just need to check IDE bit to check the message is CAN 2.0A or 2.0B?

 

Thanks,

Labels (1)
0 Kudos
1 Reply

284 Views
RadekS
NXP Employee
NXP Employee

Hi Peter,

The msCAN module in S12XE devices is able to send and receive CAN messages in both standard and extended message formats.

If you set acceptance filter that both message formats may pass through it, the CAN module can receive both 2.0A and 2.0B messages, and you just need to check IDE bit to check whether the message is CAN 2.0A or 2.0B format.

Note: 2.0A format = standard format; 2.0B format = extended format.

When you want send CAN message, you have to fill Message buffer which consist from:

  1. four Identifier registers (4B, IDR0~3),
  2. eight Data Segment registers (8B, DSR0~7),
  3. one Data Length register (1B, DLR),
  4. one Transmit Buffer Priority register (1B, TBPR),
  5. two Time Stamp registers (2B, TSRH and TSRL)

The IDE bit is the fourth bit in IDR1 register.

Please see attached compilation of CAN example codes for your reference.

Note: The example codes was created for slightly older S12XD family, however, the module is the same and you can use CAN related code also for S12XE.

More S12XE example codes could be downloaded here:

https://community.nxp.com/docs/DOC-95116

or here:

https://community.nxp.com/docs/DOC-329209

I hope it helps you.

Have a great day,
Radek

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos