CN100511164C - Method for using information of synchronous serial interface output and asynchronous serial port debugging on DSP - Google Patents

Method for using information of synchronous serial interface output and asynchronous serial port debugging on DSP Download PDF

Info

Publication number
CN100511164C
CN100511164C CNB2007101387435A CN200710138743A CN100511164C CN 100511164 C CN100511164 C CN 100511164C CN B2007101387435 A CNB2007101387435 A CN B2007101387435A CN 200710138743 A CN200710138743 A CN 200710138743A CN 100511164 C CN100511164 C CN 100511164C
Authority
CN
China
Prior art keywords
bit
serial port
asynchronous serial
uart
frame
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.)
Expired - Fee Related
Application number
CNB2007101387435A
Other languages
Chinese (zh)
Other versions
CN101131658A (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.)
ZTE Corp
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 CNB2007101387435A priority Critical patent/CN100511164C/en
Publication of CN101131658A publication Critical patent/CN101131658A/en
Application granted granted Critical
Publication of CN100511164C publication Critical patent/CN100511164C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Communication Control (AREA)

Abstract

This invention provides a kind of method of using the timing serial port to output the asynchronous serial port debug information on the DSP and constructs the asynchronous serial port data frame by using the structure corresponding relationship of the synchronous serial port and the asynchronous serial port data frame and the corresponding relationship of bit clock of the synchronous serial port and the baud rate of the asynchronous serial port; at the same time synchrony the frame of synchronous serial port on the DSP and logical operate the base pin which is used to deliver the data and extend the output values making it met the time sequence of the asynchronous serial port and output the asynchronous serial port debug information. Comparing with the present technology it overcomes the defect that there is no debug information output channel during the reality process for the DSP; it has the well reality and it can capture the abnormal station for the DSP and offer the trace of the location problem; the UART baud rate can be modified and it is convenience to the user.

Description

