The cycle detection method of HB6096 bus interface
Technical field
The present invention relates to a kind of embedded type bus interface and detect control technology, be particularly related to a kind of HB6096 bus interface cycle detection method for Aircraft electric system comprehensive warning equipment, be widely used in each airborne equipment of Aircraft electric system, the equipment of non-avionics system, avionics system is crosslinked by the HB6096 bus on the machine, transmits all kinds of flight control informations, atmosphere data information, Electromechanical Control information, warning information, status information and maintenance information etc.
Background technology
Along with the aircraft airborne functions of the equipments are more and more, complexity is more and more higher, the exchanges data amount is increasing, the discrete signal that in the past used is crosslinked can not to satisfy request for utilization, the crosslinked interface of all kinds of buses begins playing the part of more and more important effect, as: 1553B bus, HB6096 bus, IEEE1394 bus, CAN bus etc.The HB6096 bus interface is used widely in airborne equipment, for the exchanges data that realizes all kinds of airborne equipments and crosslinked.Cycle detection for the HB6096 bus becomes more and more important.
The functional block diagram of HB6096 bus transceiver (DEI1016, DEI0429 protocol chip) is seen Fig. 1.Described bus transceiver comprises two received code modules that are connected with host interface, a transmission coding module and a control register.Based on this functional block diagram, its testing process is as follows: write self check survey control word by " host interface " in " control register ", bus transceiver can automatic data with " transmission coding module " rear end be passed to two " received code module " front ends, one of them " received code module " input end has carried out complement arithmetic to data, so two " received code module " received data complements." the transmitting-receiving control signal " of processor by " host interface " reaches and compares after " data bus " reads, thereby judges the state of transceiver.
There are following two shortcomings in this detection:
The first, the communication data between " HB6096 accepts 0 " and " HB6096 accepts 1 " and the outside cross-linking apparatus can affect the certainly detection data of two " received code " modules, thereby affects normal self-checking detection process;
The second, self-checking detection process can't detect " send and drive ".
Summary of the invention
The object of the invention is to propose a kind of cycle detection method of HB6096 bus interface, by writing to DEI1016 from detecting order, control DEI1016 is connected to respectively two with output channel and accepts passage, two data complements of accepting passage, thus judge whether the HB6096 bus interface exists fault.
To achieve these goals, technical scheme of the present invention is as follows: a kind of cycle detection method of HB6096 bus interface, described HB6096 bus interface is connected with outside cross-linking apparatus, described HB6096 bus interface comprises bus transceiver, the transmission driver module that is connected with bus transceiver, described bus transceiver is connected with CPU by interface device, be provided with level switch module between described bus transceiver and the interface device, it is characterized in that between described bus transceiver and outside cross-linking apparatus, analog switch being set, the control end of described analog switch is connected with CPU by control line, the output terminal of described transmission driver module is connected with the feedback receiving end of analog switch, this detection method may further comprise the steps: A, the disconnection of control simulation switch is connected with outside cross-linking apparatus, survey control word by in bus transceiver, writing self check, the data that bus transceiver will send the coding module rear end are passed to the port of accepting of receipt decoding module, after CPU reads received data, compare with predetermined value, thus the state of judgement bus transceiver; B, by the control simulation switch connection, the bus transmitted signal that sends the driver module output terminal feedback receiving end by analog switch is fed back to bus transceiver, compare with predetermined value after process CPU receives, thereby judge the duty that sends driver module; C, control simulation switch connection are connected with outside cross-linking apparatus, and equipment enters normal operating conditions.
According to a particular embodiment of the invention, described bus transceiver is DEI1016, and described transmission driver module is DEI0429.
The present invention is in device power stage or cycle detection stage, disconnection is connected with outside cross-linking apparatus, thereby, improve bus transceiver and detected the reliability of the data, stability, simultaneously, the present invention has increased sending the detection of driver module, has overcome the shortcoming that DEI1016 can not detect sending driver module, has realized detecting from the full isl cycle that is input to output.The invention has the advantages that and improved the reliability that detects, comprehensive.
Description of drawings
Fig. 1 is bus transceiver protocol chip functional block diagram.
Fig. 2 is HB6096 bus interface cycle detection know-why block diagram.
Embodiment
By shown in Figure 2, the present invention is by externally arranging analog switch 3 between cross-linking apparatus 1 and the bus transceiver 2, thereby the bus receiving end of control bus transceiver disconnects with outside, on the other hand, the bus transmitted signal that sends driver module output is fed back to the receiving end of bus transceiver, realize sending the detection of driver module.
Described HB6096 bus interface comprises bus transceiver 2, the transmission driver module 4 that is connected with bus transceiver 2, and described bus transceiver 2 is connected with CPU by interface device, is provided with level switch module between described bus transceiver 2 and the interface device.Bus transceiver adopts the DEI1016 device, sends driver module and adopts BD429; Level switch module is realized the level conversion between bus transceiver and the interface device; Interface device is realized the data transmit-receive between accessing time sequence, interrupt control logic, interrupt mask and the CPU of control DEI1016 chip etc. by internal logic.CPU realizes bus data is received and dispatched control.Above-mentioned modules is prior art, does not repeat them here.
The present invention arranges analog switch 3 between bus transceiver 2 and outside cross-linking apparatus 1, the control end of described analog switch 3 is connected with CPU by control line, realizes the switching that analog switch is switched on and off by CPU.The output terminal of described transmission driver module is connected with the feedback receiving end of analog switch, the airborne equipment bus data input end of analog switch is connected with outside cross-linking apparatus, is provided with the first bus between the output terminal of analog switch and the bus transceiver and receives line and the second bus reception line.
This detection method may further comprise the steps: A, the disconnection of control simulation switch are connected with outside cross-linking apparatus, CPU surveys control word by write self check in the control register of bus transceiver, the data that bus transceiver will send the coding rear end are delivered to the port of accepting of receipt decoding module front end, after CPU reads received data, compare with predetermined value, thus the state of judgement bus transceiver; B, by the control simulation switch connection, the bus transmitted signal that sends the driver module output terminal feedback receiving end by analog switch is fed back to bus transceiver, compare with predetermined value after process CPU receives, thereby judge the duty that sends driver module; If above-mentioned two steps of C all are judged as normally, then being connected of control simulation switch connection and outside cross-linking apparatus, equipment enters normal operating conditions.Steps A, B are whether normal processes of judgment device hardware, as judgment device output believable foundation whether.If normal, equipment enters normal operation, if undesired, general its result that just do not accept and believe.
Analog switch is to adopt " single-pole double-throw (SPDT) " switch, namely, one end of switch is connected with outside cross-linking apparatus, the other end of switch is connected with the output terminal that sends driver module, the stiff end of switch is connected with bus transceiver, by default, switch is to link to each other with the interface of outside cross-linking apparatus, in the steps A, the switch disconnection is connected with outside cross-linking apparatus, be that switch mediates, be not connected with both sides, among the step B, switch is thrown to another side, make its output signal that will send driver module feed back to receiving terminal, step C is after detection is finished, and equipment is returned to default conditions.
When device power, acquiescence " analog switch " is in the "off" state with outside cross-linking apparatus, after " CPU " finishes and power on, HB6096 is carried out from detecting.In normal operating conditions, every 1s equipment is carried out a cycle from detecting.When detecting beginning, the line traffic control analog switch disconnects with outside cross-linking apparatus, and then two steps when powering on are tested, and after test was finished, control " analog switch " connection was connected with outside cross-linking apparatus, enters normal operating conditions.