[go: up one dir, main page]

CN118612181B - A coordinated sending method for CAN shared mailbox - Google Patents

A coordinated sending method for CAN shared mailbox Download PDF

Info

Publication number
CN118612181B
CN118612181B CN202411089972.2A CN202411089972A CN118612181B CN 118612181 B CN118612181 B CN 118612181B CN 202411089972 A CN202411089972 A CN 202411089972A CN 118612181 B CN118612181 B CN 118612181B
Authority
CN
China
Prior art keywords
mail
sending
sent
mailbox
information
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
CN202411089972.2A
Other languages
Chinese (zh)
Other versions
CN118612181A (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.)
Hunan Jinxin Electronic Technology Co ltd
Original Assignee
Hunan Jinxin Electronic Technology 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 Hunan Jinxin Electronic Technology Co ltd filed Critical Hunan Jinxin Electronic Technology Co ltd
Priority to CN202411089972.2A priority Critical patent/CN118612181B/en
Publication of CN118612181A publication Critical patent/CN118612181A/en
Application granted granted Critical
Publication of CN118612181B publication Critical patent/CN118612181B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/42Mailbox-related aspects, e.g. synchronisation of mailboxes
    • 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
    • H04L12/40006Architecture of a communication node
    • 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)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)

Abstract

本发明提供了一种CAN共享邮箱的协调发送方法,涉及通信技术领域,其包括如下步骤:S1,第i个CAN_i发送邮件[i][j]的发送请求,且邮件[i][j]有邮件信息;S2,轮询所有CAN,获取第j个CAN_j给出应答信号ACK[j],锁定所述邮件[i][j];S3,CAN_i接收并发送邮件n信息给CAN_j;CAN_i的邮件n信息,从CAN_j发送端口发送;S4,CAN_j发送完成后,CAN_j的ACK[j]拉低。本发明新增CAN的外围信号,在原有内部系统网络通信的基础上,实现了在同一个芯片系统中邮箱间的邮件信息传递方法,大大提高了邮箱间的访问效率,减少了CAN总线的资源占用。

The present invention provides a coordinated sending method of a CAN shared mailbox, which relates to the field of communication technology, and comprises the following steps: S1, the i-th CAN_i sends a sending request for mail [i][j], and mail [i][j] has mail information; S2, polling all CANs, obtaining the j-th CAN_j to give a response signal ACK[j], and locking the mail [i][j]; S3, CAN_i receives and sends mail n information to CAN_j; the mail n information of CAN_i is sent from the sending port of CAN_j; S4, after CAN_j completes sending, ACK[j] of CAN_j is pulled low. The present invention adds a peripheral signal of CAN, and on the basis of the original internal system network communication, realizes a mail information transmission method between mailboxes in the same chip system, greatly improves the access efficiency between mailboxes, and reduces the resource occupation of the CAN bus.

Description

