# Patent

## Title
Performing diagnostics in a wireless system

## Abstract

In one embodiment, the present invention includes an apparatus for permitting diagnostic testing of a wireless device. The apparatus may include a first switch to route diagnostic information or acoustic information received from a processor of the device, a codec coupled to the first switch to code the routed diagnostic information or acoustic information, and a second switch coupled to the codec to route the coded diagnostic information to a first port of the wireless device and to route the coded acoustic information to the first port or a second port of the wireless device.

## Background
FIELD OF THE INVENTION
The present invention relates to mobile systems, and more particularly to diagnostic testing of mobile systems.
BACKGROUND
Many different types of mobile systems exist. Examples of such systems include cellular telephone handsets, personal digital assistants (PDAs), notebook personal computers (PCs), and the like. During the design and development of such systems, significant resources are spent to confirm that the design and its implementation operate satisfactorily, both in laboratory testing and in the field during normal operation.
With respect to cellular telephones, for example, certain design issues may lead to systemic errors or performance issues that cannot be resolved during design phases or analysis of development or other prototype systems. Instead, such issues often arise only in the context of production systems. As a result, the final round of test and validation for a cellular handset is a systemic problem. All of the components of the phone may meet their respective specifications, but the unit as a whole may fail to meet one or more performance criteria, for a number of reasons. Many of these integration problems are inherently systemic and cannot be reproduced on a reference design, a development platform, or another handset model. Instead, such problems are debugged “in vivo” on the given handset model, and in some cases a specific handset.
Effective system debugging requires some degree of visibility into the internal operation of the handset, which is limited on a production model. Typically, in vivo debugging of handsets is performed using an integrated test mode or a conventional trace facility. The integrated test mode typically provides limited diagnostic capabilities and only allows limited viewing of trace data on a display of the handset. Conventional trace facilities are typically accessed using a serial port of the handset, and the tracing is typically limited to analysis of data from an internal microcontroller unit (MCU). Such trace information does not provide any visibility into the physical layer (Layer 1 in the OSI communication model) or digital signal processor (DSP) data.
Instead, to obtain such data a handset manufacturer may sometimes modify a handset to provide greater visibility. However, such modifications are time consuming and are often ineffective. For example, these modifications can vary operation of a handset to conceal problems, and may destroy the handset. Certainly, these handsets cannot be sold after the modifications are made. Nor are they generally suitable for field-testing of specific phone issues.
Accordingly, improved diagnostics for mobile systems would aid and speed handset development and debugging.
SUMMARY OF THE INVENTION
In one embodiment, the present invention includes an apparatus for permitting diagnostic testing of a production wireless device without any modifications to the device. The apparatus includes a first switch to route diagnostic information or acoustic information received from a processor, a codec coupled to the first switch to code the routed diagnostic information or acoustic information, and a second switch coupled to the codec to route the coded diagnostic information to a first port and to route the coded acoustic information to the first port or a second port. By selecting the switches appropriately, diagnostic information from the processor (which may be a digital signal processor) can be manipulated into a form for transmission through the first port, which may be an external acoustic port of the wireless device.
Another embodiment may be realized in the form of a method for performing a diagnostic routine in a wireless device such as a handset. The method may include generating diagnostic information in the handset, providing the diagnostic information to an external acoustic port of the handset, and forwarding the diagnostic information to a data collection unit from the external acoustic port. The data collection unit may be a personal computer such as a notebook computer or other portable device to allow for field-testing under a variety of conditions and locations.
Still further, an embodiment may be implemented in a mobile device that includes a processor having a data port and a diagnostic port. The processor may be, for example, a digital signal processor. The mobile device may further include a first switch coupled to provide a path to the diagnostic port or the data port. Also, the mobile device may include multiple audio ports, including an internal audio port coupled to the first switch to communicate audio data with the processor and an external audio port coupled to the first switch to communicate diagnostic information between the processor and a data collector during a diagnostic procedure. The data collector may be coupled to the external audio port via an interface unit that performs protocol manipulations on the diagnostic information sent from the mobile device. The interface unit may also provide control signals from the data collector to the mobile device for use in the diagnostic procedure.



BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is a block diagram of a diagnostic setup for a handset in accordance with one embodiment of the present invention.
FIG. 2A is a block diagram of an integrated circuit in accordance with one embodiment of the present invention.
FIG. 2B is a block diagram of an integrated circuit in accordance with another embodiment of the present invention.
FIG. 3 is a block diagram of a system in accordance with one embodiment of the present invention.



DETAILED DESCRIPTION
In various embodiments of the present invention, a debug port of a wireless device is provided that may be used to inject control directives into and collect real-time trace data from the wireless device. Thus any production device including the port may be used for diagnostic purposes. As a result, phone issues occurring in a specific phone can be debugged using that phone itself. Furthermore, a diagnostic mode may be entered without modification of the handset, and without compromising handset operational modes and functions, as described below.
Virtually all cellular telephone handsets include a bidirectional acoustic port to which an external speaker and microphone can be attached. Embodiments of the invention “purloin” or co-opt this acoustic port for system debugging.
Referring now to FIG. 1, shown is a block diagram of a diagnostic setup for a handset in accordance with one embodiment of the present invention. As shown in FIG. 1, a handset 10, which may be a cellular phone such as a global system for mobile communications (GSM) handset, is coupled for diagnostic testing. Specifically, as shown in FIG. 1, a bidirectional acoustic port 11 of handset 10 is coupled to a diagnostic interface unit (DIU) 15 via a cable 12. Diagnostic trace data generated within handset 10 may be transmitted through acoustic port 11 to DIU 15. DIU 15 may receive the trace data and convert it to a standard data protocol. For example, in some embodiments DIU 15 may convert the trace data to a universal serial bus (USB) protocol or a recommended standard (e.g., RS-232) protocol. Then DIU 15 may forward the data to a data collection unit 20 via a cable 17. In other embodiments, an interface unit may be omitted, and the handset 10 may be coupled directly to data collection unit 20. In various embodiments, data collection unit 20 may be a personal computer such as a notebook computer. Data collection unit 20 may store the diagnostic information and also may display it on a display. In some embodiments the diagnostic information may be stored and then later accessed. In such manner, field tests can be performed and the data later analyzed.
Furthermore, using data collection unit 20, control directives may be forwarded through DIU 15 for use in controlling diagnostic testing of handset 10. Accordingly, DIU 15 may modulate the control directives and provide them to handset 10 via bidirectional acoustic port 11. These control directives may be passed to a digital signal processor (DSP) within handset 10 for execution of diagnostic routines. The diagnostic routines may include testing of lower level (e.g., physical) layers of the DSP. Thus data collection unit 20 may include one or more storage media including instructions to perform diagnostic testing on a handset in accordance with an embodiment of the present invention. Further, the instructions may control storage and access to diagnostic trace data in data collection unit 20.
Referring now to FIG. 2A, shown is a block diagram of an integrated circuit (IC) 100 in accordance with one embodiment of the present invention. IC 100 may be an ASIC adapted for use in a handset. More specifically, IC 100 may be a single chip integrated circuit that includes both radio frequency (RF) circuitry and baseband circuitry for use in a cellular phone or other wireless communication device.
As shown in FIG. 2A, IC 100 includes a DSP 110. DSP 110 may perform various baseband signal processing activities. These activities may include performing different algorithms to implement desired signal processing functions. As further shown in FIG. 2A, ASIC 100 includes a microcontroller unit (MCU) 140 and RF circuitry 150. MCU 140 may be adapted to execute control applications and handle other functions of ASIC 100. RF circuitry 150 may include transceiver circuitry to both receive and transmit RF signals and convert these signals to and from baseband levels. Accordingly, baseband signals from DSP 110 may be provided to RF circuitry 150 for transmission, and incoming RF signals received by RF circuitry 150 may be converted to baseband and provided to DSP 110 for further processing. While not shown in FIG. 2A, it is to be understood that ASIC 100 may include other components, functionality, ports, and the like.
As shown in FIG. 2A, DSP 110 may include a trace port driver 112 and a codec port driver 114. Trace port driver 112 may be used as a port to transmit and receive trace information during a diagnostic mode. Codec port driver 114 may be used to transmit and receive digital audio data during normal operation.
Still referring to FIG. 2A, trace port driver 112 is coupled to a voiceband modem 115. Modem 115 is used to modulate trace data in a format compatible with the remainder of IC 100. More specifically, modem 115 modulates the data to be compatible with a codec 120 in terms of bandwidth, circuit noise, and the like. In some embodiments, a CCITT standard acoustic modem (e.g., a V.94 modem) may be used. Alternately, a custom modem may be provided. In some embodiments such a custom modem may provide higher data rates, as the trace information does not traverse a telephone network. That is, in some embodiments an acoustic port may accommodate data rates roughly comparable to those of a serial port of the handset, for example, between approximately 50-60 kilobytes per second (kbps), although the scope of the present invention is not so limited.
During diagnostic modes, data from trace port driver 112 is modulated in modem 115 and is switched through a first switch S1 to a codec 120. This diagnostic mode is shown in FIG. 2A, in which switch S1 is selected to couple modem 115 to codec 120. Codec 120 may perform various encoding operations. Coded diagnostic information may then be switched through a second switch S2 to an external acoustic port 130 of IC 100. External acoustic port 130 may be a bidirectional port to both receive and transmit information. In turn, port 130 is coupled to external acoustic port 11 of handset 10, for example, via signal lines on a circuit board of the handset.
During normal operation, voice processing is performed in DSP 110 and digitized data from codec port driver 114 is coupled via switch S1 through codec 120 and switch S2 to either external acoustic port 130 or an internal acoustic port 135 of IC 100, based on whether an external speaker/microphone is present. As shown in FIG. 2A, acoustic ports 130 and 135 are bidirectional, providing output data in one direction (i.e., downlink to an external or internal speaker) and incoming information in the other direction (i.e., uplink via a microphone or other input). A plug detector may determine presence of a plug in external acoustic port 11. If a plug is present, the plug detector may route signals to and from an external speaker/microphone connected to external acoustic port 11. However, in various embodiments during a diagnostic mode, this plug detector may be disabled to force route a path from DSP 110 (and more specifically trace port driver 112) through external acoustic port 130 of ASIC 100 via switches S1 and S2. Thus, during a diagnostic mode the audio path may be force routed through the external acoustic audio port, and any mechanism present in the handset for detecting the presence of a plug within the external acoustic port may be disabled.
In other embodiments, additional functionality may be implemented within DSP 110. For example, a voiceband modem may be implemented in software (i.e., a soft modem) for execution within DSP 110. Referring now to FIG. 2B, shown is a block diagram of an integrated circuit 100b in accordance with another embodiment of the present invention. As shown in FIG. 2B, DSP 110b includes a voiceband modem 115b, in addition to a trace port driver 112b and a codec port driver 114b. Furthermore, DSP 110b includes a switch S1 to select between a path with trace port driver 112b or codec port driver 114b. In all other respects, IC 100b may correspond to IC 100 discussed above with regard to FIG. 2A.
Accordingly, to perform diagnostics the external acoustic port of a handset may be used. In some embodiments, an integrated test mode may be used to assign the external acoustic port for use in a diagnostic mode. However, other manners of allocating an external acoustic port to a diagnostic mode may be realized. When allocated to diagnostic service, the external acoustic port may remain in a diagnostic mode until one of several conditions occurs. In some embodiments, these conditions may include one of the following: (1) manual disabling of the diagnostic mode; (2) cycling of power on the handset; or (3) removing a power source from the handset (e.g., a battery).
While the types of diagnostic trace information may vary in different embodiments, in some embodiments the data may include information regarding operation of the DSP itself, along with physical layer data. Such data in the downlink direction may take various forms including, for example, log points, internal state data, and the like. Furthermore, diagnostic data to be captured may include low level data including, for example, I and Q data. Because such data may exist at higher bandwidths than may be accommodated via an external acoustic port, such data may be filtered and/or buffered, as described below. In the uplink direction, the connection from DIU 15 may carry control directives, which may take different forms. In some embodiments, the control directives may include, for example, enabling/disabling of specific trace points, querying of memory contents, modifying of internal states, and the like.
Trace data may be processed in various forms before it is sent in the downlink direction. For example, the trace data may be filtered and/or buffered. In such manner, trace data may conform to or match a speed of the link through bidirectional acoustic port 11. As discussed above, in some embodiments the link may have a speed of between approximately 50-60 kbps. To accommodate this speed, one or more buffers within DSP 110 may be used to store the trace data before it is sent through trace port driver 112. Furthermore, the trace data may be filtered. For example, only trace data that corresponds to a particular type of event (e.g., physical layer data, failure information or the like) may be sent. For example, code may be instrumented to generate trace data only for occurrences of certain events within the code.
By performing testing in accordance with an embodiment of the present invention, intermittent problems and/or problems that are hard to reproduce may be debugged. For example, issues relating to cell handover, dropping of calls and the like may be more readily debugged via field testing using a diagnostic setup in accordance with an embodiment of the present invention.
Because the external acoustic port is used for diagnostic purposes, the ability to listen to real audio during diagnostic modes may be precluded. However, while certain problems may manifest themselves as audio problems, the vast majority of problems are not in fact audio problems, but rather systemic issues, as described herein. Thus although real audio data may not be available during a diagnostic mode, successful debugging may occur.
Referring now to FIG. 3, shown is a block diagram of a system in accordance with one embodiment of the present invention. As shown in FIG. 3, system 300 may be a wireless device, such as a cellular telephone, PDA, portable computer or the like. An antenna 305 is present to receive and transmit RF signals. Antenna 305 may receive different bands of incoming RF signals using an antenna switch. For example, a quad-band receiver may be adapted to receive GSM communications, enhanced GSM (EGSM), digital cellular system (DCS) and personal communication system (PCS) signals, although the scope of the present invention is not so limited. In other embodiments, antenna 305 may be adapted for use in a general packet radio service (GPRS) device, a satellite tuner, or a wireless local area network (WLAN) device, for example.
Incoming RF signals are provided to a transceiver 310 which may be a single chip transceiver including both RF components and baseband components. Transceiver 310 may be formed using a complementary metal-oxide-semiconductor (CMOS) process, in some embodiments. As shown in FIG. 3, transceiver 310 includes an RF transceiver 312 and a baseband processor 314. RF transceiver 312 may include receive and transmit portions and may be adapted to provide frequency conversion between the RF spectrum and a baseband. Baseband signals are then provided to a baseband processor 314 for further processing.
In some embodiments, transceiver 310 may correspond to ASIC 100 of FIG. 2A. Accordingly, baseband processor 314, which may correspond to DSP 110 of FIG. 2A, may include a trace port driver and a codec port driver (not shown in FIG. 3). In turn, these ports may be coupled through the modem, codec and switches shown in FIG. 2A (not shown for ease of illustration in FIG. 3) to an external acoustic port 316 and an internal acoustic port 318. As shown in FIG. 3, external acoustic port 316 may be coupled to a bidirectional external acoustic port 311 of handset 300. Internal acoustic port 318 may be coupled to an internal speaker 360 to provide voice data to an end user. Internal acoustic port 318 also may be coupled to an internal microphone 370 to receive voice data from the end user.
After processing signals received from RF transceiver 312, baseband processor 314 may provide such signals to various locations within system 300 including, for example, an application processor 320 and a memory 330. Application processor 320 may be a microprocessor, such as a central processing unit (CPU) to control operation of system 300 and further handle processing of application programs, such as personal information management (PIM) programs, email programs, downloaded games, and the like. Memory 330 may include different memory components, such as a flash memory and a read only memory (ROM), although the scope of the present invention is not so limited. Additionally, a display 340 is shown coupled to application processor 320 to provide display of information associated with telephone calls and application programs, for example. Furthermore, a keypad 350 may be present in system 300 to receive user input.
While the present invention has been described with respect to a limited number of embodiments, those skilled in the art will appreciate numerous modifications and variations therefrom. It is intended that the appended claims cover all such modifications and variations as fall within the true spirit and scope of this present invention.

## Claims

1. A handset comprising:
a processor configured to perform a diagnostic routine for diagnostic testing of the handset wherein the diagnostic routine generates diagnostic trace information and processes acoustic trace information;
a first switch adapted to selectively route the diagnostic trace information or the acoustic trace information received from the processor of the handset, the diagnostic trace information generated in the processor and the acoustic trace information processed in the processor;
a codec coupled to the first switch to code the routed trace diagnostic information into coded diagnostic information or to code the routed acoustic trace information received from the processor into coded acoustic information; and
a second switch coupled to the codec to selectively route the coded diagnostic information to a bidirectional external acoustic port and to selectively route the coded acoustic information to the bidirectional external acoustic port wherein the bidirectional external acoustic port receives control information to cause the processor to generate the coded diagnostic information and wherein during diagnostic testing audio is forced through the bidirectional external acoustic port disabling real audio capabilities of the bidirectional external acoustic port.

2. The handset of claim 1, wherein the processor comprises a digital signal processor having a diagnostic port driver and an acoustic port driver.

3. The handset of claim 2, further comprising a modem coupled between the diagnostic port driver and the first switch to modulate the trace diagnostic information.

4. The handset of claim 3, further comprising a single integrated circuit including the first and second switches, the codec and the modem, and wherein the modem comprises a soft modem of the digital signal processor.

