Silicon Laboratories SI2494/39 Compiler Option Dot Commands, Modem Operation, Making a Connection

Models: SI2493/57/34/15/04 SI2494/39

1 304
Download 304 pages 21.65 Kb
Page 299
Image 299

AN93

The infinite loop has two functions depending on the use of interrupts or polling for modem communication:

1.In interrupt mode, the TXE (modem) and TI0 (UART) interrupts are always jump-started by making periodic calls to modemCommunicationUpdate() and to UARTCommunicationUpdate(), respectively. The calls are necessary only to jump-start the modem and UART transmit interrupts. A system that is aware of the transmit activity for both the modem and the UART can reduce the number of calls, thereby freeing MCU bandwidth for other tasks.

2.In polling mode, only TI0 (UART) interrupts need jump-starting using periodic calls to

UARTCommunicationUpdate(), and repeated calls to modemCommunicationUpdate() are necessary to poll the modem's HIR1 and determine the status of the transmit and receive FIFOs. An obvious limitation of the polling method is the need to constantly poll the modem for a change of FIFO state, which uses up MCU bandwidth.

Compiler Option: Dot Commands

To include diagnostic (dot command) functions, define DIAGNOSTICS by removing the comment slashes (//) at the appropriate line in the modem_80C51.h header file, and include the files dot_command_loop.c and test_code.c in the project build. Contact Silicon Labs for more details on diagnostic commands.

Modem Operation

Initialization

After reset, the ISOmodem does not by default have all the required features enabled. When using the parallel or SPI mode, Silicon Labs recommends the following initialization steps:

1.Push the command AT:U70,8F00 followed by carriage return into the transmit buffer. The setting of U70 can vary, but it is recommended that bit 15 (HES) be set to enable escape.

2.Monitor the receive buffer for OK, indicating that the command was successful.

3.If a firmware upgrade needs to be programmed into the part, push the upgrade into the transmit buffer one line at a time. The OK prompt must be received after each line.

4.Once the patch is written to the ISOmodem, other commands can be pushed into the transmit buffer.

5.If software interrupts are required, enable them by calling:

setControl( SiINTM, ENABLE, NOW ).

Silicon Labs also recommends the use of any firmware upgrade (provided by Silicon Labs) if called for in the errata for that revision. Firmware upgrades address known problems with a given revision.

Making a Connection

Making a connection in parallel or SPI mode is no different than in UART mode. The application layer should keep track of whether the ISOmodem is in command mode or data mode to determine whether to send an escape before sending commands. The steps for making a connection are as follows:

1.Clear the HIR1 ESC bit by calling setControl( SiESC, DISABLE, NOW ).

2.Push the dial string into the transmit buffer, and begin monitoring for the CONNECT response.

3.The ISOmodem is now in data mode when the connect/protocol response is received.

4.The application layer can begin pushing data to the modem for transmission over the phone line. Received data will accumulate in the receive buffer as a result of polling or interrupts.

Data Bursts

The ISOmodem has internal buffering of approximately one kilobyte in each of the receive and transmit directions. The modem attempts to empty and fill these buffers as quickly as possible. This results in transmit and receive data bursts at a much faster rate than the modem connection. The receive bursts are limited by the V.42 frame size and the V.42bis data compression ratio. The higher the compression ratio, the longer the burst will be. The transmit bursts can be as large as one kilobyte when transmission first begins. Once the buffer is full, the transmit bursts are also limited by the V.42 frame size and compression ratio.

Rev. 1.3

299

Page 299
Image 299
Silicon Laboratories SI2494/39 manual Compiler Option Dot Commands, Modem Operation, Making a Connection, Data Bursts