CN113609059A - Communication system and communication method - Google Patents

Communication system and communication method Download PDF

Info

Publication number
CN113609059A
CN113609059A CN202110925667.2A CN202110925667A CN113609059A CN 113609059 A CN113609059 A CN 113609059A CN 202110925667 A CN202110925667 A CN 202110925667A CN 113609059 A CN113609059 A CN 113609059A
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.)
Granted
Application number
CN202110925667.2A
Other languages
Chinese (zh)
Other versions
CN113609059B (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

Images

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 invention provides a communication system and a communication method.A network node of virtual can equipment is established in a Cortex-A processor, and an rpmsg channel is established between the Cortex-A processor and a Cortex-M4 processor, so that an application layer can utilize a Linux network framework of the Cortex-A processor to realize can message communication between the application layer and the Cortex-M4 processor, and the instantaneity of can messages is ensured on the basis of not developing the network framework.

Description

Communication system and communication method
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a communication system and a communication method.
Background
Currently, there are two types of communication methods for a socket can, one is a communication method for a socket can in the case of a Cortex-a processor, and the other is a communication method for a socket can in the case of a Cortex-M4 processor.
The socket can communication mode under the Cortex-A processor can be directly used, but the Linux system has poor real-time performance and cannot ensure the real-time performance of the can message.
Although the socket can communication mode under the condition of the Cortex-M4 processor can ensure the real-time property of the can message, the network framework provided by the Linux system cannot be utilized, and developers need to develop software for the network framework, which is time-consuming and labor-consuming.
Disclosure of Invention
In view of this, the present invention provides a communication system and a communication method, which ensure the real-time property of the can message based on the network framework provided by the Linux system.
In order to achieve the above purpose, the invention provides the following specific technical scheme:
a communication system, comprising: a Cortex-A processor running a Linux operating system comprising a Linux network framework and a Cortex-M4 processor;
the Cortex-a processor comprises a network node of at least one virtual can device;
the Cortex-M4 processor is communicatively coupled to at least one can bus;
at least one rpmsg channel is deployed between the Cortex-A processor and the Cortex-M4 processor, and the network nodes of the virtual can devices are in one-to-one correspondence with the can buses through the rpmsg channels;
the application layer can communicate with the can bus connected to the Cortex-M4 processor through the Cortex-a processor and the rpmsg channel.
Optionally, the Cortex-a processor includes a transmit buffer;
after receiving application layer data of a sk _ buff data structure sent by an application layer through a Linux network framework under the Linux operating system in a socket can manner, a 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, and stores the converted data into the sending cache region in a first-in first-out manner;
after data is stored in the sending buffer zone, a first data sending event is triggered, 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 extract the data from the sending buffer zone, the data is sent to the Cortex-M4 processor through the rpmsg channel, the data is analyzed through the Cortex-M4 processor, and the data is sent to the can bus.
Optionally, the Cortex-a processor further includes a receive buffer;
after receiving a can bus message sent by the can bus, the Cortex-A processor stores the can bus message into the receiving cache region;
after the can bus message is stored in the receiving cache region, a second data sending event is triggered, after the second data sending event is triggered, the Cortex-A processor calls an event processing function corresponding to the second data sending event, the can bus message stored in the receiving cache region is converted into data conforming to a can data structure of the Linux operating system according to the first-in first-out sequence, the data is packaged into data of the sk _ buff data structure, and the data is sent to an application layer through a Linux network framework under the Linux operating system.
Optionally, the Cortex-a processor and the Cortex-M4 processor together allocate a shared memory space for the Cortex-a processor and the Cortex-M4 processor, and bind the network node of the virtual can device to the can bus via the rpmsg channel.
A communication method applied to the communication system disclosed in the above embodiment, the method includes:
the method comprises the steps that when application layer data sent by an application layer through a Linux network framework under a Linux operating system is received by a Cortex-A processor, the application layer data are converted into data conforming to a can message structure in a Cortex-M4 processor and are sent 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 data structure of the application layer and sends the data to the application layer through a Linux network framework 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 creating a network node of at least one virtual can device;
the Cortex-a processor and the Cortex-M4 processor together create at least one of the rpmsg channels between the Cortex-a processor and the Cortex-M4 processor, and bind the network node of the virtual can device created by the Cortex-a processor to the can bus to which the Cortex-M4 processor is connected through the rpmsg channel.
Optionally, the Cortex-a processor and the Cortex-M4 processor together binding the 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, including:
the Cortex-a processor and the Cortex-M4 processor collectively allocate a shared memory space for the Cortex-a processor and the Cortex-M4 processor and bind the network node of the virtual can device created by the Cortex-a processor to the can bus to which the Cortex-M4 processor is connected 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 transmit buffer and a receive buffer.
Optionally, the Cortex-a processor converts the application layer data into data conforming to a can message structure in a Cortex-M4 processor, and sends the data to a can bus connected to 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, which is sent by an application layer in a socket can mode by utilizing a Linux network framework 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 sending buffer area in a first-in first-out mode to trigger a first data sending event;
after the first data transmission event is triggered, the Cortex-a processor calls an event processing function corresponding to the first data transmission event to transmit the converted data stored in the transmission buffer to the can bus connected with the Cortex-M4 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 the 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 cache region 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 messages stored in the receiving cache region into data conforming to a can data structure of the Linux operating system according to a 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 framework under the Linux operating system.
Compared with the prior art, the invention has the following beneficial effects:
the invention discloses a communication system, which enables an application layer to utilize a Linux network framework of a Cortex-A processor to realize can message communication between the application layer and a Cortex-M4 processor by establishing a network node of virtual can equipment in the Cortex-A processor and establishing an rpmsg channel between the Cortex-A processor and the Cortex-M4 processor, and ensures the instantaneity of can messages on the basis of not developing the network framework.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a communication system according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of another communication system disclosed in the embodiment of the present invention;
fig. 3 is a flowchart illustrating a communication method according to an embodiment of the present invention;
fig. 4 is a schematic view of an application scenario of a communication system according to an embodiment of the present invention;
fig. 5 is a schematic view of an application scenario of another communication system according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to ensure the real-time property of can message communication between the application layer and the Cortex-M4 processor without developing a network framework, the present invention provides a communication system, please refer to fig. 1, which includes: a Cortex-a processor and a Cortex-M4 processor.
The Cortex-a processor is a series of processors based on the v7A architecture, such as a high-performance Cortex-a processor 15, a scalable Cortex-a processor 9, a market-validated Cortex-a processor 8 processor, and high-efficiency Cortex-a processor 7 and Cortex-a processor 5 processors.
Cortex-M4 processor or ARMCortexTMAn M4 processor, processing based on the v7ME architectureA device.
The Cortex-A processor runs a Linux operating system, which includes a Linux network framework.
The Cortex-a processor comprises a network node of at least one virtual can device.
The Cortex-M4 processor is communicatively coupled to at least one can bus.
At least one rpmsg (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 the can bus through the rpmsg channels, that is, the network nodes of the virtual can device are bound with the can bus connected with the Cortex-M4 processor through the rpmsg channels, the rpmsg channels may be one or multiple, that is, the network nodes of the virtual can device may be in one-to-one correspondence with the rpmsg channels, or multiple network nodes may correspond to one rpmsg channel.
Specifically, the Cortex-a processor and the Cortex-M4 processor together allocate a shared memory space for the Cortex-a processor and the Cortex-M4 processor, and bind the network nodes of the virtual can device to the can bus via the rpmsg channel.
The application layer carries out can message communication with a can bus connected with the Cortex-M4 processor through the Cortex-A processor and the rpmsg channel, so that the application layer can utilize a Linux network framework of the Cortex-A processor to realize the 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 of not developing the network framework.
Moreover, the reusability of the software program of the communication system disclosed by the invention is strong, regardless of bottom layer hardware, the fact that the can bus is placed in a Cortex-A processor or a Cortex-M4 processor is not concerned, for example, a set of codes needs to be rewritten for adaptation without changing a controller of the can bus every time, the development cost of the system is reduced, the development time is shortened, and the code portability is strong.
Further, referring to fig. 2, in order to improve the communication efficiency, the communication system disclosed in this embodiment creates a sending buffer and a receiving buffer in the Linux environment of the Cortex-a processor.
The sending buffer area is used for storing processed application layer data to be sent to the can bus, and the receiving buffer area is used for storing packed can bus messages received by the Cortex-A processor and sent by the Cortex-M4 processor.
The application layer data sends the data of the sk _ buff data structure to a kernel driver of the Cortex-A processor in a socket can mode by utilizing a network framework under a Linux operating system, 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 are stored in a sending cache area in a first-in first-out mode. For convenience of description, the event is defined as a first data transmission event, and after the first data transmission event is triggered, the Cortex-a processor calls an event processing function corresponding to the first data transmission event to fetch data from the transmission buffer, sends the data to the Cortex-M4 processor through the rpmsg channel, analyzes the data through the Cortex-M4 processor, and sends the data to the can bus.
Data on the can bus is sent to the Cortex-M4 processor, the Cortex-M4 processor processes and packs the data and sends the data to the Cortex-A processor through the rpmsg channel, the Cortex-A processor stores the data in the receiving buffer, and an event is triggered after the data is stored in the receiving buffer. And then after a second data sending event is triggered, the Cortex-A processor calls an event processing function corresponding to the second data sending event to fetch data from the receiving cache region, disassembles and packs the data into data of a sk _ buff data structure, and sends the data to the application layer through a network framework of a Linux operating system.
Based on the communication system disclosed in the above embodiment, the present embodiment correspondingly discloses a communication method, which is applied to the communication system disclosed in the above embodiment, please refer to fig. 3, and the method includes the following steps:
s101: the method comprises the steps that when application layer data sent by an application layer through a Linux network framework under a Linux operating system is received by a Cortex-A processor, the application layer data are converted into data conforming to a can message structure in a Cortex-M4 processor and sent to a can bus connected with the Cortex-M4 processor through an rpmsg channel;
s102: the Cortex-M4 processor sends the can bus message to the Cortex-A processor through the rpmsg channel under the condition that the processor receives the can bus message sent by the can bus;
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 framework under a Linux operating system.
It should be noted that before the Cortex-a processor communicates with the Cortex-M4 processor, the Cortex-a processor needs to create a network node of at least one virtual can device, register rpmsg device drivers, and set up an rpmsg device driver 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, so as to realize communication between the Cortex-a processor and the Cortex-M4 processor.
It is also necessary to bind the network nodes of the virtual can device created by the Cortex-a processor to the can bus of the Cortex-M4 processor, specifically, the Cortex-a processor and the Cortex-M4 processor share a shared memory space of the Cortex-a processor and the Cortex-M4 processor, and both the Cortex-a processor and the Cortex-M4 processor can access the shared memory space and bind the network nodes of the virtual can device to the can bus through the rpmsg channel.
Because the linux system runs on the Cortex-A processor core and is provided with a set of network framework, the application layer can directly call the network framework of the linux system without redeveloping the set of network framework. On the basis, through a socket can communication mode, application layer data is transmitted to a kernel driver through a network framework of a linux operating system of the Cortex-A processor, the kernel driver is a socket can communication driver based on an rpmsg channel, and the purpose of sending the data to a Cortex-M4 processor end can bus hardware equipment is achieved through the rpmsg channel. The specific implementation method comprises the following steps:
by utilizing a network framework in a Linux operating system, 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 the can message at the end of the Cortex-M4 processor through data, so that the data formats of the two parts are kept consistent, and the aim of data transmission is fulfilled.
The application layer sends sk _ buff data structure data, a network framework of the Linux operating system is communicated with the Cortex-A processor, the Cortex-A processor processes and converts the data of the sk _ buff data structure received from the application layer into a data structure which can be communicated with the Cortex-M4 processor and then sends the data structure to the Cortex-M4 processor through an rpmsg channel, otherwise, the Cortex-M4 processor can also transmit the data acquired on the can bus to the Cortex-A processor through the rpmsg channel in real time, and the Cortex-A processor converts the received data into data which accord with the can data structure of the Linux operating system, encapsulates the data into the data of the sk _ buff data structure and sends the data to the application layer through the Linux network framework under the Linux operating system.
Further, in order to improve communication efficiency, a transmission buffer and a reception buffer are created in the Linux environment of the Cortex-a processor.
Specifically, referring to fig. 4, in a scenario where the application layer sends data to the Cortex-M4 processor end can bus through the Cortex-a processor, the Cortex-a processor receives application layer data of a sk _ buff data structure, which is sent by the application layer in a socket can manner by using a Linux network framework 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; and after the first data transmission event is triggered, the Cortex-A processor calls an event processing function corresponding to the first data transmission event to transmit the converted data stored in the transmission buffer to a can bus connected with the Cortex-M4 processor through an rpmsg channel.
Referring to fig. 5, a Cortex-a processor receives data sent by a core-M4 processor side can bus and sends the data to an application layer scene, and the Cortex-a processor stores a received can bus message in a receiving buffer to trigger 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 messages stored in the receiving cache region 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 the application layer through a Linux network framework under the Linux operating system.
In the communication method disclosed in this embodiment, a network node of a virtual can device is created in a Cortex-a processor, and an rpmsg channel is created between the Cortex-a processor and a Cortex-M4 processor, so that a utilization layer can utilize a Linux network framework of the Cortex-a processor to implement can message communication between an application layer and a Cortex-M4 processor, and the real-time performance of can messages is ensured on the basis of not developing the network framework.
Moreover, the communication method disclosed in this embodiment does not consider the underlying hardware, and does not care about whether the can bus is placed in the Cortex-a processor or the Cortex-M4 processor, for example, a set of codes needs to be rewritten for adaptation without changing the controller of the can bus every time, so that the system development cost is reduced, the development time is shortened, and the code portability is strong.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
It is further noted that, herein, relational terms such as first and second, and the like may be 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. Also, 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 an … …" does not exclude the presence of other identical 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. A software module may reside 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 can be combined arbitrarily, and the features described in the embodiments in the present specification can be replaced or combined with each other in the above description of the disclosed embodiments, so that those skilled in the art can implement 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 invention. 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 invention. Thus, the present invention 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: a Cortex-A processor running a Linux operating system comprising a Linux network framework and a Cortex-M4 processor;
the Cortex-a processor comprises a network node of at least one virtual can device;
the Cortex-M4 processor is communicatively coupled to at least one can bus;
at least one rpmsg channel is deployed between the Cortex-A processor and the Cortex-M4 processor, and the network nodes of the virtual can devices are in one-to-one correspondence with the can buses through the rpmsg channels;
the application layer can communicate with the can bus connected to the Cortex-M4 processor through the Cortex-a processor and the rpmsg channel.
2. The system of claim 1, wherein the Cortex-a processor includes a transmit buffer;
after receiving application layer data of a sk _ buff data structure sent by an application layer through a Linux network framework under the Linux operating system in a socket can manner, a 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, and stores the converted data into the sending cache region in a first-in first-out manner;
after data is stored in the sending buffer zone, a first data sending event is triggered, 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 extract the data from the sending buffer zone, the data is sent to the Cortex-M4 processor through the rpmsg channel, the data is analyzed through the Cortex-M4 processor, and the data is sent to the can bus.
3. The system of claim 2, wherein the Cortex-a processor further comprises a receive buffer;
after receiving a can bus message sent by the can bus, the Cortex-A processor stores the can bus message into the receiving cache region;
after the can bus message is stored in the receiving cache region, a second data sending event is triggered, after the second data sending event is triggered, the Cortex-A processor calls an event processing function corresponding to the second data sending event, the can bus message stored in the receiving cache region is converted into data conforming to a can data structure of the Linux operating system according to the first-in first-out sequence, the data is packaged into data of the sk _ buff data structure, and the data is sent to an application layer through a Linux network framework under the Linux operating system.
4. The system of claim 1 wherein said Cortex-a processor and said Cortex-M4 processor collectively allocate a shared memory space for said Cortex-a processor and said Cortex-M4 processor and bind network nodes of said virtual can device to said can bus through said rpmsg channel.
5. A communication method applied to the communication system of any one of claims 1 to 4, the method comprising:
the method comprises the steps that when application layer data sent by an application layer through a Linux network framework under a Linux operating system is received by a Cortex-A processor, the application layer data are converted into data conforming to a can message structure in a Cortex-M4 processor and are sent 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 data structure of the application layer and sends the data to the application layer through a Linux network framework 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 creating a network node of at least one virtual can device;
the Cortex-a processor and the Cortex-M4 processor together create at least one of the rpmsg channels between the Cortex-a processor and the Cortex-M4 processor, and bind the network node of the virtual can device created by the Cortex-a processor to the can bus to which the Cortex-M4 processor is connected through the rpmsg channel.
7. The method of claim 6 wherein said Cortex-a processor and said Cortex-M4 processor together binding a network node of said virtual can device created by said Cortex-a processor to said can bus connected to said Cortex-M4 processor through said rpmsg channel, comprising:
the Cortex-a processor and the Cortex-M4 processor collectively allocate a shared memory space for the Cortex-a processor and the Cortex-M4 processor and bind the network node of the virtual can device created by the Cortex-a processor to the can bus to which the Cortex-M4 processor is connected through the rpmsg channel.
8. The method of claim 5, wherein 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 comprises:
the Cortex-a processor creates a transmit buffer and a receive buffer.
9. The method of claim 8 wherein said Cortex-a processor converts said application layer data to data conforming to a can message structure in a Cortex-M4 processor and sends it over an rpmsg channel to a can bus to which said Cortex-M4 processor is connected, comprising:
the kernel driver of the Cortex-A processor receives application layer data of a sk _ buff data structure, which is sent by an application layer in a socket can mode by utilizing a Linux network framework 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 sending buffer area in a first-in first-out mode to trigger a first data sending event;
after the first data transmission event is triggered, the Cortex-a processor calls an event processing function corresponding to the first data transmission event to transmit the converted data stored in the transmission buffer to the can bus connected with the Cortex-M4 through the rpmsg channel.
10. The method according to claim 8, wherein the Cortex-a processor converts the received can bus message into data conforming to the application layer data structure and sends it to the 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 cache region 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 messages stored in the receiving cache region into data conforming to a can data structure of the Linux operating system according to a 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 framework 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 true CN113609059A (en) 2021-11-05
CN113609059B 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)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114363425A (en) * 2021-11-30 2022-04-15 岚图汽车科技有限公司 SOME/IP service management method and related equipment
CN114710513A (en) * 2022-03-30 2022-07-05 广州导远电子科技有限公司 Network data processing system and method

Citations (6)

* 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
US20170203436A1 (en) * 2014-07-08 2017-07-20 Hongxing Wei Robotic hybrid system application framework based on multi-core processor architecture
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

Patent Citations (6)

* 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
US20170203436A1 (en) * 2014-07-08 2017-07-20 Hongxing Wei Robotic hybrid system application framework based on multi-core processor architecture
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 (4)

* Cited by examiner, † Cited by third party
Title
A. A. SALUNKHE ET AL.: "Design and implementation of CAN bus protocol for monitoring vehicle parameters", IEEE XPLORE *
张洪;吴钦章;杜春蕾;: "基于Linux虚拟网卡测试平台的系统设计", 电子设计工程, no. 17 *
曾定立等: "面向基带处理的异构多核架构软硬件平台设计", 单片机与嵌入式系统应用, no. 3 *
汪杰君等: "基于CAN现场总线的远程控制系统设计", 仪表技术与传感器, no. 2 *

Cited By (4)

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

Also Published As

Publication number Publication date
CN113609059B (en) 2023-09-05

Similar Documents

Publication Publication Date Title
CN106850402B (en) Message transmission method and device
CN110958281B (en) Data transmission method and communication device based on Internet of things
CN106034084B (en) Data transmission method and device
CN113609059A (en) Communication system and communication method
US10560929B2 (en) Resource request method and system, device, and network side node
CN114077480B (en) Method, device, equipment and medium for sharing memory between host and virtual machine
CN109547519B (en) Reverse proxy method, apparatus and computer readable storage medium
US20180262560A1 (en) Method and system for transmitting communication data
CN109688606B (en) Data processing method and device, computer equipment and storage medium
CN107135189B (en) Message sending method and physical machine
US9240952B2 (en) System and method for communication between networked applications
CN111242776A (en) Accounting method and device based on block chain, storage medium and electronic equipment
CN104426816A (en) Virtual machine communication method and device
CN117176633A (en) Bus cross-device communication method, device, equipment and storage medium
CN102681969B (en) Based on the long frame data transmission method of CAN
CN109218371B (en) Method and equipment for calling data
CN113204517B (en) Inter-core sharing method of Ethernet controller special for electric power
CN114697269A (en) Data communication method, apparatus, device and medium
KR20120044086A (en) System and method for interfacing between terminal and smart card
WO2012019376A1 (en) Method and apparatus for implementing network device function of wireless communication terminal
CN103269319A (en) Method, device and system for data transmission
CN113141385A (en) Data receiving and processing method and device, electronic equipment and storage medium
CN114710755B (en) Message processing method, vehicle-mounted communication device, electronic equipment and storage medium
CN117032040B (en) Sensor data acquisition method, device, equipment and readable storage medium
JP6218937B2 (en) Service scheduling method, system, terminal, and storage medium based on clustering system

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