+

CN112039745B - CAN bus communication control system and communication system - Google Patents

CAN bus communication control system and communication system Download PDF

Info

Publication number
CN112039745B
CN112039745B CN202010991480.8A CN202010991480A CN112039745B CN 112039745 B CN112039745 B CN 112039745B CN 202010991480 A CN202010991480 A CN 202010991480A CN 112039745 B CN112039745 B CN 112039745B
Authority
CN
China
Prior art keywords
bus
mcu
external
module
register
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
CN202010991480.8A
Other languages
Chinese (zh)
Other versions
CN112039745A (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.)
Gowin Semiconductor Corp
Original Assignee
Gowin Semiconductor Corp
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 Gowin Semiconductor Corp filed Critical Gowin Semiconductor Corp
Priority to CN202010991480.8A priority Critical patent/CN112039745B/en
Publication of CN112039745A publication Critical patent/CN112039745A/en
Application granted granted Critical
Publication of CN112039745B publication Critical patent/CN112039745B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • H04L12/40013Details regarding a bus controller
    • 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)
  • Bus Control (AREA)

Abstract

The invention provides a CAN bus communication control system and a communication system, wherein the communication system is based on an SoC framework composed of an MCU core and an FPGA core integrated in the same system on a chip, a CAN bus controller module, an MCU bus mapping module and a CAN bus interrupt signal mapping module are set based on logic resources in the FPGA core, CAN buses between the MCU and external CAN equipment outside the chip are integrated in the chip and CAN dynamically configure the number of the CAN buses, and priority classification control of the MCU core on each CAN bus controller module is realized, so that the expansibility and the usability of the MCU are improved, the design and application complexity of the MCU to mount the external CAN equipment is reduced, the rapid application of the CAN buses by users is facilitated, the dependence of the CAN bus priorities on CAN equipment nodes is reduced, and the controllability of the MCU on the CAN equipment node priorities is enhanced. The invention also provides a method for dynamically configuring the priority of each equipment node of the CAN bus.

Description

CAN bus communication control system and communication system
Technical Field
The invention relates to the technical field of CAN communication, in particular to a CAN bus communication control system, a communication system and a method for dynamically configuring the priority of each equipment node of a CAN bus.
Background
A Controller Area Network (CAN) is a serial communication Network that effectively supports distributed control or real-time control, is a multi-master bus, CAN be connected to external devices only through two lines, namely, a low-level CAN system bus CAN _ L and a high-level CAN system bus CAN _ H, and inherits an error detection and management module inside. The CAN is widely used in the fields of automotive computer control systems and embedded industrial control local area networks, and is generally used as an external device of an MCU (Micro-controller Unit) to communicate with an off-chip CAN bus in series in the field of MCU (Micro-controller Unit) single-chip microcomputers.
A System-on-a-Chip (SoC) having an MCU and an FPGA (Field Programmable Gate Array) simultaneously means that the MCU, a memory, an external device, and the like are connected to an FPGA core through the FPGA to form an SoC architecture of the MCU core and the FPGA core. Based on the programmable characteristic of the FPGA, the system-on-chip architecture has good expansibility.
In a traditional system on chip only having an MCU kernel, limited by cost, the MCU model capable of supporting more than two paths of CAN peripherals is limited or cost is too high, and the MCU CAN not well control the priority of each device node of a CAN bus.
Disclosure of Invention
The invention aims to provide a CAN bus communication control system, a communication system and a method for dynamically configuring the priority of each equipment node of a CAN bus, which CAN realize the classification control of the priority of each equipment node of the CAN bus by an MCU (microprogrammed control Unit), so that the functions and data of CAN equipment CAN be dynamically configured.
In order to solve the technical problem, the invention provides a CAN bus communication control system, which comprises an MCU core and an FPGA core integrated in the same system on a chip, wherein logic resources of the FPGA core are provided with a CAN bus interrupt signal mapping module, an MCU bus mapping module and a plurality of CAN bus controller modules; each CAN bus controller module is used for realizing a CAN bus standard protocol based on the logic resource of the FPGA kernel and connecting corresponding external CAN equipment positioned outside the system on chip, and the MCU bus mapping module is used for mapping one path of CAN system bus of the MCU kernel into a plurality of paths of CAN subsystem buses with dynamically configurable quantity.
Optionally, the CAN bus interrupt signal mapping module is connected to each CAN bus controller module, and the CAN bus interrupt signal mapping module is configured to map the interrupt signal of each CAN bus controller module into an interrupt vector table of the MCU core according to a specified priority, so as to implement control of the MCU core on the priority of each CAN bus controller module.
Optionally, the MCU bus mapping module extends to the FPGA core through an internal boundary of the FPGA core, and is connected to the corresponding CAN bus controller module, so as to realize interaction between the MCU core and the external CAN device.
Optionally, each path of the CAN subsystem bus is used for connecting a corresponding one of the CAN bus controller modules; each of the CAN bus controller modules includes:
the CAN bus function control module is used for realizing a CAN bus standard protocol based on the logic resource of the FPGA kernel;
the CAN bus external interface is connected with the CAN bus function control module and corresponding external CAN equipment so as to realize the communication interaction between the CAN bus function control module and a CAN bus of the external CAN equipment;
and the CAN bus internal interface is connected with the CAN bus function control module, the MCU bus mapping module and the CAN bus interrupt signal mapping module and is used for realizing the interaction of the CAN bus function control module, the MCU bus mapping module and the CAN bus interrupt signal mapping module.
Optionally, each CAN bus controller module further includes a general register set, where the general register set includes a control register, a status register, a read data register, and a write data register; and each register in the general register group is connected with a corresponding pin of the CAN bus function control module.
Optionally, the MCU bus mapping module is further configured to decode a peripheral address space of the MCU core, and map a register of the corresponding CAN bus controller module in the peripheral address space of the MCU core, so as to implement reading, writing, and controlling of the MCU core and the external CAN device.
Optionally, the CAN bus function control module includes: the device comprises a clock pin, a reset pin, a control pin, a state pin, a data reading pin and a data writing pin; the clock pin is externally connected with a clock signal of the MCU kernel, the reset pin is externally connected with a reset signal of the MCU kernel, the control pin is connected with the control register, the state pin is connected with the state register, the data reading pin is connected with the data reading register, and the data writing pin is connected with the data writing register.
Based on the same invention concept, the invention also provides a communication system which comprises the CAN bus communication control system and at least one external CAN device connected with the CAN bus communication control system, wherein each external CAN device is connected with a corresponding CAN bus controller module in the CAN bus communication control system.
Optionally, the external CAN device includes an external CAN transceiver, and the external CAN transceiver and the CAN bus communication control system are integrated in the same system on chip, or are disposed outside the system on chip where the CAN bus communication control system is located.
Based on the same inventive concept, an embodiment of the present invention further provides a method for dynamically configuring priorities of each device node of a CAN bus, including the following steps:
firstly, mapping one path of CAN system bus of an MCU into a plurality of paths of CAN subsystem buses with dynamically configurable quantity by utilizing the logic resource of an FPGA;
then, mounting the CAN bus controller of each external CAN device on the corresponding CAN subsystem bus;
and then, setting an interrupt signal of each CAN bus controller, and mapping the interrupt signal of each CAN bus controller into an interrupt vector table of the MCU according to a specified priority, so as to realize the priority classification control of the MCU on the node where each external CAN device is located.
Compared with the prior art, the technical scheme provided by the invention has at least one of the following beneficial effects:
1. the design is based on an SoC framework composed of an MCU core and an FPGA core integrated in the same system on chip, and a CAN bus between the MCU and an external CAN device outside the chip is realized based on logic resources in the FPGA core, so that the CAN subsystem bus realized in the FPGA CAN be used as the external device of the MCU, and the expansibility of the MCU is improved.
2. Based on the programmable characteristic of FPGA, the number of CAN bus controller modules realized by logic resources in an FPGA kernel and the number of CAN subsystem buses mapped by an MCU bus mapping module CAN be dynamically adjusted, so that the design has good expansibility, a user CAN dynamically configure the number of the CAN bus controller modules outside the MCU, and further dynamically configure the accessed external CAN equipment by the CAN bus controller modules, so that the purpose of dynamically configuring functions and data of the external CAN equipment is achieved, the expansibility and the usability of the MCU are improved, the design and application complexity of the MCU for hanging and loading the external CAN equipment is reduced, and the rapid application of the CAN bus by the user is facilitated.
3. Because the CAN bus interrupt signal mapping module maps the interrupt signals of the CAN bus controller module into the interrupt vector table of the MCU kernel according to the specified priority, the classification control of the MCU kernel on the priority of the CAN bus controller module CAN be realized, the dependency of the CAN bus priority on CAN equipment nodes is reduced, the controllability of the MCU on the CAN equipment node priority is enhanced, and the expansibility and the usability of the CAN equipment outside the MCU are improved.
Drawings
Fig. 1 is a block diagram of a CAN bus communication control system according to an embodiment of the present invention.
Fig. 2 is a schematic structural diagram of a CAN bus controller module according to an embodiment of the present invention.
Fig. 3 is a schematic diagram of a mapping process of the MCU bus mapping module according to an embodiment of the present invention.
Fig. 4 is a flowchart of a method for dynamically configuring the priority of each device node of the CAN bus according to an embodiment of the present invention.
Detailed Description
The technical solution proposed by the present invention will be further described in detail with reference to the accompanying drawings and specific embodiments. The advantages and features of the present invention will become more apparent from the following description. It is to be noted that the drawings are in a very simplified form and are not to precise scale, which is merely for the purpose of facilitating and distinctly claiming the embodiments of the present invention.
Referring to fig. 1, an embodiment of the present invention provides a CAN bus communication control system, which is implemented based on MCU and FPGA SoC architectures, and specifically includes an MCU core 13 and an FPGA core 10 integrated in a same SoC. The MCU core 13 has at least one CAN system bus, and each CAN system bus has two lines, a low level CAN system bus CAN _ L and a high level CAN system bus CAN _ H. The logic resources inside the FPGA core 10 mainly include Logic Control Block (LCB) resources, clock network resources, clock processing resources, Block random access memory (Block RAM), digital signal processing resources (DSP core), and interface resources. The logic control block resources include display look-up tables, adders, registers, multiplexers, etc. In this embodiment, the logic resource of the FPGA core 10 is provided with an MCU bus mapping module 11, a CAN bus interrupt signal mapping module 12, and n CAN bus controller modules 1 to n, where n is not less than 2 and is an integer.
Each CAN bus controller module 1-n is used for realizing a CAN bus standard protocol based on logic resources of the FPGA kernel 10 and is connected with corresponding external CAN equipment 21-2 n arranged outside the SoC. The CAN bus controller modules 1-n are correspondingly connected with external CAN devices 21-2 n one by one through CAN buses, and the external CAN devices 21-2 n are positioned outside the SoC and serve as equipment nodes of the CAN buses. In practical application, the number m of external CAN devices actually accessed to the system CAN be smaller than n, and at the moment, some CAN bus controller modules are not connected with the external CAN devices and are in an idle state.
Referring to fig. 2, each of the CAN bus controller modules 1 to n includes a CAN bus function control module 100, a CAN bus external interface (not shown), a CAN bus internal interface (not shown), and a general register set. The CAN bus function control module 100 is configured to implement a CAN bus standard protocol based on the logic resources of the FPGA core 10. And the CAN bus external interface is connected with the CAN bus function control module and one external CAN device in the external CAN devices 21-2 n so as to realize the communication interaction between the CAN bus function control module and the CAN bus of the external CAN device. The internal interface of the CAN bus is connected with the CAN bus function control module 100, the MCU bus mapping module 11 and the CAN bus interrupt signal mapping module 12, and is used for realizing interaction between the CAN bus function control module 100 and the MCU bus mapping module 11 and the CAN bus interrupt signal mapping module 12.
The general register set comprises a control register 101, a status register 102, a read data register 103 and a write data register 104, wherein the control register 101 is used for controlling and determining an operation mode and the characteristics of a currently executed task, and the status register 102 is used for storing two types of information: one type is various state information reflecting the execution result of the current instruction, and the other type is storage control information; the read data register 103 is used for temporarily storing read data; the write data register 104 is used to temporarily store data to be written.
The CAN bus function control module 100 comprises a clock pin, a reset pin, a control pin, a state pin, a data reading pin, a data writing pin and two pins CAN _ H, CAN _ L connected with an external interface of the CAN bus; the clock pin is externally connected with a clock signal of the MCU core 13, the reset pin is externally connected with a reset signal of the MCU core 13, the control pin is connected with the control register 101, the status pin is connected with the status register 102, the read data pin is connected with the read data register 103, and the write data pin is connected with the write data register 104.
Referring to fig. 1 and 2, the CAN bus interrupt signal mapping module 12 is mainly implemented by some combinational logic circuits in the FPGA core 10, and the combinational logic circuits are characterized in that the output at any time is only dependent on the input at that time, and is independent of the original state of the circuit. The input side of the CAN bus interrupt signal mapping module 12 is further connected with the control register 101 and the status register 102 of each CAN bus controller module 1-n through the CAN bus internal interface of each CAN bus controller module 1-n, and the output side of the CAN bus interrupt signal mapping module 12 is connected with the interrupt vector table of the MCU kernel 13. The CAN bus interrupt signal mapping module 12 is configured to map the interrupt signals of each CAN bus controller module 1 to n into an interrupt vector table of the MCU core 13 according to a specified priority, so as to control the priority of each CAN bus controller module 1 to n by the MCU core 13.
Referring to fig. 1 to fig. 3, the MCU bus mapping module 11 is connected to one CAN system bus of the MCU core 13, that is, the MCU bus mapping module 11 is connected to two lines, namely a low-level CAN system bus CAN _ L and a high-level CAN system bus CAN _ H of the MCU core 13. The MCU bus mapping module 11 CAN map one path of CAN system bus of the MCU kernel 13 into a plurality of paths of CAN subsystem buses which are the same as the number of the accessed external CAN devices according to the number of the external CAN devices connected with the CAN bus controller modules 1-n, namely, the MCU bus mapping module 11 CAN dynamically configure the number of the CAN subsystem buses according to the number of the external CAN devices which need to be accessed, each path of the CAN subsystem buses correspond to the external CAN devices which need to be accessed one by one, and each path of the CAN subsystem buses are used for being connected with corresponding one of the CAN bus controller modules 1-n.
Briefly, the MCU bus mapping module 11 CAN map a low-level CAN system bus CAN _ L of the MCU core 13 into a plurality of low-level CAN subsystem buses CAN _ L _ s, map a high-level CAN system bus CAN _ H of the MCU core 13 into a plurality of high-level CAN subsystem buses CAN _ H _ s, and form a low-level CAN subsystem bus and a low-level CAN subsystem bus CAN _ L _ s to form a CAN subsystem bus, where the CAN subsystem bus is connected to a corresponding CAN bus controller module, at this time, the external CAN devices 21 to 2n are equivalent to being connected in parallel to the MCU core 13, and the classification control of the priorities of the CAN bus controller modules 1 to n by the MCU core 13 CAN realize the priority control of the external CAN devices 21 to 2n by the MCU core 13, thereby avoiding that it is difficult to support two CAN devices and the MCU cannot control the CAN buses well when only two CAN systems buses exist in the prior art The priority of each device node.
Optionally, the MCU bus mapping module 11 extends into the FPGA core 10 through an internal boundary of the FPGA core 10 to connect with the corresponding CAN bus controller module, so as to realize interaction between the MCU core 13 and the external CAN devices 21-2 n.
Referring to fig. 3, the MCU bus mapping module 11 decodes the MCU core 13 peripheral address space corresponding to each CAN subsystem bus to map the corresponding register of the CAN bus controller module in the MCU core peripheral address space according to the decoding result, thereby implementing the read, write and control of the MCU core 13 and the external CAN devices 21-2 n.
As an example, the MCU bus mapping module 11 performs address segmentation on the peripheral address space of the MCU core 12 according to the address depth of the general register set in each of the CAN bus controller modules 1 to n and the number of the accessed external CAN devices 21 to 2n, forms a mapping relationship between the address segmentation and the register set address of the general register set, and further sends the mapping relationship to the MCU core 13 through the CAN subsystem bus and the CAN system bus, so that the MCU core 13 CAN generate a dedicated peripheral address signal of each accessed external CAN device in the MCU core 13 according to the mapping relationship. Further, the MCU bus mapping module 11 also maps the dedicated external device address signal of each external CAN device in the MCU core 13 to a register group address signal of the external CAN device, and further sends the register group address signal to the corresponding CAN bus controller module, which operates its general register group according to the register group address signal to further operate the connected external CAN devices by its general register group, so as to realize the read, write and control of the MCU core 13 and the external CAN devices 21-2 n.
Further, the MCU bus mapping module 11 is configured to receive an operation instruction sent by the MCU core 13 from a CAN system bus of the MCU core 13, and determine a type of the operation instruction; and the corresponding CAN bus controller module is used for carrying out corresponding operation on a corresponding register in the general register group according to the type of the operation instruction.
The following describes a specific flow when the MCU core 13 needs to operate a certain external CAN device 2i (1 ≦ i ≦ n) with reference to FIGS. 1 to 3, and at this time, the system-on-chip SoC where the MCU core 13 is located has access to a plurality of external CAN devices 21-2 n including the external CAN device 2i, and the MCU bus mapping module 11 has already according to the address depth of the general purpose register set in each of the CAN bus controller modules 1-n, and the number of the accessed external CAN devices 21-2 n, mapping one CAN system bus of the MCU kernel 13 into n CAN subsystem buses with dynamically configurable number, wherein each CAN subsystem bus is used for connecting one external CAN device, the ith CAN subsystem bus is connected with a CAN bus controller module i, and the CAN bus controller module i is connected with an external CAN device 2i, so that interaction between the system-on-chip SoC and the external CAN device 2i is realized. The specific process of the MCU core 13 that needs to operate the external CAN device 2i includes:
firstly, an MCU kernel 13 sends an operation instruction, an MCU bus mapping module 11 decodes the operation instruction to judge whether an ith CAN subsystem bus corresponding to an external CAN device 2i is selected or not, if not, a CAN bus controller module i connected with the external CAN device 2i is continuously in a standby state, if so, the CAN bus controller module i is enabled, the operation type is analyzed from the operation instruction, and whether the operation is a read operation or a write operation is judged;
if the external CAN device 2i is in a read operation, the CAN bus controller module i selects a register to be operated from a general register group according to a register group address signal of the external CAN device 2i provided by the MCU bus mapping module 11, wherein the register to be operated comprises a state register, a control register and a read data register, the selected register controls and reads data of the external CAN device 2i, the read data CAN be temporarily stored in the read data register, information such as control and determination operation modes, characteristics of a currently executed task and the like is temporarily stored in the control register, and various state information representing a current instruction execution result and control information which is generated by the CAN bus controller module i and is used for controlling the external CAN device 2i are temporarily stored in the state register; the CAN bus controller module i further sends the data in the read data register to the MCU core 13 through the MCU bus mapping module 11 and the CAN bus interrupt signal mapping module 12 to complete the read data operation.
If the external CAN device 2i is in write operation, the CAN bus controller module i selects a register to be operated from a general register group of the external CAN device 2i according to a register group address signal of the external CAN device 2i provided by the MCU bus mapping module 11, wherein the register to be operated comprises a control register and a write data register, the external CAN device 2i is controlled and written with data through the selected register, the data to be written into the external CAN device 2i CAN be temporarily stored in the write data register, and information such as the control and determination operation mode, the current task execution characteristic and the like is temporarily stored in the control register; the CAN bus controller module i further completes the write data operation by writing the data in its write data register into the external CAN device 2 i.
Based on the same inventive concept, please refer to fig. 1 to 3, this embodiment further provides a communication system, including the CAN bus communication control system of this embodiment, and at least one external CAN device 21 to 2n connected to the CAN bus communication control system (i.e., system on chip SoC), where each external CAN device is connected to a corresponding CAN bus controller module in the CAN bus communication control system.
Optionally, the external CAN device comprises an external CAN transceiver. In this embodiment, the external CAN transceiver is disposed outside a system on chip SoC where the CAN bus communication control system is located.
In other embodiments of the present invention, the external CAN transceiver may also be integrated with the CAN bus communication control system in the same system on chip SoC.
In summary, the CAN bus communication control system and the communication system of the present invention are based on the SoC architecture formed by the MCU core and the FPGA core integrated in the same system on chip, and realize the CAN bus between the MCU and the external CAN device outside the chip based on the logic resource in the FPGA core, so that the CAN bus realized in the FPGA CAN be used as the external device of the MCU, thereby improving the expansibility of the MCU. And based on the programmable characteristic of the FPGA, the number of the CAN bus controller modules realized by utilizing the logic resource in the FPGA kernel and the number of the CAN subsystem buses mapped by the MCU bus mapping module CAN be dynamically adjusted, so that the design has good expansibility, a user CAN dynamically configure the number of the CAN bus controller modules outside the MCU, and further dynamically configure the accessed external CAN equipment through the CAN bus controller modules, so that the purpose of dynamically configurable functions and data of the external CAN equipment is achieved, the expansibility and the usability of the MCU are improved, the design and application complexity of the MCU for hanging and loading the external CAN equipment is reduced, and the rapid application of the CAN bus by the user is facilitated. In addition, the CAN bus interrupt signal mapping module maps the interrupt signals of each CAN bus controller module into the interrupt vector table of the MCU kernel according to the specified priority, so that the classification control of the MCU kernel on the priority of each CAN bus controller module CAN be realized, the dependency of the CAN bus priority on CAN equipment nodes is reduced, the control performance of the MCU on the CAN equipment node priority is enhanced, and the expansibility and the usability of the CAN equipment outside the MCU are improved.
Based on the same inventive concept, referring to fig. 4, an embodiment of the present invention further provides a method for dynamically configuring priorities of each device node of a CAN bus, including the following steps:
s1, mapping one path of CAN system bus of an MCU into a plurality of paths of CAN subsystem buses with dynamically configurable quantity by using the logic resource of an FPGA;
s2, mounting the CAN bus controller of each external CAN device on the corresponding CAN subsystem bus;
and S3, setting an interrupt signal of each CAN bus controller, and mapping the interrupt signal of each CAN bus controller into an interrupt vector table of the MCU according to a specified priority, so as to realize the priority classification control of the MCU on the node where each external CAN device is located.
Preferably, referring to fig. 1 to 4, the method for dynamically configuring the priority of each device node of the CAN bus according to the embodiment is implemented by the CAN bus communication control system and the communication system of the present invention, that is, the MCU in step S1 is implemented by the MCU core 13 of the CAN bus communication control system of the present invention, the FPGA in step S1 is implemented by the FPGA core 10 of the CAN bus communication control system of the present invention, the overall process in step S1 is implemented by the function of the MCU bus mapping module 11 in the FPGA core 10, each CAN bus controller in step S2 is implemented by the corresponding CAN bus controller module in the FPGA core 10, the overall process in step S2 is implemented by the combined function of the connected CAN bus controller module, the MCU bus mapping module 11, and the MCU core 13, and the step S3 is implemented by the combined function of the connected CAN bus controller module, the connected CAN bus interrupt signal mapping module 12, and the connected MCU core 13.
In summary, the method for dynamically configuring the priority of each device node of the CAN bus according to the present invention CAN utilize the logic resource of the FPGA to implement the CAN bus between the MCU and the external CAN device, thereby implementing the dynamic adjustment of the number of the CAN system buses based on the programmable characteristic of the FPGA, so that the design has good extensibility, and the user CAN dynamically configure the CAN system buses outside the MCU and the number of the external CAN devices connected thereto, so as to achieve the purpose of dynamic configuration of the functions and data of the external CAN device, improve the extensibility and usability of the MCU, reduce the complexity of designing and applying the MCU to mount the external CAN device, and facilitate the user to quickly apply the CAN bus. Meanwhile, the interrupt signals of each CAN bus controller CAN be mapped into the interrupt vector table of the MCU according to the specified priority, so that the classification control of the MCU on the priority of each external CAN device CAN be realized, the dependency of the CAN bus priority on CAN device nodes is reduced, the controllability of the MCU on the priority of the CAN device nodes is enhanced, and the expansibility and the usability of the MCU external CAN device are improved.
It is to be understood that while the present invention has been described in conjunction with the preferred embodiments thereof, it is not intended to limit the invention to those embodiments. It will be apparent to those skilled in the art from this disclosure that many changes and modifications can be made, or equivalents modified, in the embodiments of the invention without departing from the scope of the invention. Therefore, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present invention are still within the scope of the protection of the technical solution of the present invention, unless the contents of the technical solution of the present invention are departed.
It is to be further understood that the present invention is not limited to the particular methodology, materials, manufacturing techniques, uses, and applications described herein, as such may, of course, vary. It is also to be understood that the terminology used herein is for the purpose of describing particular embodiments only, and is not intended to limit the scope of the present invention. It must be noted that, as used herein and in the appended claims, the singular forms "a," "an," and "the" include plural referents unless the context clearly dictates otherwise. Thus, for example, reference to "a step" or "an apparatus" means a reference to one or more steps or apparatuses and may include sub-steps as well as sub-apparatuses. All conjunctions used should be understood in the broadest sense. Thus, the word "or" should be understood to have the definition of a logical "or" rather than the definition of a logical "exclusive or" unless the context clearly dictates otherwise. Structures described herein are to be understood as also referring to functional equivalents of such structures. Language that can be construed as approximate should be understood as such unless the context clearly dictates otherwise.

Claims (9)

1. A CAN bus communication control system based on SoC architecture with FGPA and MCU is characterized by comprising an MCU core and an FPGA core which are integrated in the same system on chip, wherein logic resources of the FPGA core are provided with a CAN bus interrupt signal mapping module, an MCU bus mapping module and a plurality of CAN bus controller modules; each CAN bus controller module is used for realizing a CAN bus standard protocol based on the logic resource of the FPGA kernel and connecting external CAN equipment positioned outside the system on chip, and the MCU bus mapping module is used for mapping one path of CAN system bus of the MCU kernel into a plurality of paths of CAN subsystem buses with dynamically configurable quantity so as to realize the dynamic configuration of the functions and the quantity of the external CAN equipment connected with the system on chip; the CAN bus interrupt signal mapping module is connected with each CAN bus controller module, and is used for mapping the interrupt signals of each CAN bus controller module into an interrupt vector table of the MCU kernel according to the specified priority, so that the classification control of the MCU kernel on the priority of each CAN bus controller module is realized.
2. The CAN bus communication control system of claim 1, wherein the MCU system bus mapping module extends to the FPGA core through an internal boundary of the FPGA core and connects with the corresponding CAN bus controller module to enable interaction of the MCU core with the external CAN device.
3. The CAN bus communication control system of claim 1 wherein each of the CAN subsystem buses is adapted to connect to a respective one of the CAN bus controller modules; each of the CAN bus controller modules includes:
the CAN bus function control module is used for realizing a CAN bus standard protocol based on the logic resource of the FPGA kernel;
the CAN bus external interface is connected with the CAN bus function control module and corresponding external CAN equipment so as to realize the communication interaction between the CAN bus function control module and a CAN bus of the external CAN equipment;
and the CAN bus internal interface is connected with the CAN bus function control module, the MCU bus mapping module and the CAN bus interrupt signal mapping module and is used for realizing interaction between the CAN bus function control module and the MCU bus mapping module as well as between the CAN bus interrupt signal mapping modules.
4. The CAN bus communication control system of claim 1, wherein each of the CAN bus controller modules comprises a general purpose register set comprising a control register, a status register, a read data register, and a write data register; and each register in the general register group is connected with a corresponding pin of the CAN bus function control module.
5. The CAN bus communication control system of claim 4, wherein the MCU bus mapping module is further configured to decode a peripheral address space of the MCU core, and map a register of the CAN bus controller module in the peripheral address space of the MCU core, so as to implement read, write, and control of the MCU core and the external CAN device.
6. The CAN-bus communication control system of claim 4, wherein the CAN-bus function control module comprises: the device comprises a clock pin, a reset pin, a control pin, a state pin, a data reading pin and a data writing pin; the clock pin is externally connected with a clock signal of the MCU kernel, the reset pin is externally connected with a reset signal of the MCU kernel, the control pin is connected with the control register, the state pin is connected with the state register, the data reading pin is connected with the data reading register, and the data writing pin is connected with the data writing register.
7. A communication system, comprising the CAN bus communication control system based on the SoC architecture with FGPA and MCU of any claim 1-6, and at least one external CAN device connected with the CAN bus communication control system, wherein each external CAN device is connected with a corresponding CAN bus controller module in the CAN bus communication control system.
8. The communication system of claim 7, wherein the external CAN device comprises an external CAN transceiver integrated in the same system-on-chip as the CAN bus communication control system, or wherein at least a portion of the external CAN transceiver is disposed off-chip from the system-on-chip on which the CAN bus communication control system is disposed.
9. A method for implementing dynamic configuration of priorities of device nodes of a CAN bus using the communication system of claim 7, comprising the steps of:
firstly, mapping one path of CAN system bus of MCU into a plurality of paths of CAN subsystem buses with dynamically configurable quantity by using logic resources of FPGA;
then, mounting the CAN bus controller of each external CAN device on the corresponding CAN subsystem bus;
and then, setting an interrupt signal of each CAN bus controller, and mapping the interrupt signal of each CAN bus controller into an interrupt vector table of the MCU according to a specified priority, so as to realize the priority classification control of the MCU on the node where each external CAN device is located.
CN202010991480.8A 2020-09-17 2020-09-17 CAN bus communication control system and communication system Active CN112039745B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010991480.8A CN112039745B (en) 2020-09-17 2020-09-17 CAN bus communication control system and communication system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010991480.8A CN112039745B (en) 2020-09-17 2020-09-17 CAN bus communication control system and communication system

Publications (2)

Publication Number Publication Date
CN112039745A CN112039745A (en) 2020-12-04
CN112039745B true CN112039745B (en) 2021-06-22

Family

ID=73574108

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010991480.8A Active CN112039745B (en) 2020-09-17 2020-09-17 CAN bus communication control system and communication system

Country Status (1)

Country Link
CN (1) CN112039745B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114721987A (en) * 2022-02-21 2022-07-08 西安智多晶微电子有限公司 A multi-channel interface circuit based on MCU and FPGA SoC architecture
CN115348128B (en) * 2022-06-27 2023-12-05 航天科工空间工程发展有限公司 Dual CAN bus processing management method based on FPGA

Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001156815A (en) * 1999-11-26 2001-06-08 Nissan Motor Co Ltd Communication network system
CN102243619A (en) * 2011-06-23 2011-11-16 天津光电通信技术有限公司 FPGA (Field Programmable Gate Array)-based method for realizing multi-path I2C (Inter-Integrated Circuit) bus port expansion
CN202602678U (en) * 2012-05-15 2012-12-12 河南辉煌科技股份有限公司 Expansion circuit with multiple CAN (Controller Area Network) channel interfaces
CN103927276A (en) * 2014-03-14 2014-07-16 山东大学 PCM FMC expansion board based on Zynq-7000 and working method of PCM FMC expansion board
CN104679702A (en) * 2013-11-28 2015-06-03 中国航空工业集团公司第六三一研究所 Multi-path high-speed serial interface controller
CN106789511A (en) * 2016-12-22 2017-05-31 中车青岛四方车辆研究所有限公司 Train based on FPGA CAN communication switching control method and modular converter
CN106972999A (en) * 2017-05-11 2017-07-21 深圳市沃特玛电池有限公司 A kind of Interface Expanding circuit and operation method
CN206594657U (en) * 2017-03-22 2017-10-27 广州炫通电气科技有限公司 The serial transceiver controllers of multichannel UART based on bus communication
CN108134599A (en) * 2017-12-04 2018-06-08 山东高云半导体科技有限公司 A kind of I3C bus control interfaces circuit
CN108628779A (en) * 2017-03-24 2018-10-09 三星电子株式会社 Memory device and its method, storage system
CN109525473A (en) * 2018-11-28 2019-03-26 深圳市元征科技股份有限公司 A kind of MCU extension CAN method, system, MCU and computer media
CN109766308A (en) * 2019-01-15 2019-05-17 湖南泽天智航电子技术有限公司 A kind of multichannel onewire communication system based on localbus bus
CN110321319A (en) * 2019-09-02 2019-10-11 广东高云半导体科技股份有限公司 System on chip
CN110765052A (en) * 2019-10-22 2020-02-07 广东高云半导体科技股份有限公司 AHB/APB expansion bus interface and system on chip
CN110781119A (en) * 2019-10-22 2020-02-11 广东高云半导体科技股份有限公司 I2C bus expansion interface, control method thereof and system on chip
CN110781117A (en) * 2019-09-12 2020-02-11 广东高云半导体科技股份有限公司 SPI expansion bus interface and system on chip based on FPGA
CN110795382A (en) * 2019-10-09 2020-02-14 广东高云半导体科技股份有限公司 Universal asynchronous receiving and transmitting transmitter based on FPGA and system on chip
CN111143273A (en) * 2019-11-12 2020-05-12 广东高云半导体科技股份有限公司 System on chip

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2863129A1 (en) * 2003-11-28 2005-06-03 Thomson Licensing Sa METHOD FOR MANAGING A TASK WITHIN A NETWORK AND DEVICES FOR PERFORMING SUCH MONITORING
US8487655B1 (en) * 2009-05-05 2013-07-16 Cypress Semiconductor Corporation Combined analog architecture and functionality in a mixed-signal array
CN101661276B (en) * 2009-09-18 2012-05-09 东北大学 Universal data acquisition unit
CN105610876B (en) * 2016-04-01 2018-10-12 江苏科技大学 Industrial control automation network communication protocol converter and communication protocol conversion method
EP3499806B1 (en) * 2017-12-13 2020-08-05 Nxp B.V. Node and method for conducting measurements and signal analyses on a multi-master access bus
CN110806997B (en) * 2019-10-16 2021-03-26 广东高云半导体科技股份有限公司 System on chip and memory
CN110781130A (en) * 2019-10-16 2020-02-11 广东高云半导体科技股份有限公司 System on chip
CN111177067B (en) * 2019-12-13 2023-09-19 广东高云半导体科技股份有限公司 System on chip

Patent Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001156815A (en) * 1999-11-26 2001-06-08 Nissan Motor Co Ltd Communication network system
CN102243619A (en) * 2011-06-23 2011-11-16 天津光电通信技术有限公司 FPGA (Field Programmable Gate Array)-based method for realizing multi-path I2C (Inter-Integrated Circuit) bus port expansion
CN202602678U (en) * 2012-05-15 2012-12-12 河南辉煌科技股份有限公司 Expansion circuit with multiple CAN (Controller Area Network) channel interfaces
CN104679702A (en) * 2013-11-28 2015-06-03 中国航空工业集团公司第六三一研究所 Multi-path high-speed serial interface controller
CN103927276A (en) * 2014-03-14 2014-07-16 山东大学 PCM FMC expansion board based on Zynq-7000 and working method of PCM FMC expansion board
CN106789511A (en) * 2016-12-22 2017-05-31 中车青岛四方车辆研究所有限公司 Train based on FPGA CAN communication switching control method and modular converter
CN206594657U (en) * 2017-03-22 2017-10-27 广州炫通电气科技有限公司 The serial transceiver controllers of multichannel UART based on bus communication
CN108628779A (en) * 2017-03-24 2018-10-09 三星电子株式会社 Memory device and its method, storage system
CN106972999A (en) * 2017-05-11 2017-07-21 深圳市沃特玛电池有限公司 A kind of Interface Expanding circuit and operation method
CN108134599A (en) * 2017-12-04 2018-06-08 山东高云半导体科技有限公司 A kind of I3C bus control interfaces circuit
CN109525473A (en) * 2018-11-28 2019-03-26 深圳市元征科技股份有限公司 A kind of MCU extension CAN method, system, MCU and computer media
CN109766308A (en) * 2019-01-15 2019-05-17 湖南泽天智航电子技术有限公司 A kind of multichannel onewire communication system based on localbus bus
CN110321319A (en) * 2019-09-02 2019-10-11 广东高云半导体科技股份有限公司 System on chip
CN110781117A (en) * 2019-09-12 2020-02-11 广东高云半导体科技股份有限公司 SPI expansion bus interface and system on chip based on FPGA
CN110795382A (en) * 2019-10-09 2020-02-14 广东高云半导体科技股份有限公司 Universal asynchronous receiving and transmitting transmitter based on FPGA and system on chip
CN110765052A (en) * 2019-10-22 2020-02-07 广东高云半导体科技股份有限公司 AHB/APB expansion bus interface and system on chip
CN110781119A (en) * 2019-10-22 2020-02-11 广东高云半导体科技股份有限公司 I2C bus expansion interface, control method thereof and system on chip
CN111143273A (en) * 2019-11-12 2020-05-12 广东高云半导体科技股份有限公司 System on chip

