================================================================== COMMCHEK.TXT Describes COMMCHEK.EXE, a Comm. Port Utility for UART type-checking and FIFO Disable/Enable. Program Version -15mar97- For Motorola Radio Service Software (RSS) Users 15mar97 Copyright 1996-1997, Motorola Inc. Radio Software Technology Ctr. LMPS, Ft. Lauderdale, FLA ================================================================== ================================================================== This information is intended to aid our RSS Users in understanding how the PC, DOS and the RSS work together to program and service Motorola Radio Products. No representation is made that this information is complete or accurate. Motorola expressly disclaims any liability for the accuracy or completeness of the information, or for damages resulting from the use or misuse of the information. Please refer to the manufacturer's documents for your particular system. Additional information on the use of PCs and DOS can be found in commonly-available DOS/PC references. Later versions of DOS (5.x and 6.x) include the "HELP [command]" command. Copyrights, Trademarks, and Service Marks for various companies and products mentioned below are the sole property of the manufacturers, and are hereby acknowledged as such. ================================================================== ================================================================== UART / FIFO DESCRIPTION COMMCHEK.EXE is a utility that reports on the type of Universal Asynchronous Receiver/Transmitter (UART) chips that are used on an IBM-compatible PC's Communications Ports (e.g. COM1), and if the UART has FIFO Buffering, reports on the state of the FIFO (ON/OFF). It also allows the user to DISABLE or ENABLE the FIFO (if present). The National Semiconductor (NS)16550/16C552 UARTs are functionally equivalent to the 8250, 8250-B, 8250A and 16450 UARTs, with the addition of 16-byte XMIT/RECV FIFO (First In, First Out) buffers. The FIFO buffers are used, in INTERRUPT mode, to reduce the overhead of large data blocks by reducing the number of interrupts required per each data byte. For example, the "trigger" level of the reciever's FIFO buffer can be set to 14, which means that 14 bytes of data will be stored before an interrupt is triggered for the application to get data from the FIFO buffer. In the NS8250/16450 UART (no FIFOs), an interrupt will be triggered for -each- byte of data. The protocols used by Motorola to communicate with the Radios are based on -small- data blocks, and -single- bytes of signalling such as ACK(nowledge) and NAK (Negative Acknowledge) for data block status. If the Operating System (DOS, Windows, Etc.) or another Application (e.g. Internet Access) has previously turned the FIFO on, our Radio Service Software (RSS) application will be expecting an interrupt for an ACK byte, the ACK byte will be -in- the FIFO buffer, but the RSS will -not- "see" the character because the interrupt is being suppressed until more characters arrive. This leads to "timeout" errors within the protocol; the RSS is waiting (until timeout occurs) for the single-byte interrupt that will never be given by the FIFO mechanism. The symptom would be repeated errors while trying to READ/WRITE the Radio Codeplug via the RIB box. To conserve power and chip count, many manufacturers are using custom-ICs to -emulate- the 16550/16C552 UART. Some emulations are variants, such as powering up with the FIFO enabled (a true 16550 powers up with FIFO -disabled-). Some manufacturers are supplying a utility program that allows the user to -disable- the FIFOs, for backwards compatibility. For example, COMPAQ supplies "COMFIFO.EXE" (c) for their "Contura Aero (c)" series, to correct the power-up variant mentioned above. ================================================================== COMMCHEK DESCRIPTION COMMCHEK is based, in part, on public-domain source code from the National Semiconductor Corporation. It can be used to report the type of UART used on Communications Ports 1-4 (COM1-COM4), and it will report on the FIFO state (ON/OFF) if the UART is a NS16550, NS16C552 or functional equivalent. It can also be used to turn any one, or all, port FIFOs OFF. COMMCHEK first scans the -4- Comm. Port addresses within the BIOS Device Data area (40:00 - 40:07). These addresses are set by the PC "POST" Startup routines and/or installation software for Comm. Port add-on cards. If the addresses are -NOT- present in the BIOS area, COMMCHEK will not recognize the UART as present/valid. See "ADDING COMM. PORT ADDRESSES TO BIOS" below. Another way to verify the addresses of Comm. Ports installed on your PC is to use the DOS "MODE" and/or "MSD" commands: e.g. C:>MODE COM1 e.g. C:>MSD If the Port is present, MODE will report status for it. If the Port is not present, MODE will respond with "illegal device name". MODE only accepts COM1 - COM4. MSD will display information about Comm. Ports whose addresses are in the BIOS Device Data Area. If a Port address is non-zero, COMMCHEK then performs the UART- Type test, to report what type UART is on the Port. If a FIFO is present, COMMCHEK will report if the FIFO is ON or OFF. COMMCHEK is executed with the following syntax: ------------------------------------------------------------------ COMMCHEK: 05aug96 --- Copyright Motorola, Inc. 1996 --- /h = HELP usage: COMMCHEK port | A | /h [ on | off ] port = port_num ( 1 - 4 ) -or- "A" = All Ports ( 1 - 4 ) -or- /h = HELP on = turn [ port | all ] FIFOs -ON- -or- off = turn [ port | all ] FIFOs -OFF- if [port_num] = 1 - 4, only -that- port turned on/off Port I/O Addresses are from BIOS/DOS Device Table 40:00-07. UART Types are Intel/National Semiconductor Part Numbers. FIFO STATUS reported -prior- to ON/OFF setting (-NONE- = Not Present). Successful UART Typing does -not- guaruntee operating compatibility ! CAUTION !! Type Test -may- DISCONNECT Comm. Port MOUSE until re-boot. ------------------------------------------------------------------ To report the FIFO status on Comm. Port 1 (only), use the following syntax; C:> commchek 1 To turn FIFOs off on all Comm. Ports, use the following syntax; C:> commchek a off Execute COMMCHEK prior to executing any RSS that exhibits READ or WRITE errors from/to the Radio, to disable the FIFOs. If the UART is NOT within the NS8250-NS16C552 series quoted above (or no UART is present on that port address), COMMCHEK reports "not a recognizable UART type." If this occurs, use the RSS "COMPUTER SETUP" menu to select another port. If COMMCHEK will not recognize your Comm. Port UART type, or the FIFO disable will not allow the RSS to execute properly, please consult your PC manufacturer's literature and/or THEIR Customer Service. Also, please consult the Motorola file DOS_INFO.DOC, now being distributed with many RSS products, and currently availble from LMPS Customer Resources RSS Support Team. !! CAUTION !! COMMCHEK -may- interfere with any mouse connected to a Comm. Port, until either PC reboot -or- until the mouse handler is re-initialized from the command line. Re-enabling the mouse through it's handler probably will not re-enable UART FIFOs. If your PC requires use of COMMCHEK for RSS execution, it is possible to place a call to invoke COMMCHEK in your DOS -AUTOEXEC.BAT- file. If you have a Comm. Port Mouse attached to your PC, it is also possible to (re-)invoke the Mouse handler in AUTOEXEC.BAT -after- COMMCHEK is called, to (re-)enable the Mouse after the UART-Type test. ================================================================== ADDING COMM. PORT ADDRESSES TO BIOS The Comm. Port(s) selected must have a valid address in the PC BIOS Device Data Area (40:00 - 40:07), or a status message "-NOT- PRESENT" is shown for that Port. If comm. ports are added to your PC, the proper Comm. Port I/O Addresses must be inserted into the PC BIOS Device Data Area, or COMMCHEK will not recognize that Port as "valid". The I/O Address is a two-byte value (bytes are -reversed- in memory). Most PC BIOS Start-Up routines will only scan and insert addresses for Comm. Ports 1 and 2. To add Comm. Ports 3 and 4, use the DOS "DEBUG" command, called in your AUTOEXEC.BAT file, and an ASCII text file of DEBUG commands in your C:\ directory (which you must create with a text-editor). This will allow DOS, Windows and COMMCHEK to "see" the new Comm. Port(s). Use DOS command "MSD" to confirm adresses of existing Comm. Ports, prior to installing new Comm. Ports. ------------------------- A) C:\AUTOEXEC.BAT file; ------------------------- rem *** call DEBUG w/Command File, set Comm. Port 3-4 Addresses debug