CN103441912A - FlexRay bus monitoring method based on USB-HID protocol - Google Patents

FlexRay bus monitoring method based on USB-HID protocol Download PDF

Info

Publication number
CN103441912A
CN103441912A CN201310355062XA CN201310355062A CN103441912A CN 103441912 A CN103441912 A CN 103441912A CN 201310355062X A CN201310355062X A CN 201310355062XA CN 201310355062 A CN201310355062 A CN 201310355062A CN 103441912 A CN103441912 A CN 103441912A
Authority
CN
China
Prior art keywords
flexray
usb
hid
data
monitoring
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
CN201310355062XA
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.)
SHANGHAI GUTAI TECHNOLOGY Co Ltd
Original Assignee
SHANGHAI GUTAI 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 SHANGHAI GUTAI TECHNOLOGY Co Ltd filed Critical SHANGHAI GUTAI TECHNOLOGY Co Ltd
Priority to CN201310355062XA priority Critical patent/CN103441912A/en
Publication of CN103441912A publication Critical patent/CN103441912A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention relates to a FlexRay bus monitoring system which comprises a microcontroller, at least two FlexRay controllers and a USB module. The FlexRay bus monitoring system is characterized in that the FlexRay bus monitoring system can be simultaneously connected with at least two FlexRay buses; when a FlexRay message or an error frame is monitored on any one of the FlexRay buses, the system can store monitored data into a local internal storage and send the data in the internal storage to the USB module; the USB module is connected to a PC through a USB cable; a USB device is switched on in the mode of switching on HID devices on the PC, a read-write API function relevant to the HID devices is invoked through an application program to conduct data interaction with a lower computer, and therefore monitoring of the FlexRay buses is realized including display of signals and reception and transmission of messages.

Description