Also Published As

Publication number Publication date
CN112039745A (en) 2020-12-04

Similar Documents

Publication Publication Date Title
CN110781117B (en) SPI expansion bus interface and system on chip based on FPGA
CN110781119B (en) I2C bus expansion interface, control method thereof and system on chip
US7325221B1 (en) Logic system with configurable interface
US5862148A (en) Microcontroller with improved debug capability for internal memory
JP6880149B2 (en) Static Random Access Methods, Devices, Equipment and Storage Media for Accessing Memory
CN112039745B (en) CAN bus communication control system and communication system
CN110806997B (en) System on chip and memory
CN114780037A (en) Data processing method, data processing system and computer readable storage medium
US10496422B2 (en) Serial device emulator using two memory levels with dynamic and configurable response
US11237994B2 (en) Interrupt controller for controlling interrupts based on priorities of interrupts
US20060282586A1 (en) Bus system design method and apparatus
US5168559A (en) Emulation system capable of complying with microcomputers having different on-chip memory capacities
US9697163B2 (en) Data path configuration component, signal processing device and method therefor
CN112100098B (en) DDR control system and DDR memory system
JP2002149591A (en) Method and device for optimizing bus in processor local bus system
US11755489B2 (en) Configurable interface circuit
US11609878B2 (en) Programmed input/output message control circuit
EP1164490B1 (en) Re-configurable memory map for a system on a chip
WO2021061373A1 (en) Debugging unit and processor
US10180847B2 (en) Circuitry for configuring entities
US5748909A (en) Interface board and instruction processing device without a local CPU
CN117762334A (en) An FPGA-based data interaction system and method
CN103761205A (en) Storage bridging method suitable for SPARC spatial processor
CN119669045A (en) SOC chip debugging method, system, device and medium
CN114297131A (en) Sensor control system, system-on-chip, and computing device

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
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载