Connecting GA1000 and WA2000

Top  Previous  Next

GA1000 is a Wi-Fi add-on module implementing 802.11b/g protocols. WA2000 is a Wi-Fi/BLE add-on module implementing 802.11a/b/g/n and BLE4.2 protocols. Both devices are documented in Programmable Hardware Manual). GA1000 and WA2000 cannot function on their own and require "external brains" in the form of one of programmable Tibbo devices. Under TiOS, Wi-Fi communications are managed by the wln. object. Bluetooth communications (only possible on the WA2000 module) are managed by the bt. object.

 

SPI interface

GA1000 and WA2000 communicate with Tibbo devices through an SPI interface. There are five control lines:

CS — SPI bus, chip select (active low);

CLK — SPI bus, clock;

DI — SPI bus, data in (must be connected to the module's DO);

DO — SPI bus, data out (must be connected to the module's DI);

RST — reset (active low).

 

note_tip-wt

On platforms with unidirectional GPIOs lines, do not forget to configure CS, CLK, DO, and RST as outputs. DI must be configured as input. The wln. object won't do this automatically.

 

See Configuring Interface Lines topic of the wln. object's manual for more information on the proper selection and configuration of GPIO lines on various devices (platforms).

 

Providing hardware reset

The wln. and bt. objects directly control CS, CLK, DI, and DO lines. Your application, however, must take care of the proper hardware reset for the GA1000 and WA2000. There are two methods for doing this:

Use a dedicated GPIO line to act as the RST line of the GA1000 (WA2000) interface. This arrangement is shown on Fig. A.

 

 

io.lineset(WLN_RST,LOW) 'apply reset (assuming that WLN_RST is a constant that defines which GPIO line is connected to the GA1000's RST)

io.lineset(WLN_RST,HIGH) 'remove reset

 

 

Use two NAND gates to combine the CS and CLK signals and produce the reset signal for the GA1000 (WA2000). This arrangement is shown on Fig. B. This approach takes advantage of the fact that during SPI communications, CLK line will never be LOW while the CS line is HIGH. The circuit shown on Fig. B generates a reset signal when CS = HIGH and CLK = LOW. This way you save one GPIO line of your programmable module. Here is the code that will reset the GA1000 (WA2000):

 

 

io.lineset(WLN_CS,HIGH) 'set the CS line HIGH

io.lineset(WLN_CLK,LOW) 'apply reset

io.lineset(WLN_CLK,HIGH) 'remove reset

 

 

 

ga1000_a

 

ga1000_b

 

Tibbo devices differ in whether the CS, CLK, DI, and DO lines are remappable. On devices with remappable lines, you can choose any set of GPIOs to control the GA1000 (WA2000). On devices where remapping isn't provided, you just have to use "prescribed" GPIO lines. For information on this, see Miscellaneous information section of your platform's documentation (for example, EM1000W's is here).

Note that even though TiOS allows remapping of the GA1000's (WA2000's) interface lines on many platforms, some Tibbo devices provide a socket for the Wi-Fi add-on. Meaning, the GPIO lines that control the GA1000 (WA2000) have already been chosen and implemented in hardware. For example, there is no flexibility in connecting the GA1000 to the DS1101 device. For it, and many other Tibbo products, your code just has to follow what already exists in hardware.

 

Special case — the EM500

Fig. C shows the recommended way of connecting the GA1000 to the EM500 module (the EM500 does not support WA2000). GPIO lines are a precious commodity on the EM500, as there are only eight of them available. You can get away with using only three lines to control the GA1000 (against the standard five lines). One line is saved by producing the reset out of CS and CLK. The second line is saved because EM500's bidirectional GPIOs allow interconnecting DI and DO. The EM500 does not allow remapping of GA1000 lines, so GPIO line assignment shown below cannot be changed.

 

ga1000_c