Radio with error logging function

Abstract: This invention relates to a radio, such as a two-way radio having processing means for controlling operation thereof. Means are provided for detecting errors and storing error codes indicative of errors and sub-operations in which they have occurred. The errors can be read-out on a display, for example on separate diagnostic equipment.

Description: This invention relates to a radio, such as a two-way radio having processing means for controlling operation thereof. Summary of the prior art Mobile and portable radios are known which comprise a microprocessor under software control for controlling operation of the radio. It is a problem with existing radios that they sometimes cease operation completely because of software errors. International Patent Application No. WO86/03913 describes a radio system comprising a plurality of register modelled processors. Each element of the system, including the core processor, contains diagnostic drivers to test the integrity of the system. Diagnostic reporting is maintained through the control processor or "off-line" via specialized test equipment. This is often referred to as Service Mode. Prior art on-line error reporting is limited to displaying an error code on the control head at the time that an error occurs. It would be desirable to provide a radio which allowed continued operation even when one or more sub-operations thereof is errored. It would also be desirable to facilitate later diagnosis of errors. Summary of the Invention According to the present invention, there is provided a radio comprising: processing means for controlling operation of the radio by means of a plurality of sub-operations, a memory means for detecting errors and storing error codes in the memory indicative of errors and the sub-operations in which they have occurred, means for continuing operation of the radio after storing of one or more error codes (eg by means of sub-operations in which no significant error has occurred) and means for providing access to the error codes for read-out on a display. The sub-operations may be software sub routines (software programmes) or may be interactive operation of hardware devices under software control. Its preferred that the access to the error codes comprises means for connecting diagnostic apparatus to the radio, eg by means of a releasable connector, means for displaying the error codes when the diagnostic apparatus is connected to the radio, and means for prohibiting the display of the error codes when no diagnostic apparatus is connected to the radio. In this manner, the user is kept unaware of the fact that one or more errors has occurred and as far as the user is concerned there may be no apparent malfunction, depending of the nature of the error. For a more serious error, the user may merely notice that the radio sometimes restarts operation or that certain functions of the radio are inoperative. The error codes may indicate the nature of the error the sub-operation in which the error occurred and the line of the program code of which the error occurred, thereby facilitating servicing of the radio by a service engineer. The error codes are preferably stores in non-volatile EEPROM. This has the advantage that a history of error codes can build up over a long period of operation of the radio. The invention has the advantages of enabling rapid diagnosis, isolation and solution of software errors occurring during use of the radio by the user in its operational environment. Brief description of the drawing Figure 1 shows a block diagram of the control circuitry of a radio in accordance with the present invention. Detailed description of the preferred embodiment. Referring to Figure 1 there is shown a radio controller for a two-way way radio, particularly intended for use on a trunked radio system. The controller comprises a microprocessor 10, preferably of the type 68C11A8 manufactured by Motorola Inc. Connected to the microprocessor 10 is a 64K/EEPROM memory 11, and 8K RAM memory 12 and a first gatearray 13 for frame detection, and decoding of 1200 band FSK binary signals and input/output expand operations. The memories 11 & 12 are connected to the microprocessor 10 by data buses 15. Connected to the memories 11 & 12 via an address bus 16 is a second gatearray 17 for memory control, including sequential tone decoding and private line decoding. The gatearray 17 also performs an interface function between microprocessor 10 and the EEPROM and RAM by means of a memory expand circuit. A synchronous bus 18 connects the microprocessor 10 to a display 21 (with display driver) and keypad 19 via front module gatearray 20. The synchronous bus 18 also connects the microprocessor to an audio filter 22, a signalling filter (SFIC) 23, a synthesizer 24 and a prescaler 25. A loudspeaker 27 and a microphone 28 are connected to the audio filter 22 via audio power amplifier 29. The microprocessor 10 and audio filter 22 are connected to an RF interface 30. A digital voice privacy (dvp) circuit 32 is provided, connected to the microprocessor 10 the first gatearray 13, the audio filter and amplifier 22 & 29 and an asynchronous bus 33. The asynchronous bus 33 has a universal device connector (UDC) 34. Various controls (not shown) are provided, connected to the first gatearray 13. The controls include channel selectors, a push-to-talk (PTT) button and a private line enable/disable button. Programmed into the on-chip ROM of the microprocessor 10 (or provided in separate ROM memory) is an operating system of the type OS11 supplied by ENEA DATA. This operating system supports a number of parallel processes in the microprocessor. Examples of such processes are: timer process, audio process, display process, control radio process, self test process, keyboard process, digital voice processing. In the carrying out of the various processes, errors may occur. Errors can broadly be divided into two categories: warnings and fatal errors. When a process detects an error situation, but that error is not so severe that the process cannot continue, the error is categorised as a warning. The process logs a warning consisting of an error code (byte) and a process number (also a byte). This is done by invoking an error logging routine in the operating system. The error logging routine fetches the information about the process number from a global variable held and updated by the operating system. The bytes are logged and the operating system returns to the calling process. In the case of an error which is so severe that the process should not be allowed to continue, the same steps are taken, however no return is made to the calling process, but instead a hardware reset of the radio is performed. A sequence of warnings could give rise to a fatal error, in which case a hardware reset would be made. For example, where the sequence of warnings resulted from incorrect data and/or operation which would cause the radio to transmit on unauthorised frequencies. The hardware reset would prevent unauthorised transmissions. There follows a specific example of warning and of a fatal error that can be logged. Warning - at power on, the self test process among other things performs ROM and internal RAM tests on the 68HC11 microprocessor. The test involves creation of a check sum and comparison with an expected value. If an error occurs in the check sum, this is logged as a warning, but the application continues. (Of course, the fatal error may be logged later on as a result of the ROM or internal RAM check fail.) Fatal error - a part of the flash EEPROM 11 is reserved to a code plug (which may be considered "personality") this code plug describes how the software control of the radio is to work. If an error is detected in this code plug, a fatal error is logged. If the code plug error is connected to a specific use of the radio, the radio will still work after reset caused by the fatal error logging, provided that the radio is not used in the specific way that caused a fatal error. The process error codes are bytes divided into 5 groups: 1. OS11 detected fatal errors - 0-70 2. Generic fatal errors - 71-110 3. Generic warnings - 111-150 4. Process specific fatal errors - 151-200 5. Process specific warnings - 201-255 There follows two examples of generic error codes. There follows some examples of process specific error codes. These codes lie in the range 151 to 255. Every process can use these error codes. The meaning connected with the code being dependent on the process reporting it. Error codes and warning for control radio process: Error codes and warnings for signalling process: Error codes and warnings for display process: Error codes and warnings for audio-process: Error codes and warnings for self test-process: Error codes and warnings for keyboard-process: Error codes and warnings for dvp-process: Error codes and warnings for timer-process: The input parameter to the error logging routine is the same as the input parameter to the local function (perror) in each process. This code will, together with the identifier (the process identifier information is provided by OS11) of the calling process, be stored into one of the two buffers located in the EEPROM. These two buffers have both the size of 2 * 50 bytes. The first buffer is located from B72C to B78F and will contain fatal errors that will reset the radio. This is done by letting the error process go into an infinite loop, and then the reset is performed by software watchdog. The other buffer located from B790 to B7F3 will contain the less serious errors (warnings). After storing warnings a return to the calling process will be executed. If more than 50 errors are reported in any of the two categories, the errors from 51 and upwards are neglected. The pointers to the buffers are located respectively at B72A and B72B. These are two (one byte) offset pointers. They must point into the first free byte of their buffer. The contents of B72A and B72B will then be zero, before any errors are detected. The pointers can only be cleared by explicit writing into the EEPROM via service mode functions. It is a particular advantage of the present invention that the error codes are readily available to a service engineer. The service engineer merely has to connect diagnostic equipment to the universal data connector 34 and perform a read operation of the contents of the EEPROM 11 through the microprocessor 10. The service engineer contains a complete read out of the contents of the two buffers showing the error codes and the processors reporting them. These can be displayed on a screen or printed out. The error codes are not made available to the radio user on the display 18 so that the user need never know that there have been any errors,however, it would be a minor modification to provide a function which allowed this read-out on the display 18. As an alternative, some sort of a key (eg. connectable to the connector 34) could be provided to allow the service engineer to initiate a read-out of the error codes on the display 18. The above description has been given by way of example only and modification of detail can be made within the scope of the invention.

