AnsweredAssumed Answered

S12MSCANV2 How to access transmit buffer space?

Question asked by joel5 on Feb 8, 2013
Latest reply on Feb 12, 2013 by Radek Sestak

This is regarding a 9S12DJ128.  I am trying to implement a design using the CAN module in order to control an instrument panel cluster for a simulator.  I am writing the code directly in assembly language and not using an API.  The memory map for my processor for CAN0 is from $0140 - $017F.  Various configuration registers are defined from $0140 - $015F.  The receive foreground register is 16 bytes:  $0160 - $016F.  The transmit foreground register is 16 bytes:  $0170 - $017F.  Then, CAN1 takes over from $0180 - $01BF. 


Documentation states that there are 3 transmit buffers that are addressable by the CPU.  However, memory mapping only shows one, from $0170 - $017F.  Does anyone know how to address all of the transmit buffers?  There are transmit buffer select bits in the CANTBSEL register:  TX2 - TX0.  It states:  The lowest numbered bit places the respective transmit buffer in the CANTXFG ($0170 - $017F) register space.


My question is, how does the CPU know where the 3 transmit buffers are located?  I.e., how can I load a message into either transmit buffer 1 or 2 or 3, when I don't even know where it is mapped in memory?


I appreciate the help of anyone with expertise in this area.