5. In a wireless handset, a method comprising:
generating diagnostic information in a digital signal processor (DSP) on a single integrated circuit in the wireless handset during a wireless handset diagnostic test, the diagnostic information comprising diagnostic trace information;
switching a first switch to route the diagnostic trace information to a modem, the first switch and the modem being on the single integrated circuit;
modulating the diagnostic trace information by the modem;
coding the modulated diagnostic trace information by a codec, the codec being on the single integrated circuit; and
selectively providing the modulated diagnostic trace information to an external acoustic port of the wireless handset, wherein during generation of diagnostic information real audio capabilities of the external acoustic port are disabled; and
forwarding the diagnostic information to a data collection unit directly from the external acoustic port.

6. The method of claim 5, further comprising transmitting control signals to the handset from the data collection unit, the control signals to initiate a diagnostic mode in the handset.

7. The method of claim 5, further comprising:
generating physical layer diagnostic information in the digital signal processor of the handset;
modulating and coding the physical layer diagnostic information; and
providing the modulated and coded physical layer diagnostic information to the external acoustic port.

8. The method of claim 5, further comprising buffering the diagnostic information in the handset.

9. A handset comprising:
an integrated circuit, the single integrated circuit comprising:
a processor comprising a digital signal processor having a diagnostic port driver and an acoustic port driver, the processor configured to perform a diagnostic routine for diagnostic testing of the handset wherein the diagnostic routine generates diagnostic trace information and processes acoustic trace information;
a first switch to route the diagnostic trace information or the acoustic trace information received from the processor of the handset, the diagnostic trace information generated in the processor and the acoustic trace information processed in the processor;
a modem coupled between the diagnostic port driver and the first switch to modulate the diagnostic information;
a codec coupled to the first switch to code the routed trace diagnostic information or acoustic trace information received from the processor into coded diagnostic information or coded acoustic trace information respectively; and
a second switch coupled to the codec to selectively route the coded diagnostic information to a bidirectional external acoustic port and to selectively route the coded acoustic information to the bidirectional external acoustic port wherein the bidirectional external acoustic port receives control information to cause the processor to generate the coded diagnostic information and wherein during diagnostic testing real audio capabilities of the bidirectional external acoustic port are disabled.

