CN100511171C - Test approach for debugging serial port function with single board and system thereof - Google Patents

Test approach for debugging serial port function with single board and system thereof Download PDF

Info

Publication number
CN100511171C
CN100511171C CNB2006100988774A CN200610098877A CN100511171C CN 100511171 C CN100511171 C CN 100511171C CN B2006100988774 A CNB2006100988774 A CN B2006100988774A CN 200610098877 A CN200610098877 A CN 200610098877A CN 100511171 C CN100511171 C CN 100511171C
Authority
CN
China
Prior art keywords
host computer
serial port
debug
serial ports
test
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.)
Active
Application number
CNB2006100988774A
Other languages
Chinese (zh)
Other versions
CN101110051A (en
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.)
State Grid Shanghai Electric Power Co Ltd
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CNB2006100988774A priority Critical patent/CN100511171C/en
Publication of CN101110051A publication Critical patent/CN101110051A/en
Application granted granted Critical
Publication of CN100511171C publication Critical patent/CN100511171C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The utility model discloses a testing method and a system to debug the serial port via the single board. The method comprises the procedures as below: connect the debug serial ports on the target single board with the serial ports on the upper computer via the cables; start up the upper computer and turn up the corresponding serial ports for configuration; start up the target single board and initialize the debug serial ports; the upper computer can transmit the character strings unidentified by the target single board to the lower computer via the debug serial ports; the upper computer can wait to receive. Within the preset time period, the upper computer can make the judgment upon whether the lower computer can return the corresponding character strings for analysis; if the character strings can return, the test is successfully done, if not, the test fails. The test results are displayed on the indication unit by the upper computer. The testing method and the system of the utility model have the advantages of higher automation, easy and reliable technology as well as lower testing cost, which are applicable to the functional test of the debug serial ports in the batch quantity.

Description