FlexRay method for monitoring bus based on the USB-HID agreement
Technical field
The present invention relates to the communications field, particularly a kind of system for a transfer of data between FlexRay bus and usb bus.
Background technology
FlexRay is a kind of confirmability of the high speed for automobile, the bus system that possesses failure tolerant, FlexRay is by transmission of information in definite time slot, and the failure tolerant on two passages and the transmission of redundant information, met the ever-increasing demand to the rate of information throughput especially failure tolerant and time determinability of new x-by-wire system thought.The FlexRay bus is as the communication interface between each microcontroller, in application, an important demand is exactly to gather the signal transmitted between each microcontroller from the FlexRay bus by specific hardware circuit, and be transferred to PC, and show thereon, thereby realize the monitoring in FlexRay bus communication process.
The signal that will collect from the FlexRay bus is transferred to PC, modal way is to use usb bus, and hold at the PC of operation Windows operating system, write the USB device driver for specific equipment, device driver is responsible for receiving the data of slave computer, and it is transferred to the application program of PC end.
Writing the USB device driver for specific equipment has the following disadvantages: 1, device driver is made complexity, need to consider the USB power management, enumerates the series of problems such as data communication; 2, device driver debug difficulties; 3, the small fault of device driver will cause the operating system collapse; 4, the operating system that the device driver of lowest version can't compatible highest version, be not suitable for the upgrading of PC
Summary of the invention
Purpose of the present invention, exactly for the defect of the device driver establishment that overcomes the USB special use, provide a kind of without writing voluntarily driver, solution and the device of the FlexRay monitoring bus based on the USB-HID agreement.
Concrete technical scheme provided by the invention is as follows:
FlexRay monitoring bus system based on the USB-HID agreement, described system is used microcontroller to be connected with at least two FlexRay controllers, after corresponding device listens to FlexRay message or erroneous frame on any FlexRay bus, the data of monitoring are read in to local internal memory, and the data in this internal memory are sent to the USB module, the USB module is connected to PC by the USB line, at PC, adopt the mode of HID equipment class to open USB device, and relevant read-write api function and slave computer carries out data interaction by application call HID equipment class, thereby realize the monitoring of FlexRay bus, comprise the demonstration of signal and transmitting-receiving of message etc.
FlexRay monitoring bus system based on the USB-HID agreement, comprise hardware circuit, program of lower computer and host computer procedure.
The hardware circuit designed in FlexRay monitoring bus system based on the USB-HID agreement, be comprised of microcontroller, at least two FlexRay controllers, USB modules; Microcontroller is connected with at least two FlexRay controllers, and corresponding device reads in local internal memory by the data of monitoring, and the data in this internal memory are sent to the USB module listen to FlexRay message or erroneous frame on any FlexRay bus after.
USB module in FlexRay monitoring bus system based on the USB-HID agreement is connected to PC by the USB line, at PC, adopt the mode of HID equipment class to open USB device, and relevant read-write api function and slave computer carry out data interaction by application call HID equipment class.
In the embodiment of the present invention, mode with the HID equipment class in the USB of hardware module is carried out device enumeration, after enumeration succeeds, equipment can and automatically be held by the HID device drives and take over communication at Windows by PC identification, can normally access slave computer as long as open upper computer software, communication efficiency is high, communication quality is reliable, thereby effectively improved equipment development efficiency, this system makes at any Windows of being equipped with and on the computer of USB interface and all can use this equipment simultaneously, and does not need this is designed any driver.
The accompanying drawing explanation
Fig. 1 is FlexRay monitoring bus general frame figure in the embodiment of the present invention
The flow chart that Fig. 2 is slave computer in the invention process system
Fig. 3 is upper computer detection HID equipment flowsheet in the invention process system
The data communication flow process figure that Fig. 4 is host computer in the invention process system
In Fig. 1, microcontroller (101), FlexRay controller (102), FlexRay transceiver (103), FlexRay bus FlexRayH(104), FlexRay bus FlexRayL(105), USB module (106), USB HID driver (107), ipc monitor program (108), PC (109), lower computer hardware circuit (110), USB line (111)
Embodiment
In Fig. 1, microcontroller (101) connects at least two FlexRay controllers (102), the TX pin of each FlexRay controller and RX pin are connected respectively TX pin and the RX pin of FlexRay transceiver (103), the FlexRayH of FlexRay transceiver is connected to FlexRay bus FlexRayH(104), the FlexRayL of FlexRay transceiver is connected to the FlexRayL(105 of FlexRay bus).
In Fig. 1, PC (109) inside comprises the HID device driver (107) that Windows carries, and monitoring program (108) is connected to USB line (111) by the HID driver, and is connected to the USB module (106) of lower computer hardware (110).
Microcontroller (101), inner integrated CPU and internal memory, be connected with one or more independently FlexRay controllers; Or inner integrated one or more FlexRay controllers; What Fig. 1 showed is the situation of inner integrated two the FlexRay controllers of microcontroller (102).
FlexRay controller (102), protocol conversion chip as the FlexRay bus, be responsible for the information such as the message on the FlexRay bus and erroneous frame are fed back to microcontroller, each FlexRay controller has TX and the RX pin be connected with the FlexRay transceiver.
Below in conjunction with accompanying drawing 2-4, control flow of the present invention is elaborated.
Consult shown in Fig. 2, in the invention process, slave computer monitoring detailed process is as follows:
Step 201:FlexRay controller message receive interruption and wrong the interruption.The FlexRay controller is after the message or erroneous frame that monitor on bus, and with interruption form notice microcontroller, microcontroller can enter interrupt handling routine simultaneously.
Step 202: the monitor data that reads corresponding FlexRay controller.Microcontroller reads monitor data that corresponding FlexRay controller obtains to internal memory in interrupt service routine.
Step 203: judge that whether local buffer is full.Microcontroller judges whether current FlexRay monitoring bus buffering area is filled, if be filled, forwards step 204 to, forwards step 205 to if do not fill up.
Step 204: mistake is processed.In the situation that current FlexRay monitoring bus buffering area is full, the data in internal memory can not write buffering area, and current internal storage data will be dropped.
Step 205: data are saved to local internal memory.Microcontroller is saved to the data in internal memory in local buffering area.
Step 206: local internal storage data is committed to the USB module.Microcontroller is submitted to coupled USB module by the data in buffering area.
Step 207:USB module uploading data.HID equipment in the USB module is held the data upload in it to PC automatically.
Step 208: complete the HID transfer of data one time.
Consult shown in Fig. 3, in the invention process, details are as follows in the handling process of opening HID equipment for host computer:
Step 301: traversal detects HID equipment.After the monitoring program of host computer starts, traversal detects all HID equipment on computer.
Step 302: judge whether to detect the equipment that ID meets.After the equipment that meets USB supplier number and device numbering being detected, jump to step 303, the equipment met if do not detect, jump to step 304.
Step 303: open this HID equipment.The monitoring program of host computer attempts opening this HID equipment.
Step 304: display unit connecting state.The open mode that shows HID equipment.
Consult shown in Fig. 4, in the invention process, host computer carries out the flow process of data communication by the HID equipment class details are as follows:
Whether step 401: detecting slave computer has data.The data of uploading if necessary, jump to step 402, otherwise return.
Step 402: to the slave computer requests data reading.Initiate read request to slave computer, obtain the inner data of preserving of slave computer.
Step 403: process the data that read.After obtaining the data of slave computer, extract message and the erroneous frame monitored on the FlexRay bus.
Step 404: display monitoring information.On the monitoring interface of host computer, the information that display monitoring arrives.Step 405: complete a secondary data and show.

