Communication system and method for converting CAN (Controller Area Network) communication instruction into wireless communication instruction based on FPGA (Field Programmable Gate Array)
Through the FPGA-based CAN communication instruction to wireless communication instruction communication system, the FPGA chip and ATSAMR30 wireless communication chip are used to solve the limitations of traditional wired CAN networks in terms of deployment flexibility, scalability and mobility, and achieve more flexible communication Distance and personalized wireless communication configurations meet the needs of modern industrial and vehicle-mounted networks.
Patent Information
- Application Number
- CN202411035344.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-11-01
AI Technical Summary
Traditional wired CAN networks have limitations in deployment flexibility, scalability and mobility, and it is difficult to meet the needs of modern industrial and vehicle-mounted networks for flexible layout, convenient expansion and mobile communications.
A CAN communication instruction to wireless communication instruction communication system based on FPGA is designed, and the CAN bus instruction data is processed in real time through the FPGA chip, and transmitted using a wireless communication module, including CAN transceiver module, FPGA instruction control and processing module and wireless The communication module uses the ZYNQ chip and DDR3_SDRAM for instruction analysis and conversion, and combines the ATSAMR30 wireless communication chip to realize wireless communication.
It solves the deployment flexibility, scalability and mobility problems of traditional wired CAN networks, increases the flexibility of communication distance, and supports custom channel, transmission power and modulation solutions of wireless communication modules to meet users' personalized needs.
Smart Images