A kind of method of testing of debugging serial port function with single board and system thereof
Technical field
The present invention relates to a kind of communication test method and system thereof, in particular a kind of method of testing and system thereof to debug serial port.
Background technology
In embedded OS, debug serial port is often used as that watchdog routine is downloaded and debugging single board, especially when veneer or its place system break down, and the important means that debug serial port normally searches problem.At present, the debug serial port implementation of various CPU is comparative maturity all, and for example the SMCx mouth of the communication processor MPC82XX of the Motorola more widely that uses of communication field can be drawn as debug serial port and used now.
In the research and development design of Electronic Design and manufacturing enterprise, usually all debug serial port is drawn from the CPU mini system, when cpu system is debugged and veneer when producing in batches, need carry out functional test to debug serial port usually, be normal to guarantee its function.
In embedded OS, the Target Board that will contain tested debug serial port usually is called slave computer, and the main frame corresponding with it (computing machine) is called host computer.At present, test for debug serial port, a kind of the simplest method is exactly an observation, be connected to the debug serial port of tested veneer on the serial ports of host computer (computing machine) with the serial ports cable, host computer configures hyper terminal and opens, whether Board Power up has type information to export the sending function of verifying tested debug serial port by observing hyper terminal then; On hyper terminal, key in the executable order of veneer then and see whether veneer receives and carry out the receiving function of verifying tested debug serial port.
Though the method for above-mentioned prior art simply, is not suitable for the occasion that the debug serial port of automatic test and batch veneer need be tested.
Also having a kind of method is exactly that mode by programming realizes that host computer and the veneer that contains debug serial port all need to write test procedure, realizes test to the debug serial port of veneer by the mode of sending out packet mutually between the two.This method automaticity is higher, but needs tested single board and host computer all will write test procedure, implements comparatively complicated.
For example, number of patent application is the Chinese patent " serial communication tester " of 200420086064.x, the method that a kind of software and hardware entity is tested the serial ports in the common intelligent Application system is proposed, its core concept is to send data by tester CPU to tested serial ports, CPU gives liquid crystal display by RS232 bus reception data and shows, reaches test purpose by this method.But the deficiency that this patented claim exists is: need the additional firmware circuit, as main control module, communication module etc., test realizes comparatively complicated, secondly, also is not suitable in the production run debug serial port being carried out the batch functional test.
In sum, the method for testing of current debug serial port, a kind of is realize simple, but be not suitable for and produce in batch testing; A kind of is to realize complexity, needs to introduce complicated software and hardware system, realizes the cost height.Therefore, prior art has yet to be improved and developed.
Summary of the invention
The object of the present invention is to provide a kind of method of testing and system thereof of debugging serial port function with single board, in order to solve the defective of above-mentioned prior art, simple, the lower-cost method and system of functional test that are used for debug serial port is carried out the debug serial port of in batches functional test of a kind of technology are proposed.
Technical scheme of the present invention comprises:
A kind of method of testing of debugging serial port function with single board, it may further comprise the steps:
A: the serial ports of debug serial port on the Target Board and host computer is connected with the mutual butt joint of cable transmitting-receiving;
B: start host computer and open corresponding serial ports, it is configured;
C: Target Board starts and debug serial port is carried out initialization;
D: host computer sends the character string that Target Board can't be discerned by debug serial port to slave computer;
E: the host computer time-delay is waited for and being received;
F: in the schedule time, host computer judges whether to receive that slave computer returns corresponding analysis character string, if, then test successfully, otherwise, test crash;
G: host computer shows test result on indicating member.
A kind of test macro of debugging serial port function with single board, wherein, it comprises indicating member, one has the host computer and the 232 bus connection cables of serial ports, tested debug serial port; The described host computer that has serial ports links to each other with tested debug serial port by 232 bus cables, and described indicating member also is connected with the host computer that has serial ports; The described host computer that has serial ports is finished the test process of debugging serial port function with single board by 232 bus cables, and finally shows net result on indicating member.
Described system, wherein, when testing for a plurality of debug serial ports, described system also comprises 232 switch units and IO encoded control unit, is connected between described tested debug serial port and the 232 bus cables.
The method of testing of a kind of debugging serial port function with single board proposed by the invention and system thereof, compared with prior art, it realizes that automaticity is higher, and with respect to the mode and the Chinese patent " serial communication tester " that adopt the upper and lower computer programming, technology realizes simple and reliable, testing cost is low, is applicable to the occasion of debug serial port being carried out in batches functional test.
Description of drawings
Fig. 1 is the process flow diagram of method of testing proposed by the invention;
Fig. 2 is the structured flowchart of method of testing of the present invention to the test macro of single debug serial port;
Fig. 3 is the structured flowchart of method of testing of the present invention to the test macro of a plurality of debug serial ports.
Embodiment
Below in conjunction with accompanying drawing, with the present invention is described in further detail.
Debug serial port method of testing of the present invention only needs to write test procedure to host computer, and slave computer need not done any processing, and has the analytic function of pair input command to test when being to use the debug serial port of slave computer to make hyper terminal.
The function test method of debug serial port of the present invention mainly may further comprise the steps:
Step 1: the serial ports of debug serial port on the Target Board and host computer is connected with the mutual butt joint of cable transmitting-receiving;
Step 2: start host computer and open corresponding serial ports, it is configured;
Step 3: Target Board starts and debug serial port is carried out initialization;
Step 4: host computer sends the character string that Target Board can't be discerned by debug serial port to slave computer;
Step 5: the host computer time-delay is waited for and being received;
Step 6: in the schedule time, host computer judges whether to receive that slave computer returns corresponding analysis character string (for example " undefined symbol:+ specific character "), if, then test successfully, otherwise, test crash;
Step 7: host computer shows test result on indicating member.
The function test system of the debug serial port of the above-mentioned method of testing of realization of the present invention is if single debug serial port is tested, and it comprises: 1, one of indicating member has the host computer 2 and the 232 bus connection cables 3 of serial ports, and tested debug serial port is 4; The described host computer 2 that has a serial ports by 232 bus cables 3 and tested debug serial port be 4 link to each other, indicating member 1 also is connected with the host computer 2 that has serial ports; The described host computer 2 that has serial ports is finished the above-mentioned steps executable operations, and is finally shown net result on indicating member 1 by 232 bus cables 3.
Test for a plurality of debug serial ports: need on above basis, increase by 232 switch units 5 and IO encoded control unit 6.
Be method of testing process flow diagram proposed by the invention as shown in Figure 1, each step ultimate principle of method of testing proposed by the invention is described below:
The first step, with the serial ports of debug serial port on the Target Board and host computer with the cable transmitting-receiving mutually butt joint is connected, specifically can adopt unified 232 bus cables realization.
Second step, control start host computer and open corresponding serial ports, it are carried out necessary configuration, for example: bits per second: 9600; Data bit: 8; Parity checking: even parity check; Position of rest: 1; Data flow con-trol: hardware.
The 3rd step, Target Board start and debug serial port are carried out initialization.
The character string that the 4th step, host computer can't be discerned to slave computer transmission Target Board by debug serial port (for example specific character string+carriage return character "); the attention specific character string should be avoided the debug command that veneer carries, and promptly imports a veneer and can't discern the character string of execution (for example sending character string " abcde+ carriage return character ").
The 5th step, host computer time-delay are waited for and being received.
In the 6th step, the schedule time (deciding) on different CPU execution speeds, host computer judges whether to receive that slave computer returns corresponding analysis character string (for example " undefined symbol:abcde "), if, then test successfully, otherwise (if host computer does not receive that the corresponding analysis character string that slave computer returns or the analysis character string of returning are wrong), test crash.
The 7th step, host computer show test result on indicating member.
Be the test system structure block diagram of realizing method of testing of the present invention as shown in Figures 2 and 3.As shown in Figure 2: if the test of single debug serial port: its test macro comprises that 1, one of indicating member has the host computer 2 and the 232 bus connection cables 3 of serial ports, and tested debug serial port is 4; The described host computer 2 that has a serial ports by 232 bus cables 3 and tested debug serial port be 4 link to each other, indicating member 1 also is connected with the host computer 2 that has serial ports; The described host computer 2 that has serial ports is finished the described step executable operations of summary of the invention, and is finally shown net result on indicating member 1 by 232 bus cables 3.
As shown in Figure 3, if a plurality of debug serial ports are tested: need on the above basis of Fig. 2, increase by 232 switch units 5 and IO encoded control unit 6.Indicating member 1 is connected with the host computer 2 that has serial ports, simultaneously, the host computer 2 that has serial ports is connected with 232 switch units 5 by 232 bus cables 3,232 switch units 5 connect respectively with a plurality of tested debug serial ports 4, at last, the host computer 2 that has a serial ports is with after IO encoded control unit 6 is connected, and IO encoded control unit 6 is connected with 232 switch units 5 again.The host computer 2 that has serial ports comes gating 232 switch units 5 by control IO encoded control unit 6, and tested debug serial port is inserted test macro.According to the described step executable operations of summary of the invention, realize a plurality of debug serial ports are tested.
Wherein indicating member 1 is used to show final testing result, can be used for test starting and test result demonstration by test interface of software programming, be based on the test interface that visual automatic testing software platform VAT.net develops in one embodiment of the present of invention, the real-time demonstration of test process is to realize realizing alternately of DLL by test, shows to test successfully and the failure prompting on the interface.
The host computer 2 that has serial ports is used to send character string and reclaims the character string arbitration functions, and the available software programming realizes that the present invention realizes with VC++.232 bus cables 3 are used for host computer is connected with tested debug serial port, need be with the receiving end butt joint of the transmitting terminal of host computer with tested serial ports, the receiving end of host computer is with the butt joint of tested serial ports transmitting terminal, also need with tested serial ports altogether host computer, specifically can realize (only use wherein 3 lines, do not use for all the other 6) with twisted-pair feeder and DB9 plug.
If a plurality of (greater than 2) debug serial port is tested: because the serial port resource of host computer is limited generally with regard to 1~2, realize the debug serial port test more than 2, need on above basis, increase by 232 switch units 5 and IO encoded control unit 6,232 switch units 5 are used for switching selects one road tested debug serial port to receive host computer, IO encoded control unit 6 is used for control which selects receive host computer, it specifically is the debug serial port gating signal that the 6 output selections of PC control IO encoded control unit will be tested, 232 switch units 5 receive that the debug serial port that will test after the gating signal receives host computer, set up test access, just can realize a plurality of debug serial ports are tested according to the testing procedure of debug serial port then.
To sum up, the inventive method and system are very suitable for having the functional test of debug serial port in the Target Board of embedded OS, promptly do not need Target Board to write test procedure separately, do not need the extra too much hardware device of introducing again, and be simple, quick, practical.
Should be understood that above-mentioned description at specific embodiment is comparatively detailed, can not therefore think the restriction to scope of patent protection of the present invention, scope of patent protection of the present invention should be as the criterion with claims.