On DSP, utilize the method for information of synchronous serial interface output and asynchronous serial port debugging
Technical field
The present invention relates to utilize on the inherent DSP of digital signal processor application the method for information of synchronous serial interface output and asynchronous serial port debugging, relate more specifically to a kind ofly on the DSP that TI company produces, utilize synchronous serial interface McBsp (Multichannel Buffered Serial Port multichannel buffer serial line interface) to make up asynchronous serial port UART (Universal Asynchronous Receiver/Transmitter universal asynchronous receiving-transmitting serial ports), and with the method for its output Debugging message.
Background technology
In the performance history of DSP (Digital Singnal Processor digital signal processor) chip, the output of its Debugging message is a problem of making us paying close attention to always, particularly is even more important in reproduction and orientation problem.Can export Debugging message by the jtag mouth with emulator in early days what DSP developed, having arrived the commercialization stage can be exported by main frame by host interface for the Debugging message of Host-Slave----principal and subordinate machine pattern DSP, and for the mode that the Standalone----single cpu mode generally adopts daily record to preserve, just Debugging message is kept among the FLASH.This dual mode exists significant disadvantages: the former is subject to host interface, if the unusual Debugging message of this path then can't normally export; The latter is effective poor, and daily record needs to read with emulator afterwards.
Asynchronous serial port UART is the first-selections of many modern processors as Debugging message output with its convenient and swift flexible characteristic.In addition, the EDMA of DSP (Enhanced Direct Memory Access enhancement mode direct memory access) need not CPU and intervenes the work that gets final product after startup, even also be like this under the situation that DSP crashes.
So based on above-mentioned technical background, the present invention need realize asynchronous serial port UART operation by existing synchronous serial interface McBsp in dsp chip.
Summary of the invention
The technical problem to be solved in the present invention provides a kind of method of utilizing synchronous serial interface McBsp output and asynchronous serial port UART Debugging message on DSP.Pin and clock to McBsp are done some changes and configuration, thereby make its transmission time sequence that meets UART construct asynchronous serial port; Some key messages are concentrated print in the transmission buffer zone of McBsp, be responsible for UART (seeing outside the DSP) output that just makes up from McBsp by EDMA.
In order to address the above problem, the invention provides a kind of method of on DSP, utilizing information of synchronous serial interface output and asynchronous serial port debugging, utilize the structure corresponding relation of the Frame of synchronous serial interface and asynchronous serial port, and the corresponding relation of the baud rate of the bit clock of synchronous serial interface and asynchronous serial port, construct the asynchronous serial-port data frame; Simultaneously the frame synchronizing signal of the last synchronous serial interface of DSP and the Debugging message of transmission are carried out the logical and operation, and according to construct the asynchronous serial-port data frame to output Debugging message expand, make described Debugging message meet the asynchronous serial port sequential, output is based on the Debugging message of asynchronous serial port.
Further, method of the present invention is characterized in that, described synchronous serial interface comprises: McBsp; Described asynchronous serial port comprises: UART;
Further, method of the present invention is characterized in that, described synchronous serial interface McBsp data frame structure comprises: the McBsp synchronization frame of the low level frame synchronization of 1 bit and 6 to 12 bits, and the baud rate of its bit clock and UART is with frequently;
Further, method of the present invention is characterized in that, described asynchronous serial port UART data frame structure comprises: 1 bit start bit, 5 to 8 Bit data positions, the optional parity check bit of 1 bit, and 0.5 bit or 1 to 2 bit position of rest;
Further, method of the present invention is characterized in that, the structure corresponding relation of the Frame of described asynchronous serial port UART and synchronous serial interface McBsp comprises: the low level frame synchronization of 1 bit, the 1 bit start bit of corresponding UART; The McBsp synchronization frame of 6 to 12 bits, 5 to the 8 Bit data positions of corresponding UART, the optional parity check bit of 1 bit and 0.5 bit or 1 to 2 bit position of rest;
Further, method of the present invention is characterized in that, the corresponding relation of the baud rate of the bit clock of described synchronous serial interface McBsp and asynchronous serial port UART comprises: the same frequency of the baud rate of the bit clock of synchronous serial interface McBsp and asynchronous serial port UART;
Further, method of the present invention, it is characterized in that, described structure asynchronous serial-port data frame, comprise: according to above-mentioned with the structure corresponding relation of the Frame of relation and described two kinds of serial ports frequently, adopting broadening synchronous clock method, is original 8 times by the bit clock that improves synchronous serial interface McBsp, has obtained the frame synchronization with asynchronous serial port UART start bit same widths;
Further, method of the present invention is characterized in that, the bit clock of described synchronous serial interface McBsp is obtained by DSP major clock frequency division, and this moment, the width of frame synchronization was the wide multiple of serial data word;
Further, method of the present invention is characterized in that, described output valve is expanded, and comprising:
Add 0 data of 8 bits at the front end of output valve, the rear end adds 1 data of 8 bits.
Adopt the method for the invention, compared with prior art, overcome the drawback that does not have the Debugging message output channel in the DSP real process, reliable and stable debugging output channel is provided; Ageing property is good, can catch DSP and state when unusual occur, and the clue of orientation problem is provided; The UART baud rate can be changed, and is user-friendly to.
Description of drawings
Fig. 1 is the design diagram of Host-Slave pattern in the dsp system;
Fig. 2 is the design diagram of Standalone pattern in the dsp system;
Fig. 3 is the corresponding relation synoptic diagram of UART serial ports sequential and McBsp sequential;
Fig. 4 is the synoptic diagram of structure UART asynchronous serial port in the embodiment of the invention;
Fig. 5 is the synoptic diagram of data expansion process in the embodiment of the invention;
Fig. 6 utilizes synchronous serial interface McBsp structure asynchronous serial port UART to export the structural representation of Debugging message on DSP in the embodiment of the invention;
Fig. 7 is the workflow diagram of the embodiment of the invention shown in Figure 6.
Embodiment
The present invention is in order to solve the drawback that conventional solution exists, further set forth a kind of method of on DSP, utilizing synchronous serial interface McBsp output and asynchronous serial port UART Debugging message of the present invention by following specific embodiment, below embodiment is described in detail, but not as a limitation of the invention.
As shown in Figure 1, be the design diagram of Host-Slave pattern in the dsp system.Wherein 101 is the HOST chips that have network interface 103, and by Jtag 104 output Debugging message, commercialization post debugging information is responsible for output by host interface by HOST 101 at initial stage of development DSP 102.
As shown in Figure 2, be the design diagram of Standalone pattern in the dsp system.By Jtag 202 output Debugging message, commercialization post debugging information generally adopts the method for preserving daily record at initial stage of development DSP 201, and daily record is kept in the FLASH storage medium 203.
As shown in Figure 3, be the corresponding relation synoptic diagram of UART serial ports sequential and McBsp sequential.Wherein, the 301st, the sequential chart of UART serial ports, UART one frame data are made up of the position of rest (this example is 1bit) of the low level start bit of 1bit, 5~8bit data bit, the optional parity check bit of 1bit, 1~2bit high level;
302~304th, corresponding McBsp sequential, wherein 302 is bit clocks, frequently same with the baud rate of UART; The 303rd, frame synchronizing signal, low level 1bit is wide, high level n+2bit wide (n=5~8); 304 is frame McBsp data, and width is mbit (m=n+3).
As seen, complete frame UART data are made up of 1bit start bit, 5~8bit data bit, the optional parity check bit of 1bit, 1~2bit (desirable 0.5bit) position of rest.Such data frame structure can be interpreted as comprising the McBsp synchronization frame of 1bit low level frame synchronization (start bit), 6~12 data (data bit+parity check bit+position of rest) for McBsp, the baud rate of bit clock and UART is with frequently.
As shown in Figure 4, being the synoptic diagram of structure UART asynchronous serial port in the embodiment of the invention, is example with the UART of 1bit start bit, 8bit data bit, no parity position, 1bit position of rest.Wherein, the 401st, the pin configuration of the last McBsp of DSP goes up the frame synchronization of McBsp and carries out the logical and operation with the pin that sends data to DSP;
402 be in 401 through and obtain the UART signal that signal is promptly constructed behind the door;
Bit clock 403 is and the clock of URAT baud rate with frequency;
Bit clock 404 is obtained by the major clock frequency division of DSP and as the clock source of McBsp module, the frame synchronization width must guarantee this moment be the wide multiple of serial data word, and such as the wide data of 8bit, the frame synchronization width should be that 8bit is wide;
The 405th, meet the frame synchronization output of UART sequential, low level is effective;
The 406th, through expanded data, the data of the actual corresponding 1byte of each byte among byte0~byte7, each byte is complete 0 or is complete 1, adds 1 complete 0 byte before this 8byte, adds 1 complete 1 byte afterwards, to constitute the sequential of UART.
As shown in Figure 5, be the synoptic diagram of data expansion process in the embodiment of the invention. In H be example, the data of having demonstrated the expansion process of data and finally in buffer zone, having needed to store, the ASCII character of H is 0x48, corresponding binary number is 01001000b.Start bit that data after the expansion also need be expanded before depositing buffer zone in and position of rest.That is to say original character of every sign, need in buffer zone, distribute the storage space of 10byte.
As shown in Figure 6, be on DSP, to utilize synchronous serial interface McBsp structure asynchronous serial port UART to export the structural representation of Debugging message in the embodiment of the invention.Form by the DSP 501, level conversion device 502, connection PC and the DB9 cable of UART mouth, the display terminal PC 504 of Debugging message that utilize synchronous serial interface McBsp to make up UART.Each important information collection module is responsible for collecting the Debugging message that needs output in DSP 501, through delivering to the buffer zone of McBsp after the data expansion, is responsible for from the UART mouth output of constructing by EDMA; Before the input of PC serial ports, need through level conversion device 502, be the CMOS level conversion RS232 level; Be connected to DB9 stube cable 503 through the lead-in wire after the level conversion then; Deliver to the display terminal PC 504 of Debugging message at last.The input of the GPIO pin in 501 is read in when the DSP initialization as UART baud rate preset value, the relation such as the following table of the value of GPIO1~0 and UART baud rate and McBsp bit clock:
GPIO1~0 The UART baud rate The McBsp bit clock
00 9600 76800
01 19200 153600
10 38400 307200
11 115200 460800
In the last table, adopt the method for broadening synchronous clock, promptly improve the method for bit clock: bit clock rises to original 8 times; The data of original like this 1bit, needing broadening is 8bit, and 0 becomes 8bit0 (0x00), and 1 becomes 8bit1 (0xFF).From the DSP inboard, still be synchronous serial interface McBsp, and, be exactly the UART serial ports that transmitting terminal is with regard to 1 line in the DSP outside.
PC 504 also can send the order that changes baud rate to DSP 501 by the DB9 cable, in the hope of reaching the purpose of dynamic change baud rate.
As shown in Figure 7, be the workflow diagram of the embodiment of the invention shown in Figure 6.May further comprise the steps:
Step 601, DSP reads in the value of GPIO input pin earlier, calculates corresponding McBsp bit clock, frame synchronization frequency;
Step 602, according to the clock that calculates, frame synchronization frequency, configuration McBsp empties the transmission buffer zone, starts McBsp.UART mouth that DSP outside structure good on can only obtain have only start bit and position of rest, data bit complete empty signal owing to do not have information gathering to the transmission buffer zone this moment;
Step 603, DSP has a plurality of important information bleeding points and collects Debugging message in operational process, and these information comprise stack, important register etc.;
Step 604 after Debugging message process character stringization, the expansion assembly unit, is delivered to the transmission buffer zone.Buffer zone is because be regularly output, and Debugging message does not regularly write, so information output is not uniform.In the time interval that buffer zone switches,, can repeat to send the information in the buffer zone if there is not new Debugging message to write.Utilize this characteristic, can catch the state of DSP when unusual, the clue of orientation problem is provided;
In fact step 605, the Debugging message after assembly unit is good are exactly that the frame synchronizing signal that sends data and McBsp is carried out and operation by the good UART mouth output of structure;
Step 606, the output of UART mouth is delivered to the DB9 cable as level conversion;
Step 607, the DB9 cable send Debugging message PC to show, need the empty information some redundancies reject before demonstration.
Certainly; the present invention also can have other various embodiments; under the situation that does not deviate from spirit of the present invention and essence thereof; those of ordinary skill in the art can make various corresponding changes and distortion according to the present invention, but these corresponding changes and distortion all should belong to the protection domain of the appended claim of the present invention.

