Siemens AC75 manual Serial Interface Flow Control, Software Flow Control XON/OFF Handshake

Models: AC75

1 569
Download 569 pages 6.58 Kb
Page 26
Image 26

AC75 AT Command Set

1.6 Serial Interface Flow Control

s

1.6Serial Interface Flow Control

Flow control is essential to prevent loss of data or avoid errors when, in a data or fax call, the sending device is transferring data faster than the receiving side is ready to accept. When the receiving buffer reaches its capacity, the receiving device should be capable to cause the sending device to pause until it catches up.

There are basically two approaches to regulate data flow: Software flow control and hardware flow control. The High Watermark (HWM) of the input/output buffer should be set to approximately 60% of the total buffer size, the Low Watermark (LWM) is recommended to be about 30%. The data flow should be stopped when the buffer capacity rises close to the High Watermark and resumed when it drops below the Low Watermark. The time required to cause stop and go results in a hysteresis between the High and Low Watermarks.

1.6.1Software Flow Control (XON/OFF Handshake)

Software flow control sends different characters to stop (XOFF, decimal 19) and resume (XON, decimal 17) data flow. The only advantage of software flow control is that three wires would be sufficient on the serial interface.

1.6.2Hardware Flow Control (RTS/CTS Handshake)

Hardware flow control sets or resets the RTS/CTS wires. This approach is faster and more reliable, and there- fore, the better choice. When the HWM is reached, CTS is set inactive. When the LWM is passed, CTS goes active again. To achieve smooth data flow,ensure that the RTS/CTS lines are present on your application plat- form.

Configuring hardware flow control

Hardware flow control must be set on both sides: with AT\Q3 or AT+IFC in the ME and an equivalent RTS/ CTS handshake option in the host application.

The default setting of the ME is AT\Q0 (no flow control) which must be altered to AT\Q3 (RTS/CTS hardware handshake on). The setting is stored volatile and must be restored each time after rebooting the ME.

AT\Q has no read command. To verify the current setting of AT\Q, simply check the settings of the active profile with AT&V.

Often, fax programs run an intialization procedure when started up. The intialization commonly includes enabling RTS/CTS hardware handshake, eliminating the need to set AT\Q3 once again. However, before set- ting up a CSD call, you are advised to check that RTS/CTS handshake is set.

Buffer design considerations

Each serial interface (ASC0 and ASC1) of the AC75 uses two buffers, one for the uplink and one for the down- link. Each buffer has a capacity of minimum 1024 bytes.

Uplink direction (where ME is receiving data from host application):

CTS control is based on the filling level of the ME's receive buffer. When the application detects that CTS is being deactivated it must instantly stop sending data to the ME's receive buffer. But still, after deactivation of CTS, the receive buffer of the ME can accept another 512 bytes.

Downlink direction (where ME is sending data to host application):

The transmit buffer of the ME can hold at least 1024 bytes. After deactivation of RTS the ME sends max. 2 more bytes and then stops transferring data to the application.

The maximum time RTS can be kept inactive without losing data is determined by the buffer size and the max- imum possible over-the-air data rate. In any case, the local data rate between DCE and DTE (AT+IPR) should be set to a value higher than the maximum possible over-the-air data rate.

Buffer size recommended for the host application:

Just like the ME, the host application should include send and receive buffers for each serial interface. To handle large amounts of data at high speed a buffer capacity of 1024 bytes is recommended. If the host appli- cation is designed mainly for one direction (uplink or downlink) a lower buffer size will do for the direction where less data is transferred.

In fact, the optimal size of the host application buffers is a matter of finding the balance between the amount

AC75_ATC_V01.002

Page 26 of 569

10/30/06

Confidential / Released

 

 

Page 26
Image 26
Siemens AC75 manual Serial Interface Flow Control, Software Flow Control XON/OFF Handshake