Claims (3)

1, a kind of method of testing of debugging serial port function with single board, it may further comprise the steps:
A: the serial ports of debug serial port on the veneer and host computer is connected with the mutual butt joint of cable transmitting-receiving;
B: start host computer and open corresponding serial ports, it is configured;
C: single board starting also carries out initialization to debug serial port;
D: host computer can't be discerned the character string of execution to the veneer transmitting single plate by debug serial port;
E: the host computer time-delay is waited for and being received;
F: in the schedule time, host computer judges whether to receive that veneer returns corresponding analysis character string, if, then test successfully, otherwise, test crash;
G: host computer shows test result on indicating member.
2, a kind of test macro of debugging serial port function with single board is characterized in that, it comprises indicating member, and one has the host computer and the RS-232 bus connection cable of serial ports, the tested debug serial port on the veneer; The described host computer that has serial ports links to each other with tested debug serial port by RS-232 bus connection cable, and described indicating member also is connected with the host computer that has serial ports; The described host computer that has serial ports is used for can't discerning to described tested debug serial port transmitting single plate by RS-232 bus connection cable the character string of execution, and judge whether in the given time to receive that veneer returns corresponding analysis character string, if, then test result success; Otherwise, the test result failure; Described indicating member is used to show described test result.
3, system according to claim 2, it is characterized in that, when testing for a plurality of debug serial ports, described system also comprises RS-232 switch unit and IO encoded control unit, is connected between described tested debug serial port and the RS-232 bus connection cable.
CNB2006100988774A 2006-07-17 2006-07-17 Test approach for debugging serial port function with single board and system thereof Active CN100511171C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2006100988774A CN100511171C (en) 2006-07-17 2006-07-17 Test approach for debugging serial port function with single board and system thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2006100988774A CN100511171C (en) 2006-07-17 2006-07-17 Test approach for debugging serial port function with single board and system thereof