Claims (9)

1, a kind of method of on DSP, utilizing information of synchronous serial interface output and asynchronous serial port debugging, it is characterized in that, utilize the structure corresponding relation of the Frame of synchronous serial interface and asynchronous serial port, and the corresponding relation of the baud rate of the bit clock of synchronous serial interface and asynchronous serial port, construct the asynchronous serial-port data frame; Simultaneously the frame synchronizing signal of the last synchronous serial interface of DSP and the Debugging message of transmission are carried out the logical and operation, and according to construct the asynchronous serial-port data frame to output Debugging message expand, make described Debugging message meet the asynchronous serial port sequential, output is based on the Debugging message of asynchronous serial port.
2, the method for claim 1 is characterized in that, described synchronous serial interface comprises: McBsp; Described asynchronous serial port comprises: UART.
3, method as claimed in claim 2 is characterized in that, described synchronous serial interface McBsp data frame structure comprises:
The McBsp synchronization frame of the low level frame synchronization of 1 bit and 6 to 12 bits, the baud rate of its bit clock and UART is with frequently.
4, method as claimed in claim 3 is characterized in that, described asynchronous serial port UART data frame structure comprises:
1 bit start bit, 5 to 8 Bit data positions, the optional parity check bit of 1 bit, and 0.5 bit or 1 to 2 bit position of rest.
5, method as claimed in claim 4 is characterized in that, the structure corresponding relation of the Frame of described asynchronous serial port UART and synchronous serial interface McBsp comprises:
The low level frame synchronization of 1 bit, the 1 bit start bit of corresponding UART;
The McBsp synchronization frame of 6 to 12 bits, 5 to the 8 Bit data positions of corresponding UART, the optional parity check bit of 1 bit and 0.5 bit or 1 to 2 bit position of rest.
6, method as claimed in claim 5 is characterized in that, the corresponding relation of the baud rate of the bit clock of described synchronous serial interface McBsp and asynchronous serial port UART comprises:
The same frequency of the baud rate of the bit clock of synchronous serial interface McBsp and asynchronous serial port UART.
7, method as claimed in claim 6 is characterized in that, described structure asynchronous serial-port data frame comprises:
According to above-mentioned with the structure corresponding relation of the Frame of relation and described two kinds of serial ports frequently, adopt broadening synchronous clock method, bit clock by raising synchronous serial interface McBsp is original 8 times, has obtained the frame synchronization with asynchronous serial port UART start bit same widths.
8, method as claimed in claim 7 is characterized in that, the bit clock of described synchronous serial interface McBsp is obtained by DSP major clock frequency division, and this moment, the width of frame synchronization was the wide multiple of serial data word.
9, method as claimed in claim 2 is characterized in that, described output valve is expanded, and comprising:
Add 0 data of 8 bits at the front end of output valve, the rear end adds 1 data of 8 bits.
CNB2007101387435A 2007-08-13 2007-08-13 Method for using information of synchronous serial interface output and asynchronous serial port debugging on DSP Expired - Fee Related CN100511164C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2007101387435A CN100511164C (en) 2007-08-13 2007-08-13 Method for using information of synchronous serial interface output and asynchronous serial port debugging on DSP

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2007101387435A CN100511164C (en) 2007-08-13 2007-08-13 Method for using information of synchronous serial interface output and asynchronous serial port debugging on DSP

