LPC11C24 CANOpen 2.0B

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPC11C24 CANOpen 2.0B

2,244件の閲覧回数
will_intelli
Contributor III

Hello,

I'm using the CANOpen interface in the LPC11C24, it works fine for me, does anyone know if its supposed to work with CAN 2.0B extended IDs?

I'm not getting a response to an SDO request with an extended ID, but I don't know if its because I have it configured incorrectly.

The user manual doesn't mentioned anything about not supporting extended IDs in its "Differences to fully compliant CANOpen" section.

Will.

ラベル(1)
タグ(1)
0 件の賞賛
2 返答(返信)

629件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Customer,

    CANopen is based on the LPC11C24 ROM CAN, the ROM can can support extended ID, so I think the CANopen also can support the extended ID.

    When you configure the CAN module, you need to configure the ID to extended ID.

/* control bits for CAN_MSG_OBJ.mode_id */
#define CAN_MSGOBJ_STD  0x00000000UL   /* CAN 2.0a 11-bit ID */
#define CAN_MSGOBJ_EXT  0x20000000UL   /* CAN 2.0b 29-bit ID */
#define CAN_MSGOBJ_DAT  0x00000000UL   /* data frame */
#define CAN_MSGOBJ_RTR  0x40000000UL   /* rtr frame */

msg_obj.mode_id= CAN_MSGOBJ_EXT +Extended ID.

     You can try to configure the extended ID like the above code, then try your CANOpen again.

Wish it helps you!

If you still have question about it, please kindly let me know.


Have a great day,
Kerry

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

0 件の賞賛

629件の閲覧回数
will_intelli
Contributor III

Hi,

When you're using the internal CANOpen library, the value you pass for the ID is in the CAN_CANOPENCFG struct, and its an 8-bit value, so you wouldn't be able to set that bit. 

It ended up being simple enough to add in support for extended IDs using separate message filters, so I did that.

Will.

0 件の賞賛