2293 views|3 replies

15

Posts

0

Resources
The OP
 

AT32F425-Evaluation Report-CANOpen Porting 05 [Copy link]

 

Brief description

This series is based on the evaluation report of the Ateli-AT32F425R8T7-7 development board

Target:

> Transplant CANOpen protocol

Brief description:

CANopen is a high-level communication protocol based on the Controller Area Network ( CAN ). It includes communication sub-protocols and device sub-protocols and is often used in embedded systems . It is also a fieldbus commonly used in industrial control .

CANopen implements the protocols above (including) the network layer in the OSI model. The CANopen standard includes an addressing scheme, several small communication sub-protocols, and an application layer defined by a device sub-protocol . CANopen supports network management, device monitoring, and communication between nodes , including a simple transport layer that handles segmented data transmission and its combination. Generally, the data link layer and the physical layer are implemented using CAN. In addition to CANopen, there are other communication protocols (such as EtherCAT ) that implement

Tutorial:

CANOpen Tutorial Series | EmbeddedDevelop (strongerhuang.com)

NOTE: I also transplanted according to the above tutorial, the article is very well written

The code after porting is as follows:

Heartbeat message sending status

According to the above tutorial, after the code is transplanted, there will be a heartbeat message effect

Data analysis

Intercept a data frame:

Sequence number Transmission direction Timestamp ID Frame format Frame type Length Data
0 Receive 18:14:51.977.0 0x00000702 Data frame Standard frame 1 05

The above is one of the heartbeat messages, from which we can conclude:

Heartbeat message COB-ID: 0x0x00000702

Data type: Standard frame

Data length: 1

Data content: 0x05

Theoretical analysis

To know the meaning of the message, of course we have to look at the document. From the above figure, we can see that COB-ID is composed of 1792 (0x700) + Node-ID of CANOpen device.

I wrote node-id as 2 in the program, so the cob-id of the heartbeat can be seen in the message as 0x700+0x02

The data content 0x05 indicates that the current device status is Operational, which means that the entire protocol is normal and the device can communicate normally.

This post is from Domestic Chip Exchange

Latest reply

You can try canopen-stack, the canopen stack that was previously commercially configured by ucos, which is now open source.   Details Published on 2022-4-12 16:21
 
 

6841

Posts

11

Resources
2
 
I have learned new knowledge by transplanting the CANOpen protocol. Thanks for sharing. I hope I can learn this knowledge from you!
This post is from Domestic Chip Exchange
 
 
 

7452

Posts

2

Resources
3
 

You can try canopen-stack, the canopen stack that was previously commercially configured by ucos, which is now open source.

This post is from Domestic Chip Exchange

Comments

Thanks man, I'll go check it out  Details Published on 2022-4-17 18:53
Personal signature

默认摸鱼,再摸鱼。2022、9、28

 
 
 

15

Posts

0

Resources
4
 
freebsder posted on 2022-4-12 16:21 You can try canopen-stack, the canopen stack previously commercially configured by ucos, which is now open source.

Thanks man, I'll go check it out

This post is from Domestic Chip Exchange
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list