Figure CN118890403A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a CAN communication instruction-to-wireless communication instruction communication system based on FPGA, belonging to the technical field of wireless communication. Background Art
[0002] In the fields of industrial automation control, vehicle electronic systems and the Internet of Things (IoT), the CAN (Controller Area Network) bus is widely used due to its advantages such as high efficiency, stability and real-time performance. However, the traditional wired CAN network architecture is limited by the rigidity of physical connections and the complexity of expansion. In the face of emerging application scenarios such as distributed deployment, mobile node communication, remote monitoring and control, the limitations are gradually exposed, and the demand for wireless communication methods is becoming increasingly prominent. Therefore, a CAN communication command to wireless communication command communication system based on FPGA is proposed. The FPGA chip is used to process the CAN bus command data in real time and transmit it wirelessly to meet the needs of modern industrial and vehicle networks for flexible deployment, convenient expansion and mobile communication. Summary of the invention
[0003] In view of the above problems, the present invention provides a CAN communication instruction to wireless communication instruction communication system based on FPGA, which solves the problems of traditional wired CAN network in deployment flexibility, scalability and mobility.
[0004] A CAN communication instruction to wireless communication instruction communication system based on FPGA includes: a CAN transceiver module, an FPGA instruction control and processing module, and a wireless communication module; the CAN transceiver module is connected to the FPGA instruction control and processing module, and the FPGA instruction control and processing module is connected to the wireless communication module. The CAN transceiver module includes a CAN transceiver chip and a CAN controller chip; the FPGA instruction control and processing module includes an FPGA chip ZYNQ and DDR3_SDRAM, wherein the ZYNQ chip includes a processing system part (PS end) and a programmable logic part (PL end), the PL end includes a CAN control and data receiving module, an instruction parsing module, a communication instruction data conversion module, a configuration instruction data conversion module, an SWD control module, a configuration instruction data storage module and an AXI interconnection module, the PS end includes a UART sending program and a wireless communication module configuration program; the wireless communication module includes a wireless communication chip ATSAMR30.
[0005] The CAN transceiver module is controlled by the CAN control and data receiving module in the FPGA instruction control and processing module, receives the differential serial signal on the CAN bus, and converts the serial data into parallel data through the CAN controller chip according to the CAN protocol and sends it to the FPGA instruction control and processing module; wherein the CAN transceiver chip is used to receive the differential signal on the CAN bus and convert it back to TTL level so that the CAN controller chip can correctly receive the signal; the CAN controller chip decodes the received serial CAN signal according to the rules of the CAN protocol and converts it into parallel instruction data.
[0006] The FPGA instruction control and processing module, wherein the CAN control and data receiving module at the PL end of the ZYNQ chip is used to drive the CAN transceiver module, and is also used to receive the parallel instruction data output by the CAN transceiver module and forward it to the instruction parsing module; the instruction parsing module at the PL end of the ZYNQ chip is used to parse the parallel instruction data output by the CAN control and data receiving module, and determine whether the received instruction data is a communication instruction or a configuration instruction. If it is a communication instruction, it is output to the communication instruction data conversion module; if it is a configuration instruction, it is output to the configuration instruction data conversion module; the communication instruction data conversion module at the PL end of the ZYNQ chip is used to receive the communication instruction data and convert it into the data of the AXI_Lite protocol and output it to the AXI interconnect module and then store it in the communication instruction cache area of DDR3_SDRAM; the configuration instruction data conversion module at the PL end of the ZYNQ chip is used to receive the configuration instruction data and convert it into the data of the AXI_Lite protocol and output it to the AXI interconnect module and then store it in the communication instruction cache area of DDR3_SDRAM. The SWD control module at the PL end of the ZYNQ chip is used to receive the configuration instructions stored in the configuration instruction data storage module, generate the corresponding configuration timing and output it through the SWD interface to configure the wireless communication module; the configuration instruction data storage module at the PL end of the ZYNQ chip is used to receive the configuration instruction data output by the AXI interconnection module through the AXI_Lite protocol; the AXI interconnection module at the PL end of the ZYNQ chip is used to receive the communication instruction data of the AXI_Lite protocol output by the communication instruction data conversion module, and store it in the communication instruction cache of the DDR3_SDRAM, and is also used to receive the configuration instruction data of the AXI_Lite protocol output by the configuration instruction data conversion module, and store it in the configuration instruction cache of the DDR3_SDRAM, and is also used to receive the configuration instruction data output from the configuration instruction cache of the DDR3_SDRAM, and output it to the configuration instruction data storage module. The UART sending program at the PS end of the ZYNQ chip is used to read communication instruction data from the communication instruction buffer area of the DDR3_SDRAM and output it to the wireless communication module through the UART interface, and is also used to receive the communication instruction sending success instruction of the wireless communication module through the UART interface, and continue to read communication instruction data from the communication instruction buffer area of the DDR3_SDRAM and output it to the wireless communication module through the UART interface; the wireless communication module configuration program at the PS end of the ZYNQ chip is used to send the default configuration instruction data of the wireless communication module to the configuration instruction data storage module through the AXI interconnection module when the system is powered on, and is also used to continuously detect the configuration instruction buffer area of the DDR3_SDRAM. When it is detected that the configuration instruction of the configuration instruction buffer area has changed, the new configuration instruction data of the configuration instruction buffer area of the DDR3_SDRAM will be sent to the configuration instruction data storage module through the AXI interconnection module.
[0007] The wireless communication chip ATSAMR30 of the wireless communication module receives the configuration information of the SWD interface at the PL end of the FPGA instruction control and processing module, sets its own channel, transmission power, and modulation scheme, and also receives communication instructions output from the FPGA instruction control and processing module through the UART interface and transmits them to its own CORTEX-M0+ processor. The CORTEX-M0+ processor processes the communication instructions and controls the embedded radio transceiver to send corresponding electromagnetic wave signals.
[0008] The present invention solves the limitations of the traditional CAN bus network in deployment flexibility, scalability and mobility by converting CAN communication instructions into wireless communication instructions, and also extends the limited communication distance; in addition, the present invention can also customize the channel, transmission power, modulation scheme, etc. of the wireless communication module, greatly meeting the personalized requirements of users. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Figure 1 It is a block diagram of a CAN communication command to wireless communication command communication system based on FPGA;
[0010] Figure 2 This is the working block diagram of the FPGA instruction control and processing module;
[0011] Figure 3 This is the working flow chart of the wireless communication chip ATSAMR30. DETAILED DESCRIPTION
[0012] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0013] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present application.
[0014] In one embodiment, this embodiment provides a CAN communication instruction to wireless communication instruction communication system based on FPGA, including: a CAN transceiver module, an FPGA instruction control and processing module, and a wireless communication module; the CAN transceiver module is connected to the FPGA instruction control and processing module, and the FPGA instruction control and processing module is connected to the wireless communication module. The CAN transceiver module includes a CAN transceiver chip and a CAN controller chip; the FPGA instruction control and processing module includes an FPGA chip ZYNQ and DDR3_SDRAM, wherein the ZYNQ chip includes a processing system part (PS end) and a programmable logic part (PL end), the PL end includes a CAN control and data receiving module, an instruction parsing module, a communication instruction data conversion module, a configuration instruction data conversion module, a SWD control module, a configuration instruction data storage module and an AXI interconnection module, the PS end includes a UART sending program and a wireless communication module configuration program; the wireless communication module includes a wireless communication chip ATSAMR30.
[0015] Figure 1A block diagram of a CAN communication instruction to wireless communication instruction communication system based on FPGA is given. First, the CAN transceiver module is controlled by the CAN control and data receiving module in the FPGA instruction control and processing module, receives the differential serial signal on the CAN bus, and converts the serial data into parallel data through the CAN controller chip according to the CAN protocol and sends it to the FPGA instruction control and processing module. Then, the FPGA instruction control and processing module will parse the received instruction data to determine whether the received instruction data is communication instruction data or configuration instruction data. If it is communication instruction data, it will be stored in the communication instruction cache area of DDR3_SDRAM; if it is configuration instruction data, it will be stored in the configuration instruction cache area of DDR3_SDRAM; when there is data in the communication instruction cache area of DDR3_SDRAM, the FPGA instruction control and processing module will transmit a frame of communication instructions in the communication instruction cache area of DDR3_SDRAM to the wireless communication module through the UART interface. When the FPGA instruction control and processing module receives the communication instruction sending success instruction of the wireless communication module through the UART interface, it will continue to read a frame of communication instruction data from the communication instruction cache area of DDR3_SDRAM and output it to the wireless communication module through the UART interface until the data cached in the communication instruction cache area of DDR3_SDRAM is sent. When there is data in the configuration instruction cache area of DDR3_SDRAM, the FPGA instruction control and processing module will read the configuration instruction data in the configuration instruction cache area of DDR3_SDRAM and configure the working mode, channel, transmission power and modulation scheme of the wireless communication module through the SWD interface. Finally, the wireless communication module receives the communication instructions transmitted by the FPGA instruction control and processing module through the UART interface and converts them into electromagnetic wave signals and sends them out. When a frame of communication instructions is sent, it returns the communication instruction sending completion instruction to the FPGA instruction control and processing module through the UART interface, and continues to wait for the next frame of communication instructions output by the FPGA instruction control and processing module.
[0016] Figure 2The working block diagram of the FPGA instruction control and processing module is given. First, the CAN control and data receiving module at the PL end of the ZYNQ chip drives the CAN transceiver module, and receives the parallel instruction data output by the CAN transceiver module and forwards it to the instruction parsing module; the instruction parsing module at the PL end of the ZYNQ chip parses the parallel instruction data output by the CAN control and data receiving module, and determines whether the received instruction data is a communication instruction or a configuration instruction. If it is a communication instruction, it is output to the communication instruction data conversion module, and if it is a configuration instruction, it is output to the configuration instruction data conversion module; the communication instruction data conversion module at the PL end of the ZYNQ chip receives the communication instruction data and converts it into AXI_Lite protocol data and outputs it to the AXI interconnection module for processing. And stored in the communication instruction cache area of DDR3_SDRAM; similarly, the configuration instruction data conversion module on the PL side of the ZYNQ chip receives the configuration instruction data and converts it into AXI_Lite protocol data and outputs it to the AXI interconnection module and then stores it in the configuration instruction cache area of DDR3_SDRAM; when the UART sending program on the PS side of the ZYNQ chip detects that there is data in the communication instruction cache area of DDR3_SDRAM, it will read a frame of communication instruction data from the communication instruction cache area of DDR3_SDRAM and output it to the wireless communication module through the UART interface, and receive the communication instruction sending success instruction of the wireless communication module through the UART interface. If After receiving it, it will continue to read a frame of communication instruction data from the communication instruction buffer area of DDR3_SDRAM and output it to the wireless communication module through the UART interface until the data cached in the communication instruction buffer area of DDR3_SDRAM is sent out; the SWD control module at the PL end of the ZYNQ chip will detect the rising edge of the configuration instruction data storage completion signal output by the configuration instruction data storage module. After detecting the rising edge, it will read the configuration instruction stored in the configuration instruction data storage module, generate the corresponding configuration timing, output it through the SWD interface, and then configure the wireless communication module; the configuration instruction data storage module at the PL end of the ZYNQ chip receives the configuration instruction output by the AXI interconnection module Data, after receiving the configuration instruction data, the level of the configuration instruction data storage completion signal is maintained at a high level for a period of time; the AXI interconnection module at the PL end of the ZYNQ chip can not only receive the communication instruction data of the AXI_Lite protocol output by the communication instruction data conversion module, and store it in the communication instruction cache area of DDR3_SDRAM, but also receive the configuration instruction data of the AXI_Lite protocol output by the configuration instruction data conversion module, and store it in the configuration instruction cache area of DDR3_SDRAM, and can also receive the configuration instruction data output from the configuration instruction cache area of DDR3_SDRAM, and output it to the configuration instruction data storage module.The wireless communication module configuration program on the PS side of the ZYNQ chip will not only send the default configuration instruction data of the wireless communication module to the configuration instruction data storage module through the AXI interconnection module when the system is powered on, but will also continuously detect the configuration instruction cache area of DDR3_SDRAM. When it is detected that the configuration instruction of the configuration instruction cache area has changed, the new configuration instruction data of the configuration instruction cache area of DDR3_SDRAM will be sent to the configuration instruction data storage module through the AXI interconnection module.
[0017] Figure 3 The working flow chart of the wireless communication chip ATSAMR30 is given. First, ATSAMR30 is initialized through the communication interface SWD to configure the working mode, channel, transmission power and modulation scheme, etc.; then, the automatic receiving state is started to determine whether the communication instruction data is received through the UART interface. If the communication instruction is received, the ARM Cortex-0+ processor controls the radio transceiver embedded in the wireless communication chip ATSAMR30 to send the corresponding communication instruction data. If the communication instruction data is not received, it returns to the automatic receiving instruction state to receive the communication instruction data; then, it determines whether the radio transceiver sends successfully. If the sending is successful, the communication instruction sending success instruction is sent to the FPGA instruction control and processing module through the UART interface, and returns to the automatic receiving state. If the sending fails, the radio transceiver resends.
[0018] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0019] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the invention patent. It should be pointed out that for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present application, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be based on the attached claims.
Claims
1. A CAN communication instruction to wireless communication instruction communication system based on FPGA, comprising: CAN transceiver module, FPGA instruction control and processing module, wireless communication module; the CAN transceiver module is connected to the FPGA instruction control and processing module, and the FPGA instruction control and processing module is connected to the wireless communication module; the CAN transceiver module includes a CAN transceiver chip and a CAN controller chip; the FPGA instruction control and processing module includes an FPGA chip ZYNQ and DDR3_SDRAM, the ZYNQ includes a processing system part and a programmable logic part, the PL end includes a CAN control and data receiving module, an instruction parsing module, a communication instruction data conversion module, a configuration instruction data conversion module, a SWD control module, a configuration instruction data storage module and an AXI interconnection module, the PS end includes a UART sending program and a wireless communication module configuration program; the wireless communication module includes a wireless communication chip ATSAMR30.
2. The FPGA-based CAN communication instruction to wireless communication instruction communication system according to claim 1, characterized in that: The CAN control and data receiving module at the PL end of the ZYNQ chip is used to drive the CAN transceiver module and receive the parallel command data output by the CAN transceiver module.
3. The FPGA-based CAN communication instruction to wireless communication instruction communication system according to claim 1, characterized in that: The instruction parsing module at the PL end of the ZYNQ chip parses the parallel instruction data output by the CAN control and data receiving module, and determines whether the received instruction data is a communication instruction or a configuration instruction. If it is a communication instruction, it is output to the communication instruction data conversion module; if it is a configuration instruction, it is output to the configuration instruction data conversion module.
4. The FPGA-based CAN communication instruction to wireless communication instruction communication system according to claim 1, characterized in that: The SWD control module at the PL end of the ZYNQ chip detects the rising edge of the configuration instruction data storage completion signal output by the configuration instruction data storage module. When the rising edge is detected, the configuration instruction stored in the configuration instruction data storage module is read, and the corresponding configuration timing is generated and output through the SWD interface to configure the wireless communication module.
5. The FPGA-based CAN communication instruction to wireless communication instruction communication system according to claim 1, characterized in that: The configuration instruction data storage module at the PL end of the ZYNQ chip receives the configuration instruction data output by the AXI interconnect module, and after receiving the configuration instruction data, maintains the level of the configuration instruction data storage completion signal at a high level for a period of time.
6. The FPGA-based CAN communication instruction to wireless communication instruction communication system according to claim 1, characterized in that: The UART sending program on the PS side of the ZYNQ chip is used to read communication command data from the communication command cache area of DDR3_SDRAM and output it to the wireless communication module through the UART interface, and is also used to receive the communication command sending success instruction of the wireless communication module through the UART interface, and continue to read communication command data from the communication command cache area of DDR3_SDRAM and output it to the wireless communication module through the UART interface.
7. The FPGA-based CAN communication instruction to wireless communication instruction communication system according to claim 1, characterized in that: The wireless communication module configuration program at the PS end of the ZYNQ chip is used to send the default configuration instruction data of the wireless communication module to the configuration instruction data storage module through the AXI interconnection module when the system is powered on, and is also used to continuously detect the configuration instruction cache area of DDR3_SDRAM. When it is detected that the configuration instruction of the configuration instruction cache area has changed, the new configuration instruction data of the configuration instruction cache area of DDR3 SDRAM will be sent to the configuration instruction data storage module through the AXI interconnection module.
8. A method for converting CAN communication instructions to wireless communication instructions based on FPGA, characterized in that: The method is performed by using the FPGA-based CAN communication instruction to wireless communication instruction communication system according to any one of claims 1 to 7, and comprises: S1: The wireless communication chip ATSAMR30 of the wireless communication module is initialized through the communication interface SWD, and the working mode, channel, transmission power and modulation scheme are configured; S2: Start the automatic receiving state, determine whether the communication command data is received through the UART interface, if the communication command is received, the ARM Cortex-0+ processor controls the radio transceiver embedded in the wireless communication chip ATSAMR30 to send the corresponding communication command data, if the communication command data is not received, return to the automatic receiving command state, and receive the communication command data; S3: The processing module sends a communication instruction and a successful transmission instruction, and returns to the automatic receiving state. If the transmission fails, the radio transceiver resends.
