Skip to content

Commit

Permalink
Updated architecture.
Browse files Browse the repository at this point in the history
  • Loading branch information
Frostie314159 committed May 5, 2024
1 parent 6754faa commit 80f9c87
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 19 deletions.
47 changes: 28 additions & 19 deletions src/Architecture.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,36 @@
# Architecture

## Hardware

### General
Wireless communications on the ESP32 chip are interfaced via an RF (Radio Frequency) [peripheral designed by Riviera-Waves](https://www.ceva-ip.com/press/espressif-licenses-and-deploys-ceva-bluetooth-in-esp32-iot-chip/) (now [Ceva-Waves](https://www.ceva-ip.com/)).

### Diagram
```mermaid
block-beta
columns 2
block:wifi["Wi-Fi"]:1
columns 1
wifimac["Wi-Fi MAC"]
wifibb["Wi-Fi Baseband"]
end
block:bt["Bluetooth"]:1
columns 1
btlc["Bluetooth Link Controller"]
btbb["Bluetooth Baseband"]
end
block:rf["Radio frequency"]:2
clkgen["Clock generator"]
switch["Switch"]
balun["Balun"]
rfrx["RF receiver"]
rftx["RF transmit"]
end
wifibb["Wi-Fi Baseband"]:1
btbb["Bluetooth Baseband"]:1
adcs["ADCs"]:1
dacs["DACs"]:1
rfsynth["RF Synthesizer"]:1
rfmixer["RF Mixer"]:1
balun["Balun"]:2
antenna["Antenna"]:2
```
**NOTE:** This diagram is an "educated" guess. If you know any better or seek someone to blame for incorrectness: [Frostie314159](https://github.com/Frostie314159).

Wireless communications on the ESP32 chip are interfaced via an RF (Radio Frequency) [peripheral designed by Riviera-Waves](https://www.ceva-ip.com/press/espressif-licenses-and-deploys-ceva-bluetooth-in-esp32-iot-chip/) (now [Ceva-Waves](https://www.ceva-ip.com/)).
### Description
The air interface on the ESP32 consists of two parts. The first is the RF frontend, which is in charge of everything analog. The second is the basebands, which implement the physical layer for WiFi and Bluetooth. Data is shared between these two, in the form of a digital quadrature signal.

#### Basebands
As previously stated, the basebands implement the PHY of WiFi and Bluetooth. Each baseband is it's own peripheral and is controlled individually.

#### RF Frontend
The RF frontend contains a balun, RF synthesizer, RF mixer, RF switch and an analog/digital frontend consisting of two ADCs and two DACs. The reason there are two is, that the ESP32 uses complex/IQ sampling. When a signal arrives from one of the basebands, it passes through the DACs and gets converted to an IQ signal, which then passes through the RF switch and enters the mixer, where it's converted to RF. For receiving it's the whole processes in reverse.
The purpose of the RF switch is to select between the TX and RX paths inside the chip. It can also be set to bridge TX and RX which is used for calibrating the IQ imbalance caused by manufacturing inaccuracies.

On top of that, software stacks for Wi-Fi, Bluetooth and others can be run.
## Software
The hardware on the ESP32 is controlled by proprietary blobs, which are interfaced with through a shallow API.
### WiFi
The WiFi peripheral on the ES32 is controlled by two FreeRTOS tasks, one of which handles the MAC and the other one the PHY. They interface with each other through a number of message queues, on top of which an `ioctl`-interface exists. Espressif chose a SoftMAC architecture for the ESP32, with only ACKing implemented in hardware.
1 change: 1 addition & 0 deletions src/Glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
| Short term | Meaning | Notes |
| -- | -- | -- |
| MAC | Medium Access Control | This is context dependent |
| PHY | Physical Layer | |
| RF | Radio frequency | |
| ISM Band | Industrial Scientific and Medical Band | The frequency band, in which WiFi, BT and IEEE 802.15.4 operate, is the 2.4GHz ISM BAND |
| WLAN | Wireless Local Area Network | This is defined in IEEE 802.11 |
Expand Down

0 comments on commit 80f9c87

Please sign in to comment.