Publications (2)

Publication Number Publication Date
CN101131658A CN101131658A (en) 2008-02-27
CN100511164C true CN100511164C (en) 2009-07-08

Family

ID=39128932

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2007101387435A Expired - Fee Related CN100511164C (en) 2007-08-13 2007-08-13 Method for using information of synchronous serial interface output and asynchronous serial port debugging on DSP

Country Status (1)

Country Link
CN (1) CN100511164C (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102508757A (en) * 2011-11-02 2012-06-20 四川长虹电器股份有限公司 Serial port debugging realization method of Linux system
CN104572337B (en) * 2015-01-26 2018-07-10 中国航天科技集团公司第九研究院第七七一研究所 A kind of data transmission method of chip chamber
CN106528473B (en) * 2016-09-29 2019-04-12 北京奇艺世纪科技有限公司 A kind of universal asynchronous receiving-transmitting transmitter information output method and device
CN110888793A (en) * 2018-09-07 2020-03-17 上海寒武纪信息科技有限公司 On-chip code breakpoint debugging method, on-chip processor and chip breakpoint debugging system
CN109086208B (en) * 2018-08-06 2021-10-22 联想(北京)有限公司 Data processing method and system
CN111858450A (en) * 2020-07-23 2020-10-30 中国航空工业集团公司上海航空测控技术研究所 Asynchronous serial communication method based on DSP synchronous serial port

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
TMS320C6711DSP异步串行通信的研究与实现. 余健康,来五星,史铁林.机械与电子,第1期. 2006
TMS320C6711DSP异步串行通信的研究与实现. 余健康,来五星,史铁林.机械与电子,第1期. 2006 *

Also Published As

Publication number Publication date
CN101131658A (en) 2008-02-27

Similar Documents

Publication Publication Date Title
CN100511164C (en) Method for using information of synchronous serial interface output and asynchronous serial port debugging on DSP
CN101399654B (en) Serial communication method and apparatus
CN101102577B (en) Incremental synchronization method for data in tables of frontground and background database of wireless communication base station system
CN102163180B (en) I2C bus interface circuit module and control method thereof
CN104954096B (en) A kind of high-speed synchronous serial communication data transmission method of one master and multiple slaves
CN201917898U (en) Inter-integrated circuit (I2C) bus interface circuit module
CN102902646B (en) The loading method of board communication means and board, FPGA and system
CN102916776B (en) optical module parameter transmission method and device
CN108234264A (en) A kind of data packet forwarding method and device based on the extension of PCIe signaling interfaces
CN108595356A (en) A kind of hard disk backboard and method of compatible RSSD hard disks and NVMe hard disks
CN203643598U (en) Radar data recording device
JPS59501606A (en) Transmission of status reports of devices in digital transmission networks
CN103490995A (en) Message sending method and message sending device
CN100533335C (en) Method and circuit for data smapling of serial data source
CN115794701A (en) BMC chip and method of DMA function virtual serial port
CN105843768B (en) A kind of single line communication time-after-time programmable memory method for burn-recording and the burning device based on this method
CN103888211A (en) Method and device for data transmission between crossed chips
CN101931832B (en) Mapping method and device of optical channel data unit
CN204155611U (en) A kind of multichannel voice frequency merges digital recording circuit
CN1893477B (en) SCX card and CTI system adopting same
CN102647297A (en) Single-board performance warning management method and device
CN102290084B (en) Multimedia player supporting USB (universal serial bus) 3.0 transmission
CN201281852Y (en) Universal serial bus hubs
CN115210694A (en) Data transmission method and device
CN110012369A (en) A kind of FC sonet card

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090708

Termination date: 20160813

CF01 Termination of patent right due to non-payment of annual fee