Claims (5)

1. the FlexRay monitoring bus system based on the USB-HID agreement, it comprises microcontroller, at least two FlexRay controllers, a USB module, it is characterized in that, microcontroller is connected with at least two FlexRay controllers, after the FlexRay controller listens to FlexRay message or erroneous frame on connected FlexRay bus, microcontroller reads in local internal memory by the data of monitoring, and the data in this internal memory are sent to the USB module, the USB module is connected to PC by the USB line, at PC, adopt the mode of HID equipment class to open USB device, and relevant read-write api function and slave computer carries out data interaction by application call HID equipment class, thereby realize the monitoring of FlexRay bus, comprise the preservation of monitored data, the demonstration of signal and the transmission-receiving function of message.
2. the FlexRay monitoring bus system based on the USB-HID agreement according to claim 1, is characterized in that, system comprises hardware circuit, program of lower computer and host computer procedure.
3. the FlexRay monitoring bus system based on the USB-HID agreement according to claim 2, is characterized in that, the hardware circuit of system is comprised of microcontroller, at least two FlexRay controllers, USB modules; Microcontroller is connected with at least two FlexRay controllers, and corresponding device reads in local internal memory by the data of monitoring, and the data in this internal memory are sent to the USB module listen to FlexRay message or erroneous frame on any FlexRay bus after.
4. the FlexRay monitoring bus system based on the USB-HID agreement according to claim 3, it is characterized in that, the USB module of system is connected to PC by the USB line, at PC, adopt the mode of HID equipment class to open USB device, and relevant read-write api function and slave computer carry out data interaction by application call HID equipment class.
5. the FlexRay monitoring bus system based on the USB-HID agreement according to claim 2, it is characterized in that, program of lower computer mode with the HID equipment class in the USB of hardware module is carried out device enumeration, and after enumeration succeeds, equipment can and automatically be held by the HID device drives and take over communication at Windows by PC identification; Host computer procedure is addressable slave computer by opening corresponding HID equipment, and this system makes at any Windows of being equipped with and on the computer of USB interface and all can use this equipment simultaneously, and does not need this is designed any driver.
CN201310355062XA 2013-08-14 2013-08-14 FlexRay bus monitoring method based on USB-HID protocol Pending CN103441912A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310355062XA CN103441912A (en) 2013-08-14 2013-08-14 FlexRay bus monitoring method based on USB-HID protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310355062XA CN103441912A (en) 2013-08-14 2013-08-14 FlexRay bus monitoring method based on USB-HID protocol

