From 3b98c1d8e52ebc26fcee069316218cd33c20c30e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20V=C3=A1zquez=20Blanco?= Date: Fri, 17 May 2024 21:17:34 +0200 Subject: [PATCH 1/2] Reorganize sections --- src/Architecture.md | 38 ++++++++++++++------------------------ src/Baseband.md | 12 ++++++++++++ src/Radio.md | 23 +++++++++++++++++++++++ src/SUMMARY.md | 2 ++ 4 files changed, 51 insertions(+), 24 deletions(-) create mode 100644 src/Baseband.md create mode 100644 src/Radio.md diff --git a/src/Architecture.md b/src/Architecture.md index 78e423c..8df17fe 100644 --- a/src/Architecture.md +++ b/src/Architecture.md @@ -1,36 +1,26 @@ # 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/)). +## Hardware -### Diagram ```mermaid -block-beta - columns 2 - 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 +flowchart TD + bb["Baseband (BB)"] + rf["Radio (RF)"] + bb <-- "I/Q Signals" --> rf ``` -**NOTE:** This diagram is an "educated" guess. If you know any better or seek someone to blame for incorrectness: [Frostie314159](https://github.com/Frostie314159). -### 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. +The above diagram is a simplified guess of the hardware structure of ESP32 wireless communication hardware. The air interface on the device consists conceptually of two main parts represented above. + +The first part is the RF (Radio) frontend, which is in charge of everything analog and the conversion from analog to digital and vice-versa. -#### Basebands -As previously stated, the basebands implement the PHY of WiFi and Bluetooth. Each baseband is it's own peripheral and is controlled individually. +The second part is the BB (Baseband), which implement the physical layer for WiFi and Bluetooth. + +Data is shared between these two, in the form of a digital I/Q signal (In-phase and Quadrature signal) samples. -#### 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. ## 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. + +The mentioned blobs include a complete proprietary RTOS used to manage different tasks and events. diff --git a/src/Baseband.md b/src/Baseband.md new file mode 100644 index 0000000..5fa1601 --- /dev/null +++ b/src/Baseband.md @@ -0,0 +1,12 @@ +# Baseband + +ESP32 basebands implement the PHY (Physical Layer) of WiFi and Bluetooth. Each baseband is it's own peripheral and is controlled individually. + + +## WiFi + +The WiFi peripheral on the ES32 is controlled by two FreeRTOS tasks, one of which handles the MAC (Medium Access Control) and the other one the PHY (Physical Layer). + +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. diff --git a/src/Radio.md b/src/Radio.md new file mode 100644 index 0000000..eb75c98 --- /dev/null +++ b/src/Radio.md @@ -0,0 +1,23 @@ +# Radio + +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/)). + +The diagram below ilustrates the main hardware components of the RF frontend of the chip. + +```mermaid +block-beta + columns 2 + iface<["I/Q Signal Interface "]>(up, down):2 + adcs["ADCs"]:1 + dacs["DACs"]:1 + rfsynth["RF Synthesizer"]:1 + rfmixer["RF Mixer"]:1 + balun["Balun"]:2 + antenna["Antenna"]:2 +``` + +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. diff --git a/src/SUMMARY.md b/src/SUMMARY.md index e87a6a3..8049267 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -2,4 +2,6 @@ - [Introduction](./Introduction.md) - [Architecture](./Architecture.md) + - [Radio](Radio.md) + - [Baseband](Baseband.md) - [Glossary](./Glossary.md) From 8cc6aef4c1a011469b419a444bede2f504239711 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20V=C3=A1zquez=20Blanco?= Date: Fri, 17 May 2024 22:12:33 +0200 Subject: [PATCH 2/2] Sort glossary alphabetically --- src/Architecture.md | 2 +- src/Baseband.md | 2 +- src/Glossary.md | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Architecture.md b/src/Architecture.md index 8df17fe..759b3df 100644 --- a/src/Architecture.md +++ b/src/Architecture.md @@ -23,4 +23,4 @@ Data is shared between these two, in the form of a digital I/Q signal (In-phase The hardware on the ESP32 is controlled by proprietary blobs, which are interfaced with through a shallow API. -The mentioned blobs include a complete proprietary RTOS used to manage different tasks and events. +The mentioned blobs range in complexity depending on the peripheral they control. WiFi baseband seems to be comprised from a couple of FreeRTOS tasks while Bluetooth baseband appears to include an scheduler, events, many tasks and message echange mechanisms. diff --git a/src/Baseband.md b/src/Baseband.md index 5fa1601..20fecfa 100644 --- a/src/Baseband.md +++ b/src/Baseband.md @@ -9,4 +9,4 @@ The WiFi peripheral on the ES32 is controlled by two FreeRTOS tasks, one of whic 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. +Espressif chose a mostly SoftMAC architecture for the ESP32, with ACKing and MAC address filtering implemented in hardware. diff --git a/src/Glossary.md b/src/Glossary.md index a7f880c..079abf4 100644 --- a/src/Glossary.md +++ b/src/Glossary.md @@ -2,11 +2,11 @@ | Short term | Meaning | Notes | | -- | -- | -- | +| BLE/BTLE | Bluetooth Low Energy | | +| BT | Bluetooth | | +| 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 | | 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 | | WiFi | Expensive certification for IEEE 802.11 compliance; No direct meaning | The WiFi Alliance specifies the different WiFi revisions like WiFi4-7, which are a subset of the IEEE 802.11 in the sense, that they specify which features are required and which are optional for certification. WLAN and WiFi can in practice be used interchangeably. | -| BT | Bluetooth | | -| BLE or BTLE | Bluetooth Low Energy | | +| WLAN | Wireless Local Area Network | This is defined in IEEE 802.11 |