Publications (2)

Publication Number Publication Date
CN101110051A CN101110051A (en) 2008-01-23
CN100511171C true CN100511171C (en) 2009-07-08

Family

ID=39042130

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2006100988774A Active CN100511171C (en) 2006-07-17 2006-07-17 Test approach for debugging serial port function with single board and system thereof

Country Status (1)

Country Link
CN (1) CN100511171C (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102193553A (en) * 2010-03-02 2011-09-21 珠海格力电器股份有限公司 Method, device and system for testing function of air conditioning controller
CN102957486B (en) * 2011-08-22 2015-05-06 北京佳讯飞鸿电气股份有限公司 Method for testing signal transmitting and receiving performance of DSP (digital signal processor)
CN102929277B (en) * 2012-11-22 2015-01-07 山东省科学院自动化研究所 Universal test tool for autobody electronic unit and working method thereof
CN104102568B (en) * 2014-06-26 2016-10-05 中国航天科工集团第三研究院第八三五七研究所 A kind of multiple serial communication test system
CN105471602A (en) * 2014-08-19 2016-04-06 中兴通讯股份有限公司 Serial port information transmission method, single board device and common-used single board
CN107872282A (en) * 2016-09-26 2018-04-03 上海数字电视国家工程研究中心有限公司 Receiver debugging apparatus
CN107872281A (en) * 2016-09-26 2018-04-03 上海数字电视国家工程研究中心有限公司 Receiver debugging apparatus
CN108614765B (en) * 2016-12-12 2021-07-16 中国航空工业集团公司西安航空计算技术研究所 Method for acquiring embedded software test data in target machine
CN109143277A (en) * 2017-11-02 2019-01-04 上海华测导航技术股份有限公司 A kind of GNSS receiver automatic software test method
CN111404779B (en) * 2020-03-12 2022-02-25 深圳市吉祥腾达科技有限公司 Method, device and system for testing role switching of router nodes
CN112019402A (en) * 2020-08-14 2020-12-01 浪潮(北京)电子信息产业有限公司 Multi-functional debugging device of intelligence network card
CN114089086B (en) * 2021-10-29 2024-05-14 深圳市康必达控制技术有限公司 Communication manager testing equipment and testing method thereof

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于MPC8260嵌入式系统的测试. 扈红超,杨梅越.微计算机信息,第22卷第02期. 2006
基于MPC8260嵌入式系统的测试. 扈红超,杨梅越.微计算机信息,第22卷第02期. 2006 *

Also Published As

Publication number Publication date
CN101110051A (en) 2008-01-23

Similar Documents

Publication Publication Date Title
CN100511171C (en) Test approach for debugging serial port function with single board and system thereof
CN102662835B (en) A kind of program debugging method for embedded system and embedded system
CN102214132B (en) Method and device for debugging Loongson central processing unit (CPU), south bridge chip and north bridge chip
CN107907814B (en) Method for improving mass production test efficiency of chips
CN206400286U (en) A kind of test system based on hardware in loop equipment
JPH10187477A (en) Test access port controller, and effective communicating method using the same
CN104483959A (en) Fault simulation and test system
CN103714029A (en) Novel two-line synchronous communication protocol and application
CN1952906A (en) Test system and method of serial port of host computer
CN101771700A (en) Modbus protocol communication node based on FPGA
CN102331546A (en) Device for detecting quality of multi-core cable based on wireless transmit-receive mode
WO2016184170A1 (en) Smi interface device debugging apparatus and method, and storage medium
CN111008102B (en) FPGA accelerator card high-speed interface SI test control device, system and method
CN1797488A (en) System and method for testing LCD unit
CN112486877B (en) Outfield guarantee and test platform of generalized FC conversion interface module
CN110943888B (en) Convenient full-function serial port detection method and device
US20230184831A1 (en) Server jtag component adaptive interconnection system and method
JP2024508592A (en) USB interface multiplexing method, circuit, electronic equipment and storage medium
CN113778796A (en) Method for monitoring serial port communication through USB
CN214669306U (en) Non-invasive load identification module detection device
CN103440218A (en) CAN (Control Area Network) bus monitoring method based on USB-HID (Universal Serial Bus-Human Input Device) protocol
CN102567161A (en) Notebook mainboard testing system and notebook mainboard testing method
CN114006631A (en) Cable testing device and method based on code pattern signal verification
CN101645804A (en) Veneer, communication system and method for detecting connection state of communication interface
CN112380096A (en) Serial port communication monitoring system method based on virtual serial port

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Owner name: GUANGDONG HUABO ENTERPRISE MANAGEMENT CONSULTING C

Free format text: FORMER OWNER: ZTE CORPORATION

Effective date: 20141008

C41 Transfer of patent application or patent right or utility model
COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 518057 SHENZHEN, GUANGDONG PROVINCE TO: 510640 GUANGZHOU, GUANGDONG PROVINCE

TR01 Transfer of patent right

Effective date of registration: 20141008

Address after: 510640 Guangdong city of Guangzhou province Tianhe District gold Yinglu No. 1 was 1106 room two

Patentee after: Guangdong Huabo Enterprise Management Consulting Co., Ltd.

Address before: 518057 Nanshan District high tech Industrial Park, Guangdong, South Road, science and technology, ZTE building, legal department

Patentee before: ZTE Corporation

ASS Succession or assignment of patent right

Owner name: STATE GRID SHANGHAI ELECTRIC POWER COMPANY

Free format text: FORMER OWNER: GUANGDONG HUABO ENTERPRISE MANAGEMENT CONSULTING CO., LTD.

Effective date: 20141127

C41 Transfer of patent application or patent right or utility model
COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 510640 GUANGZHOU, GUANGDONG PROVINCE TO: 200002 PUDONG NEW AREA, SHANGHAI

TR01 Transfer of patent right

Effective date of registration: 20141127

Address after: 200002 Shanghai City, Pudong New Area source deep road, No. 1122

Patentee after: State Grid Shanghai Municipal Electric Power Company

Address before: 510640 Guangdong city of Guangzhou province Tianhe District gold Yinglu No. 1 was 1106 room two

Patentee before: Guangdong Huabo Enterprise Management Consulting Co., Ltd.