CN113609059B - Communication system and communication method - Google Patents

Communication system and communication method Download PDF

Info

Publication number
CN113609059B
CN113609059B CN202110925667.2A CN202110925667A CN113609059B CN 113609059 B CN113609059 B CN 113609059B CN 202110925667 A CN202110925667 A CN 202110925667A CN 113609059 B CN113609059 B CN 113609059B
Authority
CN
China
Prior art keywords
cortex
processor
data
application layer
bus
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110925667.2A
Other languages
Chinese (zh)
Other versions
CN113609059A (en
Inventor
朱全胜
张丙酉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jingwei Hengrun Tianjin Research And Development Co ltd
Original Assignee
Jingwei Hengrun Tianjin Research And Development Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jingwei Hengrun Tianjin Research And Development Co ltd filed Critical Jingwei Hengrun Tianjin Research And Development Co ltd
Priority to CN202110925667.2A priority Critical patent/CN113609059B/en
Publication of CN113609059A publication Critical patent/CN113609059A/en
Application granted granted Critical
Publication of CN113609059B publication Critical patent/CN113609059B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4204Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a communication system and a communication method, wherein network nodes of virtual can equipment are created in a Cortex-A processor, and an rpmsg channel is created between the Cortex-A processor and a Cortex-M4 processor, so that an application layer can utilize a Linux network frame of the Cortex-A processor to realize can message communication between the application layer and the Cortex-M4 processor, and real-time performance of can messages is ensured on the basis that the development of the network frame is not required.

Description

Communication system and communication method
Technical Field
The present application relates to the field of communications technologies, and in particular, to a communications system and a communications method.
Background
At present, two communication modes are available, one is the socket can communication mode under the circumstance of a Cortex-A processor, and the other is the socket can communication mode under the circumstance of a Cortex-M4 processor.
The socket can communication mode under the condition of the Cortex-A processor can be directly used, but the real-time performance of the Linux system is poor, and the real-time performance of can messages cannot be guaranteed.
In the socket can communication mode under the circumstance of Cortex-M4 processor, real-time performance of can message can be guaranteed, but a network frame provided by a Linux system cannot be utilized, and a developer is required to develop software aiming at the network frame, so that time and labor are wasted.
Disclosure of Invention
In view of this, the present application provides a communication system and a communication method, which ensure real-time performance of can messages on the basis of a network framework provided by a Linux system.
In order to achieve the above purpose, the specific technical scheme provided by the application is as follows:
a communication system, comprising: the system comprises a Cortex-A processor and a Cortex-M4 processor, wherein the Cortex-A processor runs a Linux operating system which comprises a Linux network frame;
the Cortex-A processor comprises at least one network node of a virtual can device;
the Cortex-M4 processor is in communication connection with at least one can bus;
at least one rpmsg channel is deployed between the Cortex-A processor and the Cortex-M4 processor, and network nodes of the virtual can equipment are in one-to-one correspondence with the can buses through the rpmsg channel;
and the application layer performs can message communication through the Cortex-A processor and the can bus connected with the rpmsg channel and the Cortex-M4 processor.
Optionally, the Cortex-a processor includes a sending buffer;
after receiving application layer data of a sk_buff data structure sent by an application layer in a socket can mode through a Linux network frame under the Linux operating system, kernel drive of the Cortex-A processor converts the application layer data of the sk_buff data structure into data conforming to a can message structure in the Cortex-M4 processor, and stores the converted data in the sending buffer area in a first-in first-out mode;
triggering a first data transmission event after data are stored in the transmission buffer area, calling an event processing function corresponding to the first data transmission event by the Cortex-A processor to extract the data from the transmission buffer area after the first data transmission event is triggered, sending the data to the Cortex-M4 processor through the rpmsg channel, analyzing the data through the Cortex-M4 processor, and sending the data to the can bus.
Optionally, the Cortex-a processor further comprises a receiving buffer;
after receiving the can bus message sent by the can bus, the Cortex-A processor stores the can bus message into the receiving buffer area;
triggering a second data transmission event after the can bus message is stored in the receiving buffer area, calling an event processing function corresponding to the second data transmission event by the Cortex-A processor after the second data transmission event is triggered, converting the can bus message stored in the receiving buffer area into data conforming to a can data structure of the Linux operating system according to a first-in first-out sequence, packaging the data into data of the sk_buff data structure, and transmitting the data to an application layer through a Linux network frame under the Linux operating system.
Optionally, the Cortex-a processor and the Cortex-M4 processor jointly allocate a shared memory space between the Cortex-a processor and the Cortex-M4 processor, and bind the network node of the virtual can device with the can bus through the rpmsg channel.
A communication method applied to the communication system disclosed in the above embodiment, the method comprising:
under the condition that the Cortex-A processor receives application layer data sent by an application layer through a Linux network frame under a Linux operating system, converting the application layer data into data conforming to a can message structure in the Cortex-M4 processor, and sending the data to a can bus connected with the Cortex-M4 processor through an rpmsg channel;
the Cortex-M4 processor sends the can bus message to the Cortex-A processor through the rpmsg channel under the condition that the can bus message sent by the can bus is received;
and the Cortex-A processor converts the received can bus message into data conforming to the application layer data structure and sends the data to an application layer through a Linux network frame under the Linux operating system.
Optionally, before the Cortex-a processor receives the application layer data sent by the application layer through the Linux network framework under the Linux operating system, the method further includes:
the Cortex-A processor creates a network node of at least one virtual can device;
the Cortex-A processor and the Cortex-M4 processor jointly create at least one rpmsg channel between the Cortex-A processor and the Cortex-M4 processor, and bind network nodes of the virtual can device created by the Cortex-A processor with the can bus connected with the Cortex-M4 processor through the rpmsg channel.
Optionally, the Cortex-a processor and the Cortex-M4 processor bind together the network node of the virtual can device created by the Cortex-a processor with the can bus connected to the Cortex-M4 processor through the rpmsg channel, including:
the Cortex-A processor and the Cortex-M4 processor jointly allocate a shared memory space of the Cortex-A processor and the Cortex-M4 processor, and bind a network node of the virtual can device created by the Cortex-A processor with the can bus connected with the Cortex-M4 processor through the rpmsg channel.
Optionally, before the Cortex-a processor receives the application layer data sent by the application layer through a Linux network framework under a Linux operating system, the method further includes:
the Cortex-A processor creates a sending buffer area and a receiving buffer area.
Optionally, the Cortex-a processor converts the application layer data into data conforming to a can message structure in the Cortex-M4 processor, and sends the data to a can bus connected with the Cortex-M4 processor through an rpmsg channel, including:
the kernel driver of the Cortex-A processor receives application layer data of a sk_buff data structure sent by an application layer in a socket can mode by utilizing a Linux network frame under the Linux operating system;
the kernel driver of the Cortex-A processor converts the application layer data of the sk_buff data structure into data conforming to a can message structure in the Cortex-M4 processor;
the kernel driver of the Cortex-A processor stores the converted data in the transmission buffer area in a first-in-first-out mode, and triggers a first data transmission event;
after the first data sending event is triggered, the Cortex-A processor calls an event processing function corresponding to the first data sending event to send the converted data stored in the sending buffer area to the can bus connected with the Cortex-M4 processor through the rpmsg channel.
Optionally, the Cortex-a processor converts the received can bus packet into data conforming to the application layer data structure, and sends the data to an application layer through a Linux network framework under the Linux operating system, including:
the Cortex-A processor stores the received can bus message in the receiving buffer area and triggers a second data sending event;
after the second data sending event is triggered, the Cortex-A processor calls an event processing function corresponding to the second data sending event, converts the can bus message stored in the receiving buffer area into data conforming to a can data structure of the Linux operating system according to the first-in first-out sequence, encapsulates the data into data of a sk_buff data structure, and sends the data to an application layer through a Linux network frame under the Linux operating system.
Compared with the prior art, the application has the following beneficial effects:
according to the communication system disclosed by the application, the network node of the virtual can equipment is created in the Cortex-A processor, and the rpmsg channel is created between the Cortex-A processor and the Cortex-M4 processor, so that an application layer can utilize a Linux network frame of the Cortex-A processor to realize can message communication between the application layer and the Cortex-M4 processor, and real-time performance of can messages is ensured on the basis that the development of the network frame is not required.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic structural diagram of a communication system according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of another communication system according to an embodiment of the present application;
FIG. 3 is a schematic flow chart of a communication method according to an embodiment of the present application;
fig. 4 is a schematic diagram of an application scenario of a communication system according to an embodiment of the present application;
fig. 5 is a schematic diagram of an application scenario of another communication system according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In order to ensure real-time performance of can message communication between an application layer and a Cortex-M4 processor on the basis that a network framework does not need to be developed, the application provides a communication system, referring to fig. 1, which comprises: cortex-A processor and Cortex-M4 processor.
The Cortex-A processor is a series of processors based on v7A architecture, such as a high-performance Cortex-A processor 15, a telescopic Cortex-A processor 9, a market-verified Cortex-A processor 8, and efficient Cortex-A processors 7 and 5.
Cortex-M4 processor, ARMCortex TM -M4 processor, a v7ME architecture based processor.
The Cortex-A processor runs a Linux operating system, and the Linux operating system comprises a Linux network frame.
The Cortex-a processor comprises a network node of at least one virtual can device.
The Cortex-M4 processor is in communication with at least one can bus.
At least one rpmsg (English full name: remote Processor Messaging) channel is deployed between the Cortex-A processor and the Cortex-M4 processor, and the rpmsg protocol defines a standard binary interface used for communication between cores in the heterogeneous multi-core processing system. The network nodes of the virtual can device are in one-to-one correspondence with can buses through rpmsg channels, that is, the network nodes of the virtual can device are bound with can buses connected with a Cortex-M4 processor through the rpmsg channels, the rpmsg channels can be one or a plurality of, that is, the network nodes of the virtual can device can be in one-to-one correspondence with the rpmsg channels, and the network nodes can be in one-to-one correspondence with one rpmsg channel.
Specifically, the Cortex-A processor and the Cortex-M4 processor jointly allocate a shared memory space of the Cortex-A processor and the Cortex-M4 processor, and bind a network node of the virtual can device with the can bus through an rpmsg channel.
The application layer carries out can message communication through the Cortex-A processor and the can bus connected with the Cortex-M4 processor through the rpmsg channel, so that the application layer can utilize the Linux network frame of the Cortex-A processor to realize can message communication between the application layer and the can bus connected with the Cortex-M4 processor, and the real-time performance of can messages is ensured on the basis that the development of the network frame is not needed.
In addition, the reusability of the software program of the communication system disclosed by the application is stronger, no consideration is given to underlying hardware, no concern is given to whether a can bus is put into a Cortex-A processor or a Cortex-M4 processor, for example, a set of codes are required to be rewritten for adaptation without changing a controller of the can bus each time, the development cost of the system is reduced, the development time is shortened, and the portability of the codes is strong.
Further, in order to improve the communication efficiency, referring to fig. 2, in the communication system disclosed in this embodiment, a sending buffer area and a receiving buffer area are created in the Linux environment of the Cortex-a processor.
The receiving buffer area is used for storing the packed can bus message sent by the Cortex-M4 processor and received by the Cortex-A processor.
The application layer data utilizes a network frame under a Linux operating system, the data of the sk_buff data structure is sent to a kernel driver of a Cortex-A processor in a socket can mode, the kernel driver converts the data of the sk_buff data structure into data conforming to a can message structure in the Cortex-M4 processor, and the converted data is stored in a sending buffer area in a first-in first-out mode. For convenience of description, the embodiment defines the event as a first data sending event, after the first data sending event is triggered, the Cortex-a processor calls an event processing function corresponding to the first data sending event to fetch data from the sending buffer, sends the data to the Cortex-M4 processor through an rpmsg channel, analyzes the data through the Cortex-M4 processor, and sends the data to a can bus.
And the data on the can bus is sent to the Cortex-M4 processor, the Cortex-M4 processor processes and packages the data, the data is sent to the Cortex-A processor through the rpmsg channel, the Cortex-A processor stores the data in the receiving buffer area, and an event is triggered after the data is stored in the receiving buffer area, so that the event is defined as a second data sending event for convenience of description. And after triggering the second data transmission event, calling an event processing function corresponding to the second data transmission event by the Cortex-A processor to fetch data from the receiving buffer area, disassembling and packaging the data into data with various sk_buff data structures, and transmitting the data to an application layer through a network framework of a Linux operating system.
Based on a communication system disclosed in the foregoing embodiment, this embodiment correspondingly discloses a communication method, which is applied to the communication system disclosed in the foregoing embodiment, please refer to fig. 3, and the method includes the following steps:
s101: under the condition that the Cortex-A processor receives application layer data sent by an application layer through a Linux network frame under a Linux operating system, the application layer data are converted into data conforming to a can message structure in the Cortex-M4 processor, and the data are sent to a can bus connected with the Cortex-M4 processor through an rpmsg channel;
s102: when receiving a can bus message sent by a can bus, the Cortex-M4 processor sends the can bus message to the Cortex-A processor through an rpmsg channel;
s103: the Cortex-A processor converts the received can bus message into data conforming to the data structure of the application layer, and sends the data to the application layer through a Linux network frame under a Linux operating system.
Before the Cortex-A processor and the Cortex-M4 processor communicate, the Cortex-A processor needs to create network nodes of at least one virtual can device, register rpmsg device drivers and build an rpmsg device driving framework, and the Cortex-A processor and the Cortex-M4 processor together create at least one rpmsg channel between the Cortex-A processor and the Cortex-M4 processor to realize communication between the Cortex-A processor and the Cortex-M4 processor.
The network node of the virtual can device created by the Cortex-A processor is bound with the can bus of the Cortex-M4 processor, specifically, the Cortex-A processor and the Cortex-M4 processor jointly allocate a shared memory space of the Cortex-A processor and the Cortex-M4 processor, the Cortex-A processor and the Cortex-M4 processor can access the shared memory space, and the network node of the virtual can device is bound with the can bus through an rpmsg channel.
Because the linux system runs on the Cortex-A processor core, the linux system is provided with a set of network frames, and an application layer can directly call the network frames of the linux system without re-developing a set of network frames. On the basis, application layer data are transmitted to a kernel driver through a network frame of a linux operating system of a Cortex-A processor in a socket can communication mode, the kernel driver is socket can communication driver based on an rpmsg channel, and the purpose that the rpmsg channel is utilized to send the data to a Cortex-M4 processor end can bus hardware device is achieved. The specific implementation method is as follows:
and the Cortex-A processor converts the data of the sk_buff data structure obtained from the application layer into a standard data structure conforming to a Cortex-M4 processor end can message by utilizing a network frame in the Linux operating system, so that the data formats of the two parties are kept consistent, and the data transmission purpose is achieved.
The application layer sends sk_buff data structure data, the network frame of the Linux operating system is communicated with the Cortex-A processor, the Cortex-A processor processes the data of the sk_buff data structure received from the application layer and converts the data into a data structure which can be communicated with the Cortex-M4 processor, then the data is sent to the Cortex-M4 processor through an rpmsg channel, otherwise the Cortex-M4 processor can also send the data acquired on a can bus to the Cortex-A processor through the rpmsg channel in real time, and the Cortex-A processor converts the received data into the can data conforming to the Linux operating system, encapsulates the can data into the sk_buff data structure data and sends the can data to the application layer through the Linux network frame under the Linux operating system.
Further, in order to improve communication efficiency, a sending buffer area and a receiving buffer area are created in the Linux environment of the Cortex-a processor.
Specifically, referring to fig. 4, in a scenario that an application layer sends data to a can bus at a Cortex-M4 processor end through a Cortex-a processor, the Cortex-a processor receives application layer data of a sk_buff data structure sent by the application layer in a socket can mode by using a Linux network frame under a Linux operating system; the kernel driver of the Cortex-A processor converts the application layer data of the sk_buff data structure into data conforming to a can message structure in the Cortex-M4 processor; the kernel driver of the Cortex-A processor stores the converted data in a sending buffer area in a first-in first-out mode, a first data sending event is triggered, and after the first data sending event is triggered, the Cortex-A processor calls an event processing function corresponding to the first data sending event to send the converted data stored in the sending buffer area to a can bus connected with the Cortex-M4 processor through an rpmsg channel.
Referring to fig. 5, the Cortex-a processor receives data sent by a Cortex-M4 processor end can bus and sends the data to an application layer scene, and the Cortex-a processor stores the received can bus message in a receiving buffer area to trigger a second data sending event; after triggering the second data sending event, the Cortex-A processor calls an event processing function corresponding to the second data sending event, converts the can bus message stored in the receiving buffer area into data conforming to a can data structure of the Linux operating system according to the first-in first-out sequence, encapsulates the data into data of a sk_buff data structure, and sends the data to an application layer through a Linux network frame under the Linux operating system.
According to the communication method disclosed by the embodiment, the network node of the virtual can equipment is created in the Cortex-A processor, and the rpmsg channel is created between the Cortex-A processor and the Cortex-M4 processor, so that the utilization layer can utilize the Linux network frame of the Cortex-A processor, can realize can message communication between the application layer and the Cortex-M4 processor, and can guarantee real-time performance of can messages on the basis that the development of the network frame is not required.
In addition, the communication method disclosed by the embodiment does not consider underlying hardware, whether the can bus is put into the Cortex-A processor or the Cortex-M4 processor is not concerned, for example, a set of codes are required to be rewritten for adaptation without changing a controller of the can bus each time, the development cost of the system is reduced, the development time is shortened, and the portability of the codes is strong.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
It is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The above embodiments may be combined in any manner, and features described in the embodiments in the present specification may be replaced or combined with each other in the above description of the disclosed embodiments, so as to enable those skilled in the art to make or use the present application.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A communication system, comprising: the system comprises a Cortex-A processor and a Cortex-M4 processor, wherein the Cortex-A processor runs a Linux operating system which comprises a Linux network frame;
the Cortex-A processor comprises at least one network node of a virtual can device;
the Cortex-M4 processor is in communication connection with at least one can bus;
at least one rpmsg channel is deployed between the Cortex-A processor and the Cortex-M4 processor, and network nodes of the virtual can equipment are in one-to-one correspondence with the can buses through the rpmsg channel;
and the application layer performs can message communication through the Cortex-A processor and the can bus connected with the rpmsg channel and the Cortex-M4 processor.
2. The system of claim 1, wherein the Cortex-a processor comprises a transmit buffer;
after receiving application layer data of a sk_buff data structure sent by an application layer in a socket can mode through a Linux network frame under the Linux operating system, kernel drive of the Cortex-A processor converts the application layer data of the sk_buff data structure into data conforming to a can message structure in the Cortex-M4 processor, and stores the converted data in the sending buffer area in a first-in first-out mode;
triggering a first data transmission event after data are stored in the transmission buffer area, calling an event processing function corresponding to the first data transmission event by the Cortex-A processor to extract the data from the transmission buffer area after the first data transmission event is triggered, sending the data to the Cortex-M4 processor through the rpmsg channel, analyzing the data through the Cortex-M4 processor, and sending the data to the can bus.
3. The system of claim 2, wherein the Cortex-a processor further comprises a receive buffer;
after receiving the can bus message sent by the can bus, the Cortex-A processor stores the can bus message into the receiving buffer area;
triggering a second data transmission event after the can bus message is stored in the receiving buffer area, calling an event processing function corresponding to the second data transmission event by the Cortex-A processor after the second data transmission event is triggered, converting the can bus message stored in the receiving buffer area into data conforming to a can data structure of the Linux operating system according to a first-in first-out sequence, packaging the data into data of the sk_buff data structure, and transmitting the data to an application layer through a Linux network frame under the Linux operating system.
4. The system of claim 1, wherein the Cortex-a processor and the Cortex-M4 processor together allocate a shared memory space of the Cortex-a processor and the Cortex-M4 processor, and bind a network node of the virtual can device to the can bus through the rpmsg channel.
5. A communication method applied to the communication system of any one of claims 1 to 4, the method comprising:
under the condition that the Cortex-A processor receives application layer data sent by an application layer through a Linux network frame under a Linux operating system, converting the application layer data into data conforming to a can message structure in the Cortex-M4 processor, and sending the data to a can bus connected with the Cortex-M4 processor through an rpmsg channel;
the Cortex-M4 processor sends the can bus message to the Cortex-A processor through the rpmsg channel under the condition that the can bus message sent by the can bus is received;
and the Cortex-A processor converts the received can bus message into data conforming to the application layer data structure and sends the data to an application layer through a Linux network frame under the Linux operating system.
6. The method of claim 5, wherein before the Cortex-a processor receives application layer data sent by the application layer through a Linux network framework under the Linux operating system, the method further comprises:
the Cortex-A processor creates a network node of at least one virtual can device;
the Cortex-A processor and the Cortex-M4 processor jointly create at least one rpmsg channel between the Cortex-A processor and the Cortex-M4 processor, and bind network nodes of the virtual can device created by the Cortex-A processor with the can bus connected with the Cortex-M4 processor through the rpmsg channel.
7. The method according to claim 6, wherein the Cortex-a processor and the Cortex-M4 processor together bind a network node of the virtual can device created by the Cortex-a processor to the can bus connected to the Cortex-M4 processor through the rpmsg channel, comprising:
the Cortex-A processor and the Cortex-M4 processor jointly allocate a shared memory space of the Cortex-A processor and the Cortex-M4 processor, and bind a network node of the virtual can device created by the Cortex-A processor with the can bus connected with the Cortex-M4 processor through the rpmsg channel.
8. The method of claim 5, wherein before the Cortex-a processor receives application layer data sent by the application layer through a Linux network framework under a Linux operating system, the method further comprises:
the Cortex-A processor creates a sending buffer area and a receiving buffer area.
9. The method according to claim 8, wherein the Cortex-a processor converts the application layer data into data conforming to a can message structure in the Cortex-M4 processor and sends the data to a can bus connected to the Cortex-M4 processor through an rpmsg channel, comprising:
the kernel driver of the Cortex-A processor receives application layer data of a sk_buff data structure sent by an application layer in a socket can mode by utilizing a Linux network frame under the Linux operating system;
the kernel driver of the Cortex-A processor converts the application layer data of the sk_buff data structure into data conforming to a can message structure in the Cortex-M4 processor;
the kernel driver of the Cortex-A processor stores the converted data in the transmission buffer area in a first-in-first-out mode, and triggers a first data transmission event;
after the first data sending event is triggered, the Cortex-A processor calls an event processing function corresponding to the first data sending event to send the converted data stored in the sending buffer area to the can bus connected with the Cortex-M4 processor through the rpmsg channel.
10. The method according to claim 8, wherein the Cortex-a processor converting the received can bus message into data conforming to the application layer data structure and transmitting the data to an application layer through a Linux network framework under the Linux operating system, comprising:
the Cortex-A processor stores the received can bus message in the receiving buffer area and triggers a second data sending event;
after the second data sending event is triggered, the Cortex-A processor calls an event processing function corresponding to the second data sending event, converts the can bus message stored in the receiving buffer area into data conforming to a can data structure of the Linux operating system according to the first-in first-out sequence, encapsulates the data into data of a sk_buff data structure, and sends the data to an application layer through a Linux network frame under the Linux operating system.
CN202110925667.2A 2021-08-12 2021-08-12 Communication system and communication method Active CN113609059B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110925667.2A CN113609059B (en) 2021-08-12 2021-08-12 Communication system and communication method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110925667.2A CN113609059B (en) 2021-08-12 2021-08-12 Communication system and communication method

Publications (2)

Publication Number Publication Date
CN113609059A CN113609059A (en) 2021-11-05
CN113609059B true CN113609059B (en) 2023-09-05

Family

ID=78308338

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110925667.2A Active CN113609059B (en) 2021-08-12 2021-08-12 Communication system and communication method

Country Status (1)

Country Link
CN (1) CN113609059B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114363425B (en) * 2021-11-30 2023-06-13 岚图汽车科技有限公司 SOME/IP service management method and related equipment
CN114710513B (en) * 2022-03-30 2024-03-08 广州导远电子科技有限公司 Processing system and method for network data

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102137169A (en) * 2011-01-30 2011-07-27 华为技术有限公司 Method, network card and communication system for binding physical internet ports
EP3244311A1 (en) * 2016-05-10 2017-11-15 Huawei Technologies Co., Ltd. Multiprocessor system and method for operating a multiprocessor system
CN112347015A (en) * 2021-01-08 2021-02-09 南京芯驰半导体科技有限公司 Communication device and method between heterogeneous multiprocessors of system on chip
CN112667420A (en) * 2021-01-18 2021-04-16 科东(广州)软件科技有限公司 Method, device, equipment and storage medium for realizing internal communication of heterogeneous system
CN112947235A (en) * 2021-03-11 2021-06-11 深圳市阿丹能量信息技术有限公司 Cabin domain controller system based on X9 platform and Xen technology and application method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016004587A1 (en) * 2014-07-08 2016-01-14 北京航空航天大学 Robotic hybrid system application framework based on multi-core processor architecture

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102137169A (en) * 2011-01-30 2011-07-27 华为技术有限公司 Method, network card and communication system for binding physical internet ports
EP3244311A1 (en) * 2016-05-10 2017-11-15 Huawei Technologies Co., Ltd. Multiprocessor system and method for operating a multiprocessor system
CN112347015A (en) * 2021-01-08 2021-02-09 南京芯驰半导体科技有限公司 Communication device and method between heterogeneous multiprocessors of system on chip
CN112667420A (en) * 2021-01-18 2021-04-16 科东(广州)软件科技有限公司 Method, device, equipment and storage medium for realizing internal communication of heterogeneous system
CN112947235A (en) * 2021-03-11 2021-06-11 深圳市阿丹能量信息技术有限公司 Cabin domain controller system based on X9 platform and Xen technology and application method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于CAN现场总线的远程控制系统设计;汪杰君等;仪表技术与传感器(第2期);全文 *

Also Published As

Publication number Publication date
CN113609059A (en) 2021-11-05

Similar Documents

Publication Publication Date Title
CN113609059B (en) Communication system and communication method
CN108494817B (en) Data transmission method, related device and system
WO2018059137A1 (en) Internet of things terminal access device and method, and computer storage medium
US10609125B2 (en) Method and system for transmitting communication data
CN101076982A (en) Technology for controlling management flow
WO2022262437A1 (en) Power chip-based multichannel ethernet message processing method
CN107135189B (en) Message sending method and physical machine
CN111294235A (en) Data processing method, device, gateway and readable storage medium
CN110166485B (en) Protocol scheduling and using method and device
CN113127139A (en) Memory allocation method and device based on data plane development kit DPDK
WO2014139367A1 (en) Method and apparatus for message interactive processing
JP2014123363A5 (en)
CN103634185A (en) Information exchange bus-based secondary safety protective synchronous trans-regional service method
CN117176633A (en) Bus cross-device communication method, device, equipment and storage medium
US20110116426A1 (en) Cableless usb connectivity over ieee 802.11 networks
CN100391150C (en) Data transfer device and data transfer method of virtual ether net device
CN113691466A (en) Data transmission method, intelligent network card, computing device and storage medium
CN114780353B (en) File log monitoring method and system and computing device
CN113381987B (en) Data processing method of Internet of vehicles service, electronic equipment and computer storage medium
CN111711971B (en) Data transmission method and device, storage medium and electronic equipment
WO2019015487A1 (en) Data retransmission method, rlc entity and mac entity
US9078282B2 (en) Method and apparatus for implementing network device function of wireless communication terminal
JP7294577B2 (en) Methods, devices and computer programs for managing remote devices by managed devices
CN110928828B (en) Inter-processor service processing system
CN114189890A (en) Method, device, equipment and storage medium for updating network service quality model

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: Room 601, Building 4, Jingwei Hengrun R&D Center, No. 2, Huixiang Road, Zhangjiawo Town, Xiqing District, Tianjin, 300380

Applicant after: Jingwei Hengrun (Tianjin) research and Development Co.,Ltd.

Address before: Room 308, No.9 Fengze Road, automobile industrial zone, Xiqing District, Tianjin (Zhangjiawo Industrial Zone), 300380

Applicant before: Jingwei Hengrun (Tianjin) research and Development Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant