Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

XMC™ Forum Discussions

Not applicable
I am using XMC4400 Controller and I am converting Basic CAN functionality to Full CAN functionality.
I am facing difficulty in understanding Message Object allocation with LIST register-
As per my knowledge-
- XMC4400 supports 64 Message object and each MO must be allocated to one of the LIST register.
- There are 8 LIST registers in MultiCAN module
- Using PANCTR we can update/modify/remove the Message object to/from the LIST
(Please correct me if am wrong.)

So my question is Can we allocate all 64 MOs to single LIST register or is there is any limitation?.
I am not finding the clear explanation in reference Manual.

Thanking you in anticipation,

Regards
Nitin

P.S. If any such kind of thread is already present then please point me.
0 Likes
5 Replies
Not applicable
Hi Nitin,

yes, you can assign all available message objects to one list. All message objects are then linked to one CAN node (or to the list 0 which is not connected to any node (list of unallocated Elements)).
The list of unallocated Elements contains all message objects after reset per default...

Regards,
Mario
0 Likes
Not applicable
Hello Mario,

I am not able to visualize the working of LIST and Message Object Register. Please refer the following-

Suppose a NodeX prefers to accepts messages with any of the following identifiers 0x701, 0x702, and 0x703.

So these can be configured in Message Object Arbitration register as-
MOAR(1).ID= 0x701
MOAR(2).ID= 0x702
MOAR(3).ID= 0x703
even I have done all other settings and I have DISABLED Rx Interrupt.

Now suppose NodeY transmits a message with identifier 0x702. As this message reaches NodeX then at NodeX the identifier will be automatically compared with these MOAR(n) registers and the data associated with that identifier (0x702) will me automatically stored in MODATAL(2) and MODTAH(2).

If Message with Identifier 0x704 is transmitted then it will be automatically discarded.

Am I right at my understanding, does it works same way as explained above or is there any difference.
Thanking you in anticipation.

Regards
Nitin
0 Likes
Not applicable
Hi Nitin,

in the User Manual there is a good overview what conditions have to be met to be able to receive a message and store it in a message object (Chapter 18.3.6.1 Receive Acceptance Filtering, Reference Manual MultiCAN, V2.5 page 18-32 within User Manual XMC4500 V1.3, 2013-08).
Your decription is correct I think but you have to care about standard and extended messages (MOAR.ID bits 28:18 for standard -> ID is left aligned, 28:0 for extended). For a standard message with CAN-ID 0x701 you have to set MOAR(x) = 0x1C040000. The Mask within MOAMR(x) is correct by default. If the message object is assigned to the right node list and the other conditions described in the User Manual are met, the received frame will be stored in your message object.

Regards
Mario
0 Likes
Not applicable
Hello Mario,
Your last suggestion helped me a lot :). Actually I m referring XMC4400_rm_v1.5_2014_14 Reference Manual.

Interrupt Detection

How to detect from which message object the interrupt is generated?

Suppose a NodeX prefers to accepts messages with any of the following identifiers 0x701, 0x702, and 0x703.
Msg Object0 = 0x701
Msg Object1 = 0x702
Msg Object2 = 0x703

I have properly configured Message Arbitration and Acceptance filter.

Now if a message is received from any of above mentioned identifier. Then do I have to check each and every Object if it has received new data-

(Please refer the following pseudo code)

if (NSR(NodeX).RXOK == 1)
{
for(i=0; i<64; i++)
{
if ( MOSTAT(i).RXPDN == 1)
{
code to inform msg object i has generated interrupt
}
}
}

Is the same applicable for transmit Interrupt?

Thanking you in anticipation.

Warm Regards
Nitin Jadhav
0 Likes
User8570
Level 3
Level 3
Hi, Can you share an example how to Transmit/Receive CAN messages in polling mode?. I would like to avoid interrupts. Thanks in advance
0 Likes