Connecting GA1000 and WA2000
The GA1000 is a Wi-Fi add-on module implementing 802.11b/g. The WA2000 is a Wi-Fi/BLE add-on module implementing 802.11a/b/g/n and BLE4.2.
Neither can function on their own and both require "external brains" in the form of a Tibbo programmable device. Under TiOS, Wi-Fi communications are managed by the wln. object. Bluetooth communications (only possible on the WA2000) are managed by the bt. object.
SPI interface
The 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)
The wln. object and bt. object directly control the CS, CLK, DI, and DO lines. Your application, however, must take care of the proper hardware reset for the GA1000 and WA2000. To reset the GA1000, set the RST line LOW, then HIGH. To reset the WA2000, set the RST line LOW, wait for 1ms, then set the line HIGH.
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 the Configuring Interface Lines topic of the wln. object's documentation for more information on the proper selection and configuration of general-purpose I/O (GPIO) lines on various devices (platforms).
Special Case — EM500
Fig. A shows the standard way of connecting the GA1000 to the EM500, which does not support the 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 the EM500's bidirectional GPIOs allow interconnecting DI and DO. The EM500 does not allow remapping of GA1000 lines, so the GPIO line assignment shown below cannot be changed.
Here is how to reset the GA1000 from the EM500:
- Set GPIO7 (CS) HIGH
- Set GPIO6 (CLK) LOW
- Set GPIO5 (CLK) HIGH
Special Case — EM510
Fig. B shows the standard way of connecting the WA2000 to the EM510, which does not support the GA1000. Again, you get away with using just three lines instead of five.
Here is how to reset the WA2000 from the EM510:
- Set GPIO7 (CS) LOW
- Set GPIO5 (DI/DO) HIGH
- Wait 1ms
- Set GPIO7 (CS) HIGH