Publications (1)

Publication Number Publication Date
CN103441912A true CN103441912A (en) 2013-12-11

Family

ID=49695579

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310355062XA Pending CN103441912A (en) 2013-08-14 2013-08-14 FlexRay bus monitoring method based on USB-HID protocol

Country Status (1)

Country Link
CN (1) CN103441912A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107562676A (en) * 2017-09-15 2018-01-09 郑州众智科技股份有限公司 A kind of method communicated by USB and generator set controller based on VB.net

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101013406A (en) * 2007-02-12 2007-08-08 北京飞天诚信科技有限公司 Automatic-installable information safety equipment and control method thereof
CN101309193A (en) * 2008-06-13 2008-11-19 中国科学院电工研究所 USB-Flexray bus adapter based on micro-processor
CN101593164A (en) * 2009-07-13 2009-12-02 中国船舶重工集团公司第七○九研究所 Based on built-in Linux from USB HID device and firmware implementation method
US20110205903A1 (en) * 2010-02-23 2011-08-25 Fujitsu Limited Monitoring apparatus, method, and computer product

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101013406A (en) * 2007-02-12 2007-08-08 北京飞天诚信科技有限公司 Automatic-installable information safety equipment and control method thereof
CN101309193A (en) * 2008-06-13 2008-11-19 中国科学院电工研究所 USB-Flexray bus adapter based on micro-processor
CN101593164A (en) * 2009-07-13 2009-12-02 中国船舶重工集团公司第七○九研究所 Based on built-in Linux from USB HID device and firmware implementation method
US20110205903A1 (en) * 2010-02-23 2011-08-25 Fujitsu Limited Monitoring apparatus, method, and computer product

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107562676A (en) * 2017-09-15 2018-01-09 郑州众智科技股份有限公司 A kind of method communicated by USB and generator set controller based on VB.net
CN107562676B (en) * 2017-09-15 2020-10-09 郑州众智科技股份有限公司 Method for communicating with generator set controller through USB (universal serial bus) based on VB

Similar Documents

Publication Publication Date Title
CN100366029C (en) Communication controller, host-side controller, communication equipment, communication system and method
JP4886601B2 (en) Apparatus and method for operating USB interface equipment
CN102576339A (en) Multi-protocol storage device bridge
CN109558371B (en) Method for communicating with a microcontroller, and computing system
CN103178872B (en) Method and the device of USB system transfers distance is extended by Ethernet
CN101359309A (en) Status indication apparatus for hard disc of serial connection small computer system interface and method
CN103793307A (en) Electronic device, management method thereof and cabinet servo system
US9552279B2 (en) Data bus network interface module and method therefor
CN101996128A (en) Hard disk state indicator lamp control system
CN107592250B (en) Multi-rate self-adaptive test equipment based on aviation FC bus
CN105183575A (en) Processor fault diagnosis method, device and system
US20130254440A1 (en) Devices and methods for transmitting usb termination signals over extension media
CN104112413A (en) LED display screen dead pixel point inspection system
CN103019905A (en) Substrate managing controller and data processing method thereof
CN104484260B (en) Simulation monitoring circuit based on GJB289 bus interface SoC (system on a chip)
CN103440218A (en) CAN (Control Area Network) bus monitoring method based on USB-HID (Universal Serial Bus-Human Input Device) protocol
CN116582471B (en) PCIE equipment, PCIE data capturing system and server
CN104780123A (en) Network packet receiving and sending processing device and design method thereof
CN102215145A (en) Method and device for reporting detection result of link connected state
CN116578521A (en) Single-bus communication method, device, system and equipment
CN103441912A (en) FlexRay bus monitoring method based on USB-HID protocol
CN103888375A (en) Communication method based on ARINC 429, device thereof and expansion interface
CN103558813B (en) For recording recording method and the pen recorder of MVB networked physics layer Frame
US11334506B2 (en) Interface connection device, system and method thereof
CN114615106A (en) Ring data processing system, method and network equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20131211