-
Notifications
You must be signed in to change notification settings - Fork 0
Hardware Architecture
The Awair Element contains three STM32 microcontrollers plus a separate Bluetooth module. Rewair replaces firmware only on the STM32F411 inside the EMW3165; both STM32F103s keep their stock firmware.
| Device | Role |
|---|---|
| STM32F103VET6 | Sensor-board controller. Reads the T6703 CO₂, GP2Y10 dust, QS-01 VOC, and SHT30 temperature/humidity sensors. This is the F103 that communicates with Rewair. |
| STM32F103RBT6 | Display-board controller. Drives the LED matrix; the luminance sensor is also located on this board. |
| STM32F411 in the MXCHIP EMW3165 | Runs Rewair, Broadcom Wi-Fi, the web UI/API, MQTT, OTA, and the bridges to the original hardware. |
| TI CC2540 in the Glead ZYM-BI201 | Provides Bluetooth through a transparent UART/GATT bridge. |
The EMW3165 also carries a Macronix MX25L1606E 2 MiB SPI flash used for WLAN assets, OTA staging, and rollback.
In the sections below, sensor-board F103 means the STM32F103VET6. The display-board STM32F103RBT6 is a separate controller and is not the endpoint of the Rewair USART2 link.
The F411 communicates with the STM32F103VET6 over USART2 at 115200 8N1 with RTS/CTS hardware flow control.
| F411 signal | Sensor F103 signal | Direction |
|---|---|---|
PA2 / USART2 TX |
PA3 / USART2 RX |
F411 → F103 |
PA3 / USART2 RX |
PA2 / USART2 TX |
F103 → F411 |
PA1 / USART2 RTS |
PA0 / USART2 CTS |
F411 → F103 |
PA0 / USART2 CTS |
PA1 / USART2 RTS |
F103 → F411 |
PB12 / sensor reset |
F103 reset | F411 → F103 |
RTS and CTS are active low. Rewair drives F411 PA1 low before releasing the
sensor controller from reset, then wiced_uart_init switches the pin to its
USART2 alternate function and keeps FLOW_CONTROL_CTS_RTS enabled. This makes
the F411 ready to receive before the F103 begins its boot-time UART traffic.
The frame format and command vocabulary are documented in UART Protocol.
The BI201 uses USART1 at 115200 8N1.
| F411 signal | BI201 function | Direction |
|---|---|---|
PB6 / USART1 TX |
UART RX | F411 → BI201 |
PA10 / USART1 RX |
UART TX | BI201 → F411 |
PB13 |
Module enable/reset control | F411 → BI201 |
This UART has no hardware flow control. The framed Rewair transport handles the BI201's limited buffering in software; see Bluetooth Transport.
The EMW3165 datasheet specifies this SPI1 connection:
| F411 signal | Flash function |
|---|---|
PA15 |
Chip select, software-controlled and active low |
PB3 / SPI1 SCK |
Clock |
PB4 / SPI1 MISO |
Flash → F411 data |
PA7 / SPI1 MOSI |
F411 → flash data |
PA15, PB3, and PB4 also carry full-JTAG functions. Normal debugging uses
SWD on PA13/PA14, so the SPI assignment does not conflict with the debug
probe.
For the external-flash address map, backup, and recovery procedures, see SPI Flash and Recovery.