CAN001 tx/rx LMO problems

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

cross mob
Not applicable
Hi;

I am on DAVE3.1.8 using CAN001 version 1.0.8.

I'm trying to use the same CAN001 message object (e.g. LMO1) to both receive and transmit. That is, I'd like to be able to use LMO1 to transmit data via CAN001_SendDataFrame() but also receive data that is sent to me with LMO1.

I've read on other threads that you do this by setting LMO1 to Transmit Message Object and set the Standard Acceptance Mask to 0. I've done this, and yet I still don't register any receive interrupts in my CAN ISR.

If I set LMO1 to Receive Message Object, then I do get interrupts when data is received from the other device. But then of course I cannot transmit data since CAN001_SendDataFrame() is checking to see if this LMO is transmit-capable.

So my physical connection is good, I can receive data when LMO1 is set to Receive Message Object. But changing the LMO1 to Transmit Message Object with Standard Acceptance Mask set to 0, I then cannot receive data.

What is the proper way to properly configure a single LMO to both transmit and receive?

Thanks in advance,
Joe Shidle
0 Likes
6 Replies
Not applicable
Hi Joe,

I doubt this usage? Perhaps it is possible for handshaking communication?!

BR,
Zain
0 Likes
Not applicable
Thanks for the response, Zain.

It should be possible, according to Infineon representatives on this forum:

http://www.infineonforums.com/threads/341-Xmc-4500-can
http://www.infineonforums.com/threads/129-CAN001-App

Per their comments, I should be able to use Standard Acceptance Mask -> 0 to receive and transmit the same LMO, unless I am misinterpreting their comments.

Our architecture requires a command-response behavior for all LMOs. It would not be expedient to have a polling architecture (Rx-only LMOs using CAN001_SendRemoteFrame() requests) or use two LMOs (one Tx and one Rx inverted on each end).
0 Likes
Not applicable
Hi Joe,

Thanks for the links. I'm not sure whether this forum post "CanOpen" helps you?

BR,
Zain
0 Likes
Not applicable
Thanks for the response, Zain.

That link describes LMO1 used for receive only and LMO2 for transmit only. I want to be able to use LMO1 for both receive and transmit.

As an update, this is still not working for me.

Regards,
Joe Shidle
0 Likes
Not applicable
Hi Joe,

I'm also not very sure whether you are able to use one message object for both transmit and receive. I'll try to ask around...

Best regards,
Sophia
0 Likes
Not applicable
Hi Joe,

Ok, here is what i got:
From HW point of view a Tx CAN message object can send CAN data frame and receive CAN remote frame, while a Rx CAN message object sends remote CAN frame and receives CAN data frame.
DAVE function CAN001_ConfigMsgObj() checks which message object has been defined and function CAN001_SendDataFrame() sends only CAN data frame (also if this is a Rx object --> returns ‘error’), therefore user should check the return value of function CAN001_ConfigMsgObj(), CAN001_SendDataFrame()...

The proper way to configure a single LMO to both transmit and receive is:
1) To receive a data frame <- configure LMO as a Rx object
2) To send a data frame <- configure LMO as a Tx object

Hope it helps...

Best regards,
Sophia
0 Likes