A kind of CAN bus data link layer method of testing
Technical field
The present invention relates to the method for a kind of CAN of being used for (Controller Area Network controller local area network) bus data link layer test, this method is used for checking tested CAN bus data link layer whether to satisfy the coherence request of CAN agreement.
Background technology
The CAN bus is because its high-performance and reliability are widely used in aspects such as industrial automation, boats and ships, Medical Devices.Especially at vehicle electric field, the CAN bus often is used as in the power system network directly related with safety, owing to exist subjective factor for understanding by the described CAN agreement of natural language, therefore, particularly important for the testing protocol consistency checking work of CAN bus data link layer.In order to check CAN bus data link layer whether to satisfy the coherence request of CAN agreement, need to propose a kind of CAN bus data link layer method of testing.
Summary of the invention
In order to check CAN bus data link layer whether to satisfy the requirement of CAN protocol conformance, the present invention proposes a kind of collaborative method of testing of CAN bus data link layer method of testing, on concrete enforcement, realize by direct test to the CAN controller of tested CAN bus for the test of tested CAN bus data link layer.This method directly utilizes logic analyser to be electrically connected with tested CAN controller RX, TX pin in the tested CAN bus, waveform generator is electrically connected with tested CAN controller TX pin, logic analyser, waveform generator and its host computer of controlling, analyzing constituted tester down, comprising in the test module of tested CAN controller part except tested CAN controller constitutes and goes up tester, by the collaborative work of last tester and following tester, check tested CAN bus data link layer whether to satisfy the coherence request of CAN agreement.
Description of drawings
A kind of CAN bus data of Fig. 1 link layer test principle figure
Embodiment
The present invention---a kind of CAN bus data link layer method of testing realizes by the direct test to the CAN controller of tested CAN bus on concrete enforcement for the test of tested CAN bus data link layer.This method of testing directly utilizes logic analyser to be electrically connected with tested CAN controller RX, TX pin in the tested CAN bus, waveform generator is electrically connected with tested CAN controller TX pin, logic analyser, waveform generator and its host computer of controlling, analyzing constituted tester down, comprising in the test module of tested CAN controller part except tested CAN controller constitutes and goes up tester, by the collaborative work of last tester and following tester, check tested CAN bus data link layer whether to satisfy the coherence request of CAN agreement.Make up a kind of as shown in Figure 1 CAN bus data link layer test macro according to this method.
Among the figure, the direct and last tester interactive information of the tested CAN controller in the test module, its RX and TX two pins are connected to the logic analysis instrument probe, and the Rx pin is electrically connected with the output terminal of waveform generator.Between taking place, host computer, logic analyser and waveform can carry out the mutual of relevant information.Host computer carries out information interaction with last tester simultaneously.The trigger pip output of logic analyser is electrically connected to the trigger pip input of waveform generator.
In the test, host computer is sent to logic analyser, waveform generator and test module with test case and related command, burst on logic analyser monitoring TX and RX two signal wires, thus and whether satisfy trigger condition triggering waveform generator according to the signal determining on the TX signal wire and export desired cycle tests to the RX signal wire.Whole signals of TX and RX all will give record by logic analyser, and send back host computer, host computer compares, analyzes by information and the last tester biography tested CAN controller information together that following tester is passed back, draws the result whether tested CAN bus data link layer satisfies the CAN testing protocol consistency.