Skip to content
Drasko DRASKOVIC edited this page Mar 15, 2015 · 1 revision

HW Architecture

WeIO HW is mainly consisted of two parts:

  • Carambola2 module (AR9331 CPU + RAM + Flash + Antenna)
  • LPC11xx ARM Cortex-M0 MCU

Carambola2 module is released by 8Devices Litvanian company and is based on Atheros AR9331.

AR9331 is Linux-capable WiSoC (Wireless SoC, i.e. SoC with CPU and WiFi chip integrated on the same die), and it's manual is available on the Internet. Since it is used mainly for small home routers, it can be find in the big quantities at very low price. However, because of it's main purpose it is lacking many of the HW interfaces and busses that we would usually find in CPUs dedicated for industrial prototyping - like analog I/Os, PWM timers, etc. Even HW support for SPI and I2C is missing, so these have to be bit-banged on GPIO pins (which are by the way very limited in number).

To solve all these problems, WeIO adds an additional small and inexpensive microcontroller which serves as the GPIO expander, and gives us analog I/O, RT SPI and I2C and PWM timers.

LPC microcontroller is connected to Carambola2 Linux based processor internally via USB (actually TTY over USB) connection.

This subsystem (LPC MCU + it's FW) is called UPER, and FW can be found here: https://github.com/8devices/UPER

UPER is itself an RPC server, that gets the commands via USB from Carambola2 and executes them on it's pins, then eventually sends some return value back to Carambola2 (if any).

Command protocol sent from Carambola2 to UPER is called SPF, and more information can be found here: https://github.com/8devices/UPER/wiki

Good points for selecting this kind of approach are:

USB is fast LPC 11uxx series has ROM based USB stack which makes the system un-brickable, no need to take care about “noise” on Linux console UPER works seamlessly with many other platforms - PC, MAC, RPi, etc Since AR9331 has only one USB host, we had to add an additional USB HUB. In the beginning inexpensive AU6350 hub was selected, but it is not used anymore. Due to serious bug in Atheros AR9331 HW, described here: https://forum.openwrt.org/viewtopic.php?id=39956 we had to switch to more expensive, but reliable USB4640 from Microchip (manual can be found here: http://ww1.microchip.com/downloads/en/DeviceDoc/4640.pdf).

A convenience that came with USB HUB is a HW support for SD card (not all USB HUBS have this, but we choose one that has) - i.e. Carambola2 sees SD card behind the HUB as an ordinary USB storage.

A very good article by Paul Rathgeb explains the HW structure of WeIO system.