10. The handset of claim 9, wherein the diagnostic information comprises physical layer information obtained from the processor, the processor comprising a digital signal processor including the first switch.

11. The handset of claim 9, wherein the apparatus comprises an unmodified production cellular handset, and wherein the first port comprises an external acoustic port and the second port comprises an internal acoustic port.

12. A mobile device comprising:
an integrated circuit comprising:
a digital signal processor (DSP) to process audio communications adapted to perform a diagnostic routine to generate diagnostic information and process acoustic information for diagnostic testing of the mobile device, the DSP having a data port and a diagnostic port, the DSP including a first switch coupled to provide a path to the diagnostic port or the data port;
a modem coupled between the diagnostic port of the DSP and the first switch;
an internal audio port coupled to the first switch to communicate audio data with the DSP;
an external audio port coupled to the first switch to communicate diagnostic information between the DSP and a data collector during a diagnostic procedure and wherein during the diagnostic procedure an audio path is forced through the external audio port such that during the diagnostic procedure real audio capability of the external audio port is disabled; and
a second switch coupled between the first switch and the external audio port to provide a path between the modem and the data collector during the diagnostic procedure.

13. The mobile device of claim 12, wherein the external audio port comprises a bidirectional port adapted to provide control information from the data collector to the mobile device and adapted to provide the diagnostic information to the data collector.

