WiSnap User Manual 2.21 04112011-JF
Page
34
of
66
10.3 Wake on UART
When the module is in sleep mode, the UART itself is disabled. However, wake on UART can be
accomplished by connecting the SENSE pins to the RX data or CTS pin. (Using the appropriate
divider resistors mentioned above)
The WiSnap SuRFBoard has a built in resistor divider connecting SENSE 0 and SENSE 1 to RXD and
CTS respectively. This allows wake on RX and CTS using a 3.3V signal.
NOTE: Do not apply 3.3V directly to SENSE 0 and SENSE 1. Under no conditions should the
voltage on any sensor input exceed 1.2VDC. Permanent damage to the module will result.
NOTE:
On WiSnap SuRFBoard
rev 2
the resistor pack connecting RX and CTS signals is not correctly
connected to the sensors. To wake on UART RX place a jumper from pin 3 on the Evaluation board
header to pin 2 on the sensor header. To wake on UART CTS place a jumper from pin 10 on the
Evaluation board header to pin 3 on the sensor header.
To enable wake on RXD, use
set sys trig 1.
It should be noted that the first (or possibly multiple) byte sent into the module will likely be lost, so
the designer should take care to send a preamble byte to wake up the module before sending valid
data bytes. A better way to do this is to use the CTS input to wake the module, and wait until it is
ready to accept data. To enable this, use
set sys trig 2.
10.4 UART Receiver, RTS/CTS Hardware Flow Control
The UART receive buffer is approx. 1500 bytes, and at lower baudrates (less than 115K) the system
can psend data over TCP/IP without the need for flow control.
Depending on the frequency and quantity of data begin sent, the comm parameters will optimize Wi-
Fi performance by specifying when the system sends IP packets. To minimize latency and TCP/IP
overhead use the flush size or match character to send data in a single IP packet. In most cases you
will want to set the flush timer to a large number to avoid fragmentation. For high throughput cases
increase the UART baudrate, set the flush size to 1460 and flush timer to a large value so full IP
packets are sent.
You can control the packet forwarding 3 ways:
set comm match <value>
sets the value of the packet terminator. Each time the match
character is seen an IP packet will be sent. "set comm match 0xd" for example forwards once a
0xd hex character is seen.
set comm size <value>
sets the flush size, the size is the number of bytes received before
forwarding. Maximum value = 1460 bytes which is the size of a single Ethernet frame.
set comm time <value>
sets the flush timer, this is used to make sure that any partial data sitting
the RX buffer if no additional data is seen for “value” milliseconds. For example
set comm time
1000
would wait for 1 second after no data was sent.
When sending more than a few hundred thousand bytes in a single transaction you should enable
hardware flow control. Your hardware will need to actively monitor CTS.
Flow control is not enabled by default. Flow control is set using with the following command.