Coordinated sending method of CAN shared mailbox
Technical Field
The invention relates to the technical field of communication, in particular to a coordinated transmission method of a CAN shared mailbox.
Background
The CAN (multi-host local network serial communication protocol) communication protocol is mainly used for vehicle-mounted communication, a plurality of CAN are mounted on a CAN bus to form a multi-host local network, and the communication among CAN mailboxes is fast, safe and efficient, so that the vehicle-mounted system is fast adapted to the current vehicle-mounted system which is more and more intelligent.
The CAN bus signals complete information transmission in a mode that mail information of CAN is transmitted to another CAN mailbox through serial ports through bus interfaces on two differential voltage signal lines, and if mail information among a plurality of CAN is transmitted in the same chip system, the transmission rate of the CAN is limited by 1Mbit/s through the differential voltage signal lines. In addition, the mailbox information of the existing CAN is independent.
The background description provided herein is for the purpose of generally presenting the context of the disclosure. Unless otherwise indicated herein, the materials described in this section are not prior art to the claims in this application and are not admitted to be prior art by inclusion in this section.
Disclosure of Invention
Aiming at the technical problems in the related art, the invention provides a coordinated sending method of a CAN shared mailbox, which is applied to a CAN communication system, wherein the system comprises N CAN, the N CAN are communicated through a CAN bus, the N CAN is provided with a top mailbox shared signal of the CAN, a CAN internal mailbox comprises a mail sending and a mail receiving, and the N is a positive integer larger than 1; the method comprises the following steps:
S1, an ith CAN_i sends a sending request of a mail [ i ] [ j ], and the mail [ i ] [ j ] has mail information;
s2, all CAN are polled, a j-th CAN_j is obtained to give out an answer signal ACK [ j ], and the mail [ i ] [ j ] is locked;
S3, the CAN_i receives and sends mail n information to the CAN_j; mail n information of CAN_i is sent from a CAN_j sending port;
and S4, after the CAN_j is sent, the ACK [ j ] of the CAN_j is pulled down.
Specifically, the step S4 further includes: s5, finishing the ACK response, continuing to poll the transmission request by CAN_i, waiting for the next coordinated transmission request, and waiting for the requests of other CAN to transmit to CAN_i.
Specifically, all CAN_n are polled, and whether responses are responded or not is checked in sequence;
CAN_0-CAN_j-1, no response;
CAN_j gives a response signal, and the mail [ i ] [ j ] is locked and not sent and changed by CAN_i.
Specifically, the step S4 specifically includes: after CAN_j responds, CAN_i receives and sends mail n information to CAN_j;
mail n information of CAN_i is sent from a CAN_j sending port;
Mail n of can_i is unlocked;
Manually updating the filling state of the mail [ i ] [ j ] of the CAN_i; the filling state of the mail [ i ] [ j ] of the CAN_i is updated manually, and specifically, the filling state of the mail [ i ] [ j ] of the CAN_i is updated through a DSP or other hosts.
Specifically, the step S1 specifically includes: CAN_i coordinates CAN_j to send request command CAN_REQ_i;
the CAN_REQ_i request is configured by a DSP or other host.
Specifically, can_i polls can_req_i [ j ] [ n ] and the filling state of mail n is not null and waits for a response can_ack_j [ i ] sent by can_j, then mail n of can_i is locked, mail n is not written by DSP or other host, and content of mail n is not sent by can_i.
Specifically, after the response, the mail n is locked, if CAN_i designates to send the mail n to the bus interface, the sending state of CAN_i is in a waiting state, and after the response of CAN_j is completed, the locking CAN be released, and CAN_i starts to send the mail n to the CAN bus interface; if CAN is sent sequentially and the response state of CAN_ACK_j [ i ] is pulled up, skipping mail n and continuing to send n+1 content.
Specifically, if the can_j coordinates to send the mail n information sent by the can_i, the can_ack_j [ i ] responds to complete, and can_i updates the filling state of the mail n, if the filling state of the mail n is cleared, can_i cannot be sent secondarily, and if the filling state of the mail n is not cleared, can_i CAN be sent secondarily.
In a second aspect, another embodiment of the present invention provides a coordinated sending method of a CAN shared mailbox, which is applied to a CAN communication system, where the system includes N CANs, the N CANs communicate through a CAN bus, the N CANs have top-level mailbox shared signals of the CAN, and a CAN internal mailbox includes sending and receiving mails, and the N is a positive integer greater than 1; the method comprises the following steps:
S1, under an idle state, CAN_j receives a coordinated transmission command of CAN_i, and CAN_j transmits a response CAN_ACK_j [ i ] to CAN_i;
s2, after the response, locking the sending function of the CAN_j bus interface, wherein CAN_j receives the mail n information of CAN_i, the mail n is not written into the internal mail of CAN_j, only the sending function of the bus interface of CAN_j is occupied, and the mail n information of CAN_i is sent through the bus interface of CAN_j;
S3, after the response, detecting a CAN_j bus interface sending completion signal, wherein the CAN_j sending response CAN_ACK_j [ i ] is pulled down, and the CAN_j releases the locking of a mailbox of the user.
S4, the CAN_j continues to be in an idle state, and polling is conducted to check the coordination transmission request of other CAN.
Specifically, after the response, the sending function of the CAN_j bus interface is locked, the CAN_j sends the mailbox lock of the CAN_j and cannot be sent out through the CAN_j bus interface, waiting is needed, the coordinated sending priority is highest, and only after the coordinated sending of the CAN_j is finished, the CAN_j mailbox CAN be sent to the bus interface of the CAN_j.
The invention adds the external signal of CAN, based on the original internal system network communication, realizes the mail information transmission method between mailboxes in the same chip system, greatly improves the access efficiency between the mailboxes and reduces the resource occupation of CAN bus.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic structural diagram of a CAN mailbox sharing provided in an embodiment of the present invention;
FIG. 2 is a schematic diagram of a command sent by a CAN mailbox sharing device according to an embodiment of the invention;
FIG. 3 is a schematic diagram of a command sent in coordination by a CAN shared mailbox provided by an embodiment of the invention;
fig. 4 is a flowchart of a coordinated sending method of a CAN shared mailbox provided by an embodiment of the present invention;
FIG. 5 is a CAN_i flowchart of CAN_i coordination CAN_j sending mail provided by an embodiment of the invention;
fig. 6 is a can_j flowchart of can_i coordinating can_j sending mail provided by an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention 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 invention, but not all embodiments. All other embodiments, which are derived by a person skilled in the art based on the embodiments of the invention, fall within the scope of protection of the invention.
Example 1
Referring to fig. 1, a CAN mailbox sharing method of the present embodiment is used in a CAN communication system, where the CAN communication system includes N CAN communication interfaces can_0..can_n, each of which has one or more mailboxes, that is, each of which CAN read and write a corresponding mailbox, and in the prior art, access operations are generally performed to internal mailboxes of the CAN through an on-chip system bus network (in which the on-chip system bus network is used to configure registers and mailbox contents of the CAN), such as an AMBA bus, and mail messages of the mailboxes of the CAN are triggered to be transferred to a CAN bus interface (in which the CAN bus interface is used to send/receive mails by the CAN), so as to perform transfer of mail messages between the CANs. This results in the transmission of mail messages between a plurality of CAN's in the same chip system, which is limited by the transmission rate of CAN's of 1Mbit/s via differential voltage signal lines.
Referring to fig. 2-3, this embodiment discloses a CAN mailbox sharing method, where each CAN mailbox CAN accept mailbox sharing status and control, and then control the mailbox according to the mailbox sharing status and control information. The state and control information shared by the mailbox in this embodiment are expressed by the response and control information to the corresponding command, for example, the ACK response to the read-write command, the CAN response to the coordinated transmission command, and the control information thereof. Reference is made to the following detailed description for specific implementations.
The mail sharing state and control information are mutually transferred between the CAN, and the mail transferring and receiving operation between the CAN CAN be completed by applying other mail boxes to coordinate the sending request, reading the mail information request of the other mail boxes, obtaining the working state of the other mail boxes, sending and receiving the mail operation of the other mail boxes, and returning the mail sharing information such as the empty and full state information of the other mail boxes or the self mail boxes. The working state of the mailbox of the embodiment comprises: mailbox lock determined by fate, mailbox reply command ACK, etc.; the empty and full state information of the mailbox is confirmed through the mailbox filling state. In the process of sending and receiving commands and executing the commands, the CAN interface of the embodiment outputs state information inside each CAN according to the running state of each CAN, and each CAN receives internal state information (such as mailbox filling, mail information and the like) from each CAN, and only confirms the state information of the CAN to be received through the commands to perform corresponding state response.
In this embodiment, taking can_0 as an example to coordinate other CAN shared mailboxes in the same chip system, a specific CAN external communication architecture is shown in fig. 1. For each CAN add-on peripheral signal, the add-on peripheral signal includes: the method comprises the steps of reading and writing a control signal wr_n [ n:0] of a mailbox, a chip selection signal cs_n [ n:0] of a CAN, a mailbox response signal ack_n [ n:0], a mail [ n ] sending request, a response of the CAN [ n ] to the mail sending request and the filling state of the mailbox, and judging the types of other CAN requests: mailbox read-write request, request for sending coordinated mails, CAN response of mail generation request and filling state of mailboxes among each other. Through the basic information, information sharing of the shared mail and resource coordination are completed.
The CAN sharing mailbox of the invention has 2 operation modes in total: reading and writing operations of mails and coordinated sending operations of mails.
First kind: reading and writing operations of mails: the mail read-write request wr_0[1 is that the n-th mail of the mailbox of CAN_1 is read-written by CAN_0, wherein the read operation does not modify the mailbox filling state, the write operation updates the filling state of the mailbox, and the read-write request command is confirmed to be received by which CAN by judging that each CAN responds to the request of CAN_0.
Second kind: coordinated sending operation of mails: the sending request of the mail n [0] is a sending request of an nth mailbox initiated by CAN_0, wherein the CAN_0 confirms which CAN the sending request command is received by a polling mode, once the sending request CAN_0 is confirmed, the coordinated sending function is locked by the receiving command CAN, and only if the sending completion or manual release of the command CAN is accepted, the CAN_0 CAN start the coordinated sending function. The filling state of the CAN mailbox of the received command cannot be updated, and after the completion of the transmission, the filling state of the CAN_0 mailbox needs to be manually updated. The manual update in this embodiment refers to the read-write operation of the filling status register of the mailbox through the DSP or other host.
And after the shared mailbox is sent in a coordinated manner, the filling state of the mailbox is not changed, the locking state of the mailbox is released, and at the moment, a user sends again according to the need or not, if the user does not need to send again, the DSP or other hosts clear the filling state bit of the mailbox, so that secondary sending is prevented, and CAN bus resources are saved. I.e. the present embodiment controls the filling status bit of the mailbox by the user if it is to be sent again (manually updated) as required. The manual meaning is that the flexibility of the user is increased, and the possibility that the user needs secondary transmission is increased.
Referring to fig. 4-5, the embodiment discloses a coordinated sending method of a CAN shared mailbox, which is applied to a CAN communication system, wherein the system comprises N CANs, the N CANs communicate through a CAN bus, the N CANs have top-level mailbox shared signals of the CAN, a CAN internal mailbox comprises a mail sending and mail receiving, and the N is a positive integer greater than 1;
The method comprises the following steps:
S1, an ith CAN_i sends a sending request of a mail [ i ] [ j ], and the mail [ i ] [ j ] has mail information;
Step S1 is specifically that CAN_i coordinates CAN_j to send a request command CAN_REQ_i;
the CAN_REQ_i request is configured by a DSP or other host.
S2, all CAN are polled, a j-th CAN_j is obtained to give out an answer signal ACK [ j ], and the mail [ i ] [ j ] is locked;
In the embodiment, CAN_i polls all CAN_n and sequentially checks whether to answer;
CAN_0-CAN_j-1, no response;
CAN_j gives a response signal, and the mail [ i ] [ j ] is locked and not sent and changed by CAN_i.
S3, the CAN_i receives and sends mail n information to the CAN_j; mail n information of CAN_i is sent from a CAN_j sending port;
s4, after the CAN_j is sent, the ACK [ j ] of the CAN_j is pulled down;
after CAN_j responds, CAN_i receives and sends mail n information to CAN_j;
mail n information of CAN_i is sent from a CAN_j sending port;
Mail n of can_i is unlocked;
The filling status of the mail i j of AN i is manually updated.
After ACK [ j ] is pulled low, the present embodiment further includes step S5: the ACK acknowledgement is completed, can_i continues to poll for a transmission request, waits for the next coordinated transmission request, and waits for requests for other CAN's to transmit to can_i.
Specifically, CAN_i starts from CAN_REQ_i [0] [0] to poll whether the request is valid (pulled high), if the request waits for a certain time without a response, the coordination sending command is manually canceled, otherwise, CAN_i always waits for the request response;
Can_i polls can_req_i [ j ] [ n ] to be pulled high, and the filling state of mail n is not null and waits for a response can_ack_j [ i ] sent by can_j, then mail n of can_i is locked, mail n is not written by DSP or other host, and the content of mail n is not sent by can_i.
After the response, CAN_i sends mail n information to CAN_j.
After the response, the mail n is locked, if CAN_i designates to send the mail n to the bus interface, the sending state of CAN_i is in a waiting state, and after the response of CAN_j is completed, the locking CAN be released, and CAN_i starts to send the mail n to the CAN bus interface; if CAN is sent sequentially and CAN_ACK_j [ i ] responds to the state (pulled high), skipping mail n and continuing to send n+1 content.
CAN_j coordinates the sending of the mail n information sent by CAN_i, CAN_ACK_j [ i ] responds to completion (pulling low), CAN_i updates the filling state of mail n, if the filling state of mail n is cleared, CAN_i cannot be sent secondarily, and if the filling state of mail n is not cleared, CAN_i CAN be sent secondarily.
In this embodiment can_i first sends a mail sending request, polls all CANs, when there is a CAN giving a response signal, sends a mail through the CAN giving the response, adds a peripheral signal of the CAN in the invention, on the basis of the original internal system network communication, the mail information transmission method between the mailboxes in the same chip system is realized, the access efficiency between the mailboxes is greatly improved, and the resource occupation of the CAN bus is reduced.
Example two
Referring to fig. 6, the embodiment discloses a coordinated sending method of a CAN shared mailbox, which is applied to a CAN communication system, wherein the system comprises N CANs, the N CANs communicate through a CAN bus, the N CANs have top-level mailbox shared signals of the CAN, a CAN internal mailbox comprises a mail sending and mail receiving function, and the N is a positive integer greater than 1;
the method is applied to sending mails in CAN_j, and comprises the following steps of:
S1, under an idle state, CAN_j receives a coordinated transmission command of CAN_i, and CAN_j transmits a response CAN_ACK_j [ i ] to CAN_i;
And the CAN_j receives a coordinated transmission command of the CAN_i, and receives a read-write mail n command in the CAN_j idle state, specifically, the CAN_j does not transmit a coordinated transmission command CAN_REQ_j to other CAN, the CAN_j does not transmit mails to a CAN bus interface, or the CAN_j bus interface is receiving other mail information.
In the CAN_j idle state, the received coordination transmission request is detected in a polling way, and when the CAN_j detects the command of a coordination transmission command CAN_REQ_i [ j ] [ n ] of the CAN_j, a response signal CAN_ACK_j [ i ] is transmitted to the CAN_i.
S2, after the response, locking the sending function of the CAN_j bus interface, wherein CAN_j receives the mail n information of CAN_i, the mail n is not written into the internal mail of CAN_j, only the sending function of the bus interface of CAN_j is occupied, and the mail n information of CAN_i is sent through the bus interface of CAN_j;
After the response, the sending function of the CAN_j bus interface is locked, but the internal mailbox of the CAN_j CAN be accessed by the chip system bus. After the response, the CAN_j receives the mail n information of the CAN_i, the mail n is not written into the internal mail of the CAN_j, only the sending function of the bus interface of the CAN_j is occupied, and the mail n information of the CAN_i is sent through the bus interface of the CAN_j.
After the response, locking the sending function of the CAN_j bus interface, wherein the CAN_j sends the self mailbox lock, CAN not be sent out through the CAN_j bus interface and needs to wait, at the moment, the coordinated sending priority is highest, and only after the CAN_j coordinated sending is finished, the CAN_j self mailbox CAN be sent to the CAN_j bus interface;
after the response, the sending function of the CAN_j bus interface is locked, but the internal mailbox of the CAN_j CAN be accessed by the chip system bus.
After the response, the CAN_j receives the mail n information of the CAN_i, the mail n is not written into the internal mail of the CAN_j, only the sending function of the bus interface of the CAN_j is occupied, and the mail n information of the CAN_i is sent through the bus interface of the CAN_j.
S3, after the response, detecting a CAN_j bus interface sending completion signal, wherein the CAN_j sending response CAN_ACK_j [ i ] is pulled down, and the CAN_j releases the locking of a mailbox of the user.
S4, the CAN_j continues to be in an idle state, and polling is conducted to check the coordination transmission request of other CAN.
The CAN of the embodiment polls the signals on the CAN bus, when the CAN is idle and gives out response signals, the mail is sent out through the CAN giving out response, the invention adds the peripheral signals of the CAN, on the basis of the original internal system network communication, the mail information transmission method between the mailboxes in the same chip system is realized, the access efficiency between the mailboxes is greatly improved, and the resource occupation of the CAN bus is reduced.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, alternatives, and improvements that fall within the spirit and scope of the invention.

Claims (8)

1. The coordinated sending method of the CAN shared mailbox is applied to a CAN communication system, the system comprises N CAN, the N CAN are communicated through a CAN bus, the N CAN are provided with top-layer mailbox shared signals of the CAN, the CAN internal mailbox comprises a mail sending and mail receiving function, and the N is a positive integer greater than 1; the method is characterized in that: the method comprises the following steps:
S1, an ith CAN_i sends a sending request of a mail [ i ] [ j ], and the mail [ i ] [ j ] has mail information;
s2, all CAN are polled, a j-th CAN_j is obtained to give out an answer signal ACK [ j ], and the mail [ i ] [ j ] is locked;
S3, the CAN_i receives and sends mail n information to the CAN_j; mail n information of CAN_i is sent from a CAN_j sending port;
s4, after the CAN_j is sent, the ACK [ j ] of the CAN_j is pulled down;
CAN_j coordinates the sending of mail n information sent by CAN_i, then ACK_j is answered to completion, CAN_i updates the filling state of mail n, if the filling state of mail n is cleared, CAN_i cannot be sent secondarily, if the filling state of mail n is not cleared, CAN_i CAN be sent secondarily;
S5, ACK [ j ] is finished, CAN_i continues to poll and send requests, waits for the next coordinated sending request, and waits for other requests sent to CAN_i by CAN.
2. The method according to claim 1, wherein the step S2 is specifically: polling all CAN_n, and checking whether to answer in sequence;
CAN_0-CAN_j-1, no response;
CAN_j gives a response signal, and the mail [ i ] [ j ] is locked and not sent and changed by CAN_i.
3. The method according to claim 2, characterized in that: the step S4 specifically includes: after CAN_j responds, CAN_i receives and sends mail n information to CAN_j;
mail n information of CAN_i is sent from a CAN_j sending port;
Mail n of can_i is unlocked;
Manually updating the filling state of the mail [ i ] [ j ] of the CAN_i; the filling state of the mail [ i ] [ j ] of the CAN_i is updated manually, and specifically, the filling state of the mail [ i ] [ j ] of the CAN_i is updated through a DSP or other hosts.
4. A method according to claim 3, characterized in that: the step S1 specifically comprises the following steps: CAN_i sends a coordination transmission request command CAN_REQ_i to CAN_j;
the CAN_REQ_i request is configured by a DSP or other host.
5. The method according to claim 4, wherein: can_i polls can_req_i to be pulled high, and the filling state of mail n is not empty, and waits for acknowledgement ACK [ j ] sent by can_j, then mail n of can_i is locked, mail n is not written by DSP or other host, and content of mail n is not sent by can_i.
6. The method according to claim 5, wherein: after CAN_j responds, the mail n is locked, if CAN_i designates to send the mail n to the bus interface, the sending state of CAN_i is in a waiting state, and after CAN_j responds, the locking CAN be released, and CAN_i starts to send the mail n to the CAN bus interface; if CAN is sent sequentially and the ACK [ j ] response state is pulled up, skipping mail n and continuing to send the content of mail n+1.
7. The coordinated sending method of the CAN shared mailbox is applied to a CAN communication system, the system comprises N CAN, the N CAN are communicated through a CAN bus, the N CAN are provided with top-layer mailbox shared signals of the CAN, the CAN internal mailbox comprises a mail sending and mail receiving function, and the N is a positive integer greater than 1; the method is characterized by comprising the following steps of:
S1, under an idle state, CAN_j receives a coordinated transmission command of CAN_i, and CAN_j transmits a response CAN_ACK_j [ i ] to CAN_i;
s2, after the response, locking the sending function of the CAN_j bus interface, wherein CAN_j receives the mail n information of CAN_i, the mail n is not written into an internal mailbox of CAN_j, only the sending function of the bus interface of CAN_j is occupied, and the mail n information of CAN_i is sent through the bus interface of CAN_j;
s3, after response, detecting a CAN_j bus interface to send a completion signal, pulling CAN_ACK_j [ i ] low, wherein the CAN_j sends response CAN_ACK_j [ i ] to the CAN_i, and the CAN_j releases the locking of a mailbox of the user;
CAN_j coordinates the transmission of the mail n information transmitted by CAN_i, then CAN_ACK_j [ i ] responds to completion, CAN_i updates the filling state of mail n, if the filling state of mail n is cleared, CAN_i cannot be transmitted secondarily, if the filling state of mail n is not cleared, CAN_i CAN be transmitted secondarily;
S4, the CAN_j continues to be in an idle state, and polling is conducted to check the coordination transmission request of other CAN.
8. The method according to claim 7, wherein: and step S2, after the response, locking the sending function of the CAN_j bus interface, wherein the sending function of the CAN_j mailbox cannot be sent out through the CAN_j bus interface, waiting is needed, and the coordinated sending priority is highest at the moment, and only after the coordinated sending of the CAN_j is finished, the CAN_j mailbox CAN be sent to the bus interface of the CAN_j.
CN202411089972.2A 2024-08-09 2024-08-09 A coordinated sending method for CAN shared mailbox Active CN118612181B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411089972.2A CN118612181B (en) 2024-08-09 2024-08-09 A coordinated sending method for CAN shared mailbox

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411089972.2A CN118612181B (en) 2024-08-09 2024-08-09 A coordinated sending method for CAN shared mailbox

Publications (2)

Publication Number Publication Date
CN118612181A CN118612181A (en) 2024-09-06
CN118612181B true CN118612181B (en) 2024-11-15

Family

ID=92557945

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411089972.2A Active CN118612181B (en) 2024-08-09 2024-08-09 A coordinated sending method for CAN shared mailbox

Country Status (1)

Country Link
CN (1) CN118612181B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106230688A (en) * 2016-07-20 2016-12-14 中国航空工业集团公司航空动力控制系统研究所 CAN communication interchannel communication Design method based on DSP2812
CN113141288A (en) * 2021-04-23 2021-07-20 北京航天发射技术研究所 Mailbox message receiving and sending method and device of CAN bus controller

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6938253B2 (en) * 2001-05-02 2005-08-30 Portalplayer, Inc. Multiprocessor communication system and method
JP5605338B2 (en) * 2011-09-06 2014-10-15 株式会社デンソー Communication device
CN114422556A (en) * 2021-11-30 2022-04-29 东南大学深圳研究院 FlexCan bus controller based on SRAM PUF
CN114979058B (en) * 2022-06-30 2023-10-03 东风电驱动系统有限公司 CAN multi-mailbox multiplexing processing method and system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106230688A (en) * 2016-07-20 2016-12-14 中国航空工业集团公司航空动力控制系统研究所 CAN communication interchannel communication Design method based on DSP2812
CN113141288A (en) * 2021-04-23 2021-07-20 北京航天发射技术研究所 Mailbox message receiving and sending method and device of CAN bus controller

Also Published As

Publication number Publication date
CN118612181A (en) 2024-09-06

Similar Documents

Publication Publication Date Title
CN1685326B (en) bus connection system
CN101604302B (en) Advanced peripheral bus bridge and control method thereof
US20040193825A1 (en) Binding a memory window to a queue pair
CN101150485A (en) A management method for network data transmission of zero copy buffer queue
CN118093468B (en) PCIe exchange chip with RDMA acceleration function and PCIe switch
CN112559436B (en) A context access method and system for RDMA communication equipment
US7069305B2 (en) Computer system and a data transfer method thereof using remote direct memory access
US7747808B2 (en) USB host controller with memory for transfer descriptors
US20130046933A1 (en) Storing data in any of a plurality of buffers in a memory controller
US20040176857A1 (en) Multi-processor system
CN118612181B (en) A coordinated sending method for CAN shared mailbox
CN118069046A (en) Multi-queue RDMA request recording and retransmission method based on shared cache structure
CN102170478A (en) PDU (Protocol Data Unit) buffering method based on AUTOSA R (Automobile Open System Architecture) protocol stack
CN118842671B (en) A CAN mailbox sharing and sending method
US20040230717A1 (en) Processing device
CN118113496B (en) Inter-process communication method, system and chip based on multi-core heterogeneous SOC
CN115114042A (en) Storage data access method and device, electronic equipment and storage medium
US6675239B1 (en) Method and apparatus for providing commands to a command memory
JPH06324998A (en) Message reception method
CN120128610B (en) An Internet of Things (IoT) data interaction control system and IoT device
US20250123981A1 (en) Communication method performed on network-on-chip
JP2001119413A (en) Login device, login target device, inter-device communication system, login control method, and recording medium
JP2573790B2 (en) Transfer control device
CN114326526A (en) Vending machine, instruction analysis method, storage medium and slave device thereof
CN120429251A (en) Data transmission method, device and chip

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
GR01 Patent grant
GR01 Patent grant