Claims: A radio comprising: processing means for controlling operation of the radio by means of a plurality of sub-operations, said sub-operations being either software sub-routines or interactive operation of hardware devices under software control, a memory, means for detecting errors and storing error codes in the memory indicative of errors and the sub-operations in which they have occurred, means for continuing operation of the radio by means of sub-operations in which no significant error has occurred and means for providing access to the error codes for read-out on a display. A radio according to claim 1, comprising means for connecting diagnostic apparatus to the radio, means for displaying the error codes when the diagnostic apparatus is connected to the radio and means for prohibiting display of the error codes when no diagnostic apparatus is connected to the radio. A radio according to claim 2, wherein the means for connecting comprises a releasable connector. A radio according to either of claims 1 and 2, wherein the memory is an electrically-erasable non-volatile read only memory. A method of operation of a radio comprising the steps of: carrying out operation of the radio by means of a plurality of functional sub-operations, said sub-operations being either software sub-routines or interactive operation of hardware devices under software control; storing an error code in memory indicative of a sub-operation that becomes non-functional and the error which has caused it to become non-functional; and continuing operation of the radio after storing of the error code by means of sub-operations where no significant error has occurred. A method according to claim 5, comprising the further step of initiating an error code read-out operation to provide access to error codes stored in the memory for display. A method according to claim 5, wherein the error read-out operation comprises connecting diagnostic apparatus to the radio, said apparatus having a display, reading the contents of the memory to the diagnostic apparatus and displaying the error code on the display thereof. A method according to claim 5 or 6, wherein the error code indicates, as well as the error and the sub-operation in which the error occurred, the line of program code at which the error occurred. A method according to any one of claims 5 to 8 wherein the display of error codes is prohibited without connection to diagnostic apparatus to the radio.

Inventors: JACOBSEN PETER CARL JOHAN, PLESNER KENNETH, JACOBSEN, PETER CARL JOHAN, PLESNER, KENNETH
Applicants: MOTOROLA AS, MOTOROLA A/S
Application year: 1990
Main classification: H04B1
IPC codes: H04B1