14. A mobile communication handset comprising:
a processor adapted to comprise a diagnostic port driver and an acoustic port driver, the processor being configured to perform diagnostic testing of the mobile communication handset wherein the diagnostic testing generates diagnostic trace information, the processor being further configured to processes audio data information;
a first switch to route the diagnostic trace information or the audio data information received from the processor of the handset;
a modem coupled between the diagnostic port driver and the first switch, the modem adapted to modulate the diagnostic trace information;
a codec selectively coupled to the modem, the codec adapted to code the modulated diagnostic trace information or the audio data information into coded information;
a second switch coupled to the codec to selectively route the coded information to a bidirectional external acoustic port and a bidirectional internal acoustic port wherein the bidirectional external acoustic port is adapted to receive control information to cause the processor to generate the coded diagnostic information and wherein during diagnostic testing, coded diagnostic test information is forced through the bidirectional external acoustic port disabling real audio capabilities of the bidirectional external acoustic port;
wherein a single integrated circuit comprises the first and second switches, the codec and the modem.

15. The mobile communication handset of claim 14, wherein the processor is adapted to comprise the modem as a soft modem.

16. The mobile communication handset of claim 14, wherein the diagnostic trace information comprises acoustic trace information.

17. The mobile device of claim 16, further comprising a modem coupled between the diagnostic port of the DSP and the first switch.

18. The mobile device of claim 17, wherein the modem comprises a soft modem.

19. A mobile device comprising:
a digital signal processor (DSP) for processing acoustic information being further adapted to perform a diagnostic routine to generate diagnostic information for use in diagnostic testing of the mobile device, the DSP having a data port and a diagnostic port;
a first switch selectively coupled to the diagnostic port or the data port;
a modem adapted to be coupled between the diagnostic port of the DSP and the first switch;
an internal acoustic port adapted to coupled to the first switch to communicate audio data with the DSP;
an external acoustic port adapted to selectively couple to the first switch to communicate diagnostic information between the DSP and a data collector during a diagnostic procedure, wherein during the diagnostic procedure a real audio capability of the external audio port is disabled;
a second switch adapted to be selectively coupled between the first switch and the external acoustic port to provide a path between the diagnostic port and the data collector during the diagnostic procedure.

20. The mobile device of claim 19, wherein a single integrated circuit comprises the DSP, the first switch, the second switch and the modem.