CN111522332A - Portable CAN detection and upgrade device and method - Google Patents

Portable CAN detection and upgrade device and method Download PDF

Info

Publication number
CN111522332A
CN111522332A CN202010441369.1A CN202010441369A CN111522332A CN 111522332 A CN111522332 A CN 111522332A CN 202010441369 A CN202010441369 A CN 202010441369A CN 111522332 A CN111522332 A CN 111522332A
Authority
CN
China
Prior art keywords
module
message
microprocessor
microprocessor module
external
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.)
Pending
Application number
CN202010441369.1A
Other languages
Chinese (zh)
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.)
Xiamen Ningsong Information Technology Co ltd
Original Assignee
Xiamen Ningsong Information 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 Xiamen Ningsong Information Technology Co ltd filed Critical Xiamen Ningsong Information Technology Co ltd
Priority to CN202010441369.1A priority Critical patent/CN111522332A/en
Publication of CN111522332A publication Critical patent/CN111522332A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B23/00Testing or monitoring of control systems or parts thereof
    • G05B23/02Electric testing or monitoring
    • G05B23/0205Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
    • G05B23/0208Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterized by the configuration of the monitoring system
    • G05B23/0213Modular or universal configuration of the monitoring system, e.g. monitoring system having modules that may be combined to build monitoring program; monitoring system that can be applied to legacy systems; adaptable monitoring system; using different communication protocols
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/24Pc safety
    • G05B2219/24065Real time diagnostics

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Automation & Control Theory (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to a portable CAN detection and upgrade device and a method thereof, wherein the device comprises: the device comprises a microprocessor module, a CAN communication module, a USB communication module, an external power supply module, a storage module and an interaction module; the microprocessor module is connected with the CAN communication module to receive and transmit CAN messages; the microprocessor module is connected with the USB communication module to communicate with external USB equipment and receive an external power supply; the storage module is connected with the microprocessor module to store data; the external power supply module is connected with the microprocessor module to provide power for external CAN equipment; the interaction module is connected with the microprocessor module to send a control instruction and display a processing result. The invention CAN analyze the CAN message in real time and judge the CAN fault under the condition of not carrying a PC; meanwhile, the external CAN equipment CAN be upgraded without carrying a PC, and power supplies with different voltages are provided for the external CAN equipment.

Description

Portable CAN detection and upgrade device and method
Technical Field
The invention relates to the technical field of vehicles, in particular to a portable CAN detection and upgrade device and a method.
Background
At present, CAN cards on the market are various, but the functions are basically the same or similar, and the main products are that the CAN cards convert bus signals into USB signals to be connected with a PC. In the use, the PC must be used for operation, the technical requirement on operators is high, and the equipment such as a portable computer must be carried every time.
In addition, for upgrading the product of the non-networked terminal equipment, a special burning tool is adopted to upgrade the product at present. However, many products do not reserve upgrading interfaces under the factors of appearance, use environment, design and the like, and can only be upgraded after the products are disassembled.
Disclosure of Invention
The invention mainly aims to overcome the defects that in the prior art, a portable CAN detection and upgrade device and a method are provided, and external CAN equipment is convenient to detect and upgrade.
The invention adopts the following technical scheme:
in one aspect, a portable CAN detection and upgrade device, comprising: the device comprises a microprocessor module, a CAN communication module, a USB communication module, an external power supply module, a storage module and an interaction module; the microprocessor module is connected with the CAN communication module to receive and transmit CAN messages; the microprocessor module is connected with the USB communication module to communicate with external USB equipment and receive an external power supply; the storage module is connected with the microprocessor module to store data; the external power supply module is connected with the microprocessor module so as to boost the power supply output by the microprocessor module and then supply the power supply to external CAN equipment; the interaction module is connected with the microprocessor module to send a control instruction and display a processing result.
Preferably, the CAN communication module comprises a CAN communication isolation circuit, a CAN transceiver, a CAN interface protection circuit and a CAN communication interface which are connected in sequence; the CAN communication isolation circuit is connected with the microprocessor module; the CAN communication interface is connected with external CAN equipment through a CAN bus.
Preferably, the USB communication module includes a USB communication interface; and the microprocessor is connected with external USB equipment through the USB communication interface.
Preferably, the USB communication interface includes a Type-C interface; the external USB device comprises a PC.
Preferably, the storage module comprises a FLASH memory, an EEPROM memory or an SD card.
Preferably, the external power supply module comprises a switching power supply chip; the output voltage sampling end of the switching power supply chip is connected with the microprocessor module; and the collector leading-out end of the switching power supply chip outputs power through an external power supply interface.
Preferably, the interactive module comprises a key input unit and a display screen output unit; the microprocessor module is connected with the key input unit to receive a key instruction; the display screen output unit is connected with the microprocessor module to display a processing result.
Preferably, the interaction module comprises a display screen touch unit and a display screen output unit; the microprocessor module is connected with the display screen touch unit to receive a touch instruction; the display screen output unit is connected with the microprocessor module to display a processing result.
On the other hand, a CAN detection and upgrade method is based on the portable CAN detection and upgrade device, and specifically comprises the following steps:
the microprocessor module reads a working mode configured by an external USB device through the USB communication module; the working modes comprise a first working mode, a second working mode and a third working module;
when the working mode is a first working mode, the microprocessor module reads shielding rule information of a decoding CAN message configured by external USB equipment from the storage module; when the microprocessor module receives a CAN message through a CAN communication module, displaying the decoded CAN message based on the shielding rule information;
when the working mode is a second working mode, the microprocessor module reads a CAN message sending mode configured by an external USB device, wherein the CAN message sending mode comprises timing sending, control instruction sending and message triggering sending; when the CAN message is sent in a timing mode, the microprocessor module reads timing related information from the storage module, starts a corresponding timer according to the timing related information, and sends a corresponding CAN message through the CAN communication module after the timing time is up; when the CAN message sending mode is control instruction sending, the microprocessor module judges whether a first preset control instruction is input, and when the first preset control instruction is received, the microprocessor module reads corresponding message information from the storage module and sends a corresponding CAN message through the CAN communication module; when the CAN message sending mode is message triggering sending, the microprocessor module reads message triggering data from the storage module, and when a message consistent with the message triggering data is received, the corresponding CAN message is sent through the CAN communication module;
when the working mode is a third working mode, the microprocessor module reads an upgrade package file from the storage module; and when a second preset control instruction is received, the microprocessor module sends the upgrade package file to external CAN equipment through the CAN communication module.
Preferably, when the operation mode is a third operation mode, the method further includes:
the microprocessor module checks the upgrade package file, and if the upgrade package file is not checked, the interactive module displays an error; and if the verification is passed, displaying the progress of sending the upgrade patch file to the external USB equipment through the interactive module.
As can be seen from the above description of the present invention, compared with the prior art, the present invention has the following advantages:
(1) the CAN communication module is arranged in the CAN communication system, is connected with a CAN bus through a CAN communication interface, and CAN receive and transmit CAN messages in real time to realize interaction with external CAN equipment;
(2) the invention supplies power through the USB communication interface (can also supply power through the built-in battery), and communicate with external USB apparatus such as PC; parameter setting and data transmission (including upgrade package files) are realized by communicating with external USB equipment;
(3) the built-in storage module realizes the storage of the setting parameters and the transmission data through the storage module, and is convenient for subsequent use;
(4) according to the invention, the external CAN equipment firmware is upgraded in a CAN bus mode based on the upgrade packet file prestored in the storage module, so that the equipment firmware CAN be upgraded without disassembling the shell;
(5) the invention is internally provided with an external power supply module, different output voltages are set through the microprocessor module, and power supplies with different voltages CAN be provided for external CAN equipment (especially when the external CAN equipment is inconvenient to get electricity), so that the detection and the upgrading use are convenient;
(6) the interactive module of the invention is composed of keys and a TFT display screen (or the keys are not needed to be realized only by the TFT display screen), and can conveniently issue control instructions and visually display processing results;
(7) before the communication between the site and the external CAN equipment is carried out, the invention CAN communicate with the PC, one or more working modes are set by the PC, and parameters configured by various working modes and various required data (shielding rules, timing information, instruction information, trigger message information, upgrade package files and the like for decoding CAN messages) are downloaded to the storage module for storage, so that the corresponding PC is not required to be carried during site operation, the corresponding working mode is selected according to the site requirement and the corresponding operation is executed, and the operation is simple and convenient.
The present invention will be described in further detail with reference to the accompanying drawings and embodiments, but the present invention is not limited to the embodiments.
Drawings
FIG. 1 is a block diagram of the portable CAN detection and upgrade device of the present invention;
FIG. 2 is a circuit diagram of a microprocessor module according to the present invention;
FIG. 3 is a circuit diagram of the memory module of the present invention, wherein (a) represents FLASH storage and (b) represents EEPROM storage;
FIG. 4 is a circuit diagram of a CAN communication module of the present invention;
FIG. 5 is a circuit diagram of a USB communication module according to the present invention;
fig. 6 is a circuit diagram of an external power supply module according to the present invention;
FIG. 7 is a circuit diagram of a key input unit of the interactive module of the present invention;
FIG. 8 is a circuit diagram of a touch unit and an output unit of a display screen according to the present invention;
FIG. 9 is a flow chart of the method of the present invention.
Detailed Description
The invention is further described below by means of specific embodiments.
Referring to fig. 1, in one aspect, a portable CAN detection and upgrade apparatus includes: the system comprises a microprocessor module 10, a CAN communication module 30, a USB communication module, an external power supply module 50, a storage module 40 and an interaction module 60; the microprocessor module 10 is connected with the CAN communication module 30 to receive and transmit CAN messages; the microprocessor module 10 is connected with the USB communication module to communicate with an external USB device and receive an external power supply; the storage module 40 is connected with the microprocessor module 10 to store data; the external power supply module 50 is connected with the microprocessor module 10 to boost the power output by the microprocessor module 10 and then provide the boosted power to the external CAN device; the interaction module 60 is connected to the microprocessor module 10 to send control commands and display processing results.
Specifically, referring to fig. 2, the microprocessor module 10 includes a processing chip of a model STM32F103VET6, and the processing chip is used to implement communication with the CAN communication module 30, the USB communication module, the external power supply module 50, the storage module 40, and the interaction module 60.
Further, referring to fig. 4, the CAN communication module 30 includes a CAN communication isolation circuit, a CAN transceiver, a CAN interface protection circuit, and a CAN communication interface 301, which are connected in sequence. Specifically, the CAN communication isolation circuit is connected with the microprocessor module 10 through ports PA12-CAN _ TX and PA11-CAN _ RX; the CAN communication interface 301 is connected with an external CAN device through a CAN bus. The external CAN devices include automotive electronics such as TBOX, OBD, tachographs, car navigation screens, and the like.
Further, referring to fig. 5, the USB communication module includes a USB communication interface 201; the microprocessor is connected with an external USB device through the USB communication interface 201. Specifically, the USB communication module is connected with the microprocessor module 10 through the PC11-US4-RX and the PC10-US 4-TX.
In this embodiment, the USB communication interface 201 includes a Type-C interface; the external USB device comprises a PC. The CAN message receiving and transmitting device realizes serial port communication with an external PC through the Type-C interface. Simultaneously, still realize supplying power to each module of device through this Type-C interface.
Furthermore, the portable CAN detection and upgrade device also comprises a battery module, wherein the battery module CAN be a common battery or a rechargeable lithium battery, and the rechargeable lithium battery CAN be charged through the Type-C interface.
Further, referring to fig. 2, the storage module 40 includes a FLASH memory, an EEPROM memory, or an SD card. The storage module 40 is used to store one or more upgrade packages, configuration data, and other files. The FLASH memory U5 is connected to the microprocessor module 10 via PB12-F _ CS, PB14-SPI2_ MISO, PB13-SPI2_ SCK and PB15-SPI2_ MOSI. The EEPROM memory U7 is connected to the microprocessor module 10 via PB10-I2C2_ SCL and PB11-I2C2_ SDA.
Further, referring to fig. 6, the external power supply module 50 includes a switching power supply chip MC33063 AVDR; the output voltage sampling end MCU-DAC of the switching power supply chip is connected with the microprocessor module 10; the collector terminal SWC of the switching power supply chip outputs power through the external power supply interface 501. Through the output voltage sampling end MCU-DAC, different output voltages can be set through the microprocessor module 10, thereby meeting the requirements of various terminals. Referring to fig. 6, the voltage boosting circuit further includes an output voltage acquisition terminal Vo-ADC, and the sampling terminal can detect the output voltage after the actual boosting process, so as to ensure that the output voltage is normal.
Further, referring to fig. 7 and 8, the interaction module 60 includes a key input unit and a display screen output unit; the microprocessor module 10 is connected with the key input unit to receive key instructions; the display screen output unit is connected with the microprocessor module 10 to display the processing result. In this embodiment, the KEY input unit includes four KEYs S1, S2, S3 and S4, which are respectively connected to the microprocessor module 10 through PE6-KEY1, PE5-KEY2, PE4-KEY3 and PE3-KEY4, and input a control command to the microprocessor module 10. The display screen output unit comprises a TFT22 display screen interface and a display screen backlight control circuit. The display screen backlight control circuit is connected with the microprocessor module 10 through a PB5-BL _ CTR.
In an alternative embodiment, referring to fig. 8, the interaction module 60 includes a display screen touch unit and a display screen output unit; the microprocessor module 10 is connected with the display screen touch unit to receive a touch instruction; the display screen output unit is connected with the microprocessor module 10 to display the processing result. The touch interface circuit shown in fig. 8 is a specific implementation of the touch unit of the display screen, and includes a chip with a model of XPT2046N, and is connected to the microprocessor module 10 through PA5-SPI1-SCK, PB7-SPI1-CS3, PA7-SPI1-MOSI, PA6-SPI1-MISO, and PB 6-7846-INT.
Referring to fig. 9, in another aspect, a CAN detection and upgrade method based on the portable CAN detection and upgrade apparatus specifically includes:
the microprocessor module reads a working mode configured by an external USB device through the USB communication module; the working modes comprise a first working mode, a second working mode and a third working module;
when the working mode is a first working mode, the microprocessor module reads shielding rule information of a decoding CAN message configured by external USB equipment from the storage module; when the microprocessor module receives a CAN message through a CAN communication module, displaying the decoded CAN message based on the shielding rule information;
when the working mode is a second working mode, the microprocessor module reads a CAN message sending mode configured by an external USB device, wherein the CAN message sending mode comprises timing sending, control instruction sending and message triggering sending; when the CAN message is sent in a timing mode, the microprocessor module reads timing related information from the storage module, starts a corresponding timer according to the timing related information, and sends a corresponding CAN message through the CAN communication module after the timing time is up; when the CAN message sending mode is control instruction sending, the microprocessor module judges whether a first preset control instruction is input, and when the first preset control instruction is received, the microprocessor module reads corresponding message information from the storage module and sends a corresponding CAN message through the CAN communication module; when the CAN message sending mode is message triggering sending, the microprocessor module reads message triggering data from the storage module, and when a message consistent with the message triggering data is received, the corresponding CAN message is sent through the CAN communication module;
when the working mode is a third working mode, the microprocessor module reads an upgrade package file from the storage module; and when a second preset control instruction is received, the microprocessor module sends the upgrade package file to external CAN equipment through the CAN communication module.
In this embodiment, when the operating mode is the third operating mode, the method further includes:
the microprocessor module checks the upgrade package file, and if the upgrade package file is not checked, the interactive module displays an error; and if the verification is passed, displaying the progress of sending the upgrade patch file to the external USB equipment through the interactive module.
In fig. 9, the storage module is a FLASH memory. The first preset control instruction and the second preset control instruction are input through keys.
Before the communication between the site and the external CAN equipment, the method CAN communicate with the PC, one or more working modes are set by the PC, and parameters configured by various working modes and various required data (shielding rules, timing information, instruction information, trigger message information, upgrade package files and the like for decoding CAN messages) are downloaded to the storage module for storage.
The above description is only an embodiment of the present invention, but the design concept of the present invention is not limited thereto, and any insubstantial modifications made by using the design concept should fall within the scope of infringing the present invention.

Claims (10)

1. A portable CAN detection and upgrade device, comprising: the device comprises a microprocessor module, a CAN communication module, a USB communication module, an external power supply module, a storage module and an interaction module; the microprocessor module is connected with the CAN communication module to receive and transmit CAN messages; the microprocessor module is connected with the USB communication module to communicate with external USB equipment and receive an external power supply; the storage module is connected with the microprocessor module to store data; the external power supply module is connected with the microprocessor module so as to boost the power supply output by the microprocessor module and then supply the power supply to external CAN equipment; the interaction module is connected with the microprocessor module to send a control instruction and display a processing result.
2. The portable CAN detection and upgrade apparatus of claim 1, wherein the CAN communication module comprises a CAN communication isolation circuit, a CAN transceiver, a CAN interface protection circuit, and a CAN communication interface, which are connected in sequence; the CAN communication isolation circuit is connected with the microprocessor module; the CAN communication interface is connected with external CAN equipment through a CAN bus.
3. The portable CAN detection and upgrade apparatus of claim 1, wherein the USB communication module comprises a USB communication interface; and the microprocessor is connected with external USB equipment through the USB communication interface.
4. The portable CAN detection and upgrade apparatus of claim 3, wherein the USB communication interface comprises a Type-C interface; the external USB device comprises a PC.
5. The portable CAN detection and upgrade apparatus of claim 1, wherein the storage module comprises FLASH memory, EEPROM memory, or SD card.
6. The portable CAN detection and upgrade apparatus of claim 1, wherein the external power module comprises a switching power chip; the output voltage sampling end of the switching power supply chip is connected with the microprocessor module; and the collector leading-out end of the switching power supply chip outputs power through an external power supply interface.
7. The portable CAN detection and upgrade apparatus of claim 1, wherein the interaction module comprises a key input unit and a display screen output unit; the microprocessor module is connected with the key input unit to receive a key instruction; the display screen output unit is connected with the microprocessor module to display a processing result.
8. The portable CAN detection and upgrade apparatus of claim 1, wherein the interaction module comprises a display screen touch unit and a display screen output unit; the microprocessor module is connected with the display screen touch unit to receive a touch instruction; the display screen output unit is connected with the microprocessor module to display a processing result.
9. A CAN detection and upgrade method, based on the portable CAN detection and upgrade apparatus according to any one of claims 1 to 8, specifically comprising:
the microprocessor module reads a working mode configured by an external USB device through the USB communication module; the working modes comprise a first working mode, a second working mode and a third working module;
when the working mode is a first working mode, the microprocessor module reads shielding rule information of a decoding CAN message configured by external USB equipment from the storage module; when the microprocessor module receives a CAN message through a CAN communication module, displaying the decoded CAN message based on the shielding rule information;
when the working mode is a second working mode, the microprocessor module reads a CAN message sending mode configured by an external USB device, wherein the CAN message sending mode comprises timing sending, control instruction sending and message triggering sending; when the CAN message is sent in a timing mode, the microprocessor module reads timing related information from the storage module, starts a corresponding timer according to the timing related information, and sends a corresponding CAN message through the CAN communication module after the timing time is up; when the CAN message sending mode is control instruction sending, the microprocessor module judges whether a first preset control instruction is input, and when the first preset control instruction is received, the microprocessor module reads corresponding message information from the storage module and sends a corresponding CAN message through the CAN communication module; when the CAN message sending mode is message triggering sending, the microprocessor module reads message triggering data from the storage module, and when a message consistent with the message triggering data is received, the corresponding CAN message is sent through the CAN communication module;
when the working mode is a third working mode, the microprocessor module reads an upgrade package file from the storage module; and when a second preset control instruction is received, the microprocessor module sends the upgrade package file to external CAN equipment through the CAN communication module.
10. The CAN detection and upgrade method of claim 9, wherein when the operating mode is a third operating mode, the method further comprises:
the microprocessor module checks the upgrade package file, and if the upgrade package file is not checked, the interactive module displays an error; and if the verification is passed, displaying the progress of sending the upgrade package file to the external CAN equipment through the interactive module.
CN202010441369.1A 2020-05-22 2020-05-22 Portable CAN detection and upgrade device and method Pending CN111522332A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010441369.1A CN111522332A (en) 2020-05-22 2020-05-22 Portable CAN detection and upgrade device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010441369.1A CN111522332A (en) 2020-05-22 2020-05-22 Portable CAN detection and upgrade device and method

Publications (1)

Publication Number Publication Date
CN111522332A true CN111522332A (en) 2020-08-11

Family

ID=71912660

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010441369.1A Pending CN111522332A (en) 2020-05-22 2020-05-22 Portable CAN detection and upgrade device and method

Country Status (1)

Country Link
CN (1) CN111522332A (en)

Similar Documents

Publication Publication Date Title
CN111239617B (en) Control method and device for charge and discharge test, storage medium and system
CN106627230A (en) Method for automatically charging by utilizing vehicle identification number (VIN)
CN105677420A (en) Method and device for interface pin configuration
CN103344863A (en) Mobile terminal testing method and mobile terminal testing system
CN107678753A (en) A kind of program burn writing method, apparatus and electronic equipment
CN107726931A (en) The all-electronin fuse tester and its control method that a kind of parameter can be bound
CN202074893U (en) Control device for detonation of electric detonator based on GSM network monitoring
CN115265301A (en) Universal electronic detonator initiator
CN113810403B (en) Charging pile vulnerability detection method and detection device based on communication protocol
CN212060974U (en) Portable CAN detects and upgrading device
CN215954135U (en) Test tool, vehicle control system and vehicle
CN111522332A (en) Portable CAN detection and upgrade device and method
CN206348778U (en) A kind of device of instrument program upgrading
CN205620994U (en) Embedded equipment processing apparatus
CN103309822B (en) identification system and method
CN207148816U (en) A kind of program burn writing system and electronic equipment
CN207557927U (en) A kind of instrument and hand-held software upgrading tool
CN215868152U (en) Infrared remote control device
CN103870304A (en) Program update device and method, remote control system and engineering machine
CN112188390B (en) Mobile card reading terminal based on dual-frequency wireless communication technology, communication method and device
CN212809441U (en) Wireless remote control handset of industrial equipment
CN201532421U (en) Audio control panel test device for airliners in civil aviation
CN100552627C (en) A kind of method of electronic product being carried out Data Update
CN102650510A (en) Detonation and programming integrated device for digital electronic detonator
CN107894545B (en) Intelligent detection method for portable equipment wiring and locomotive signal sensor

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