Skip to content

Commit 634e512

Browse files
committed
Merge branch 'feature/esp32c5_eco2_sdio' into 'main'
feature(esp32c5_eco2_sdio) Added ESP32-C5 SDIO support See merge request app-frameworks/esp_hosted_mcu!54
2 parents 22c924e + 8165d0e commit 634e512

File tree

5 files changed

+59
-21
lines changed

5 files changed

+59
-21
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ Legends:
149149
- Bluetooth uses dedicated platform, UART and Wi-Fi uses any other base transport
150150
- In other platforms, Bluetooth and Wi-Fi re-use same platform and hence use less GPIOs and less complicated
151151
- This transport combination allows Bluetooth to use dedicated uart transportt with additional 2 or 4 depending on hardware flow control.
152-
- (S) : Sheild box reading
152+
- (S) : Shield box reading
153153
- (O) : Over the air reading
154154
- TBD : To be determined
155155
- iperf : iperf2 with test resukts in mbps
@@ -163,8 +163,8 @@ Legends:
163163
| Standard SPI | FD | 6 | jumper or PCB | Any_Slave | udp: 24 tcp: 22 | udp: 25 tcp: 22| Simplest solution for quick test |
164164
| Dual SPI | HD | 5 | jumper or PCB | Any_Slave [1] | udp: 32 tcp: 26 (O) | udp: 33 tcp: 25 (O) | Better throughput, but half duplex |
165165
| Quad SPI | HD | 7 | PCB only | Any_Slave [1] | udp: 41 tcp: 29 (O) | udp: 42 tcp: 28 (O) | Due to signal integrity, PCB is mandatory |
166-
| SDIO 1-Bit | HD | 4 | jumper or PCB | ESP32, ESP32-C6 | TBD | TBD | Stepping stone for PCB based SDIO 4-bit |
167-
| SDIO 4-Bit | HD | 6 | PCB only | ESP32, ESP32-C6 | udp: 79.5 tcp: 53.4 (S) | udp: 68.1 tcp: 44 (S) | Highest performance |
166+
| SDIO 1-Bit | HD | 4 | jumper or PCB | ESP32, ESP32-C6, ESP32-C5 [3] | TBD | TBD | Stepping stone for PCB based SDIO 4-bit |
167+
| SDIO 4-Bit | HD | 6 | PCB only | ESP32, ESP32-C6, ESP32-C5 [3] | udp: 79.5 tcp: 53.4 (S) | udp: 68.1 tcp: 44 (S) | Highest performance |
168168
| Only BT over UART | FD | 2 or 4 | jumper or PCB | Any_Slave | NA | NA | Dedicated Bluetooth over UART pins |
169169
| UART | FD | 2 | jumper or PCB | Any_Slave | udp: 0.68 tcp: 0.67 (O) | udp: 0.68 tcp: 0.60 (O) | UART dedicated for BT & Wi-Fi [2] |
170170
| Dedicated platforms | FD | Extra 2 or 4 | jumper or PCB | Any_Slave | NA | NA | UART dedicated for BT & Wi-Fi on any other transport |
@@ -173,6 +173,8 @@ Legends:
173173
> - [1] Dual/Quad SPI is not supported on ESP32
174174
>
175175
> - [2] UART is only suitable for low throughput environments
176+
>
177+
> - [3] Currently in BETA support for ESP32-C5 (`--preview` in ESP-IDF master branch)
176178
177179
With jumper cables, 'Standard SPI' and 'Dual SPI' solutions are easiest to evaluate, without much of hardware dependencies. SDIO 1-Bit can be tested with jumper cables, but it needs some additional hardware config, such as installation of external pull-up registers.
178180

112 KB
Loading

docs/sdio.md

Lines changed: 46 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,8 @@ For optimal performance and reliability in production designs:
127127

128128
Setting up the hardware involves connecting the master and co-processor devices via the SDIO pins and ensuring all extra GPIO signals are properly connected. Below is the table of connections for the SDIO setup between a host ESP chipset and another ESP chipset as co-processor:
129129

130-
131-
132130
### Host connections
131+
133132
| Signal | ESP32 | ESP32-S3 | ESP32-P4-Function-EV-Board |
134133
|-------------|-------|----------|----------|
135134
| CLK | 14 | 19 | 18 |
@@ -140,27 +139,59 @@ Setting up the hardware involves connecting the master and co-processor devices
140139
| DAT2 | 12+[ext-pull-up](#34-pull-up-resistors) | 20+[ext-pull-up](#34-pull-up-resistors) | 16+[ext-pull-up](#34-pull-up-resistors) |
141140
| DAT3 | 13+[ext-pull-up](#34-pull-up-resistors) | 9+[ext-pull-up](#34-pull-up-resistors) | 17+[ext-pull-up](#34-pull-up-resistors) |
142141

142+
#### ESP32-P4-Function-EV-Board with ESP32-C5 Test Board
143143

144+
> [!NOTE]
145+
> Support for the ESP32-C5 is currently in BETA (`--preview` in ESP-IDF master branch)
144146
145-
### Co-processor connections
147+
ESP32-P4 Function EV Board GPIO setup to use with a ESP32-C5 Test Board:
148+
149+
| Signal | ESP32-P4 |
150+
|-----------|----------|
151+
| CLK | 33 |
152+
| Reset Out | 53 |
153+
| CMD | 4+[ext-pull-up](#34-pull-up-resistors) |
154+
| DAT0 | 20+[ext-pull-up](#34-pull-up-resistors) |
155+
| DAT1 | 23+[ext-pull-up](#34-pull-up-resistors) |
156+
| DAT2 | 21+[ext-pull-up](#34-pull-up-resistors) |
157+
| DAT3 | 22+[ext-pull-up](#34-pull-up-resistors) |
158+
159+
Current iPerf numbers, connected to a 5G Network and running iPerf (TCP and UDP tests).
146160

147-
| Signal | ESP32 | ESP32-C6 |
148-
|-------------|-------|----------|
149-
| CLK | 14 | 19 |
150-
| CMD | 15 | 18 |
151-
| DAT0 | 2 | 20 |
152-
| DAT1 | 4 | 21 |
153-
| DAT2 | 12 | 22 |
154-
| DAT3 | 13 | 23 |
155-
| Reset In | EN | EN/RST |
161+
| | Direction | Throughput (MBits/s) |
162+
|-----|-----------|----------------------|
163+
| UDP | PC to P4 | 60 |
164+
| | P4 to PC | 51 |
165+
| TCP | PC to P4 | 38 |
166+
| | P4 to PC | 22 |
156167

168+
- PC to P4
169+
- PC -> Router -> ESP Co-processor --> SDIO --> ESP32-P4
170+
- P4 to PC
171+
- ESP32-P4 --> SDIO --> ESP Co-processor -> Router ->PC
172+
173+
Testing using a shield box. For open air: similar setup, just with no shield box.
174+
175+
<img src="images/PerformanceSetup-ShieldBox.png" alt="iPerf testing setup - Shield box way" width="800" />
176+
177+
### Co-processor connections
178+
179+
| Signal | ESP32 | ESP32-C6 | ESP32-C5 |
180+
|-------------|-------|----------|----------|
181+
| CLK | 14 | 19 | 9 |
182+
| CMD | 15 | 18 | 10 |
183+
| DAT0 | 2 | 20 | 8 |
184+
| DAT1 | 4 | 21 | 7 |
185+
| DAT2 | 12 | 22 | 14 |
186+
| DAT3 | 13 | 23 | 13 |
187+
| Reset In | EN | EN/RST | RST |
157188

158189
> [!NOTE]
159190
>
160191
> A. Try to use IO_MUX pins from the datasheet for optimal performance on both sides. \
161192
> B. These GPIO assignments are based on default Kconfig configurations. You can modify these in the menuconfig for both host and co-processor if needed. \
162193
> C. Once ported, any other host with standard SDIO can be used. \
163-
> D. ESP32, ESP32-S3, and ESP32-P4 can be used as hosts; ESP32 and ESP32-C6 can be used as co-processors in SDIO mode. \
194+
> D. ESP32, ESP32-S3, and ESP32-P4 can be used as hosts; ESP32, ESP32-C6 and ESP32-C5 can be used as co-processors in SDIO mode. \
164195
> E. External pull-ups are mandatory
165196
166197
## 5 Set-Up ESP-IDF
@@ -189,8 +220,8 @@ Please follow the [ESP-IDF Get Started Guide](https://docs.espressif.com/project
189220

190221
## 6. Flashing the Co-processor
191222

192-
| Supported Co-processor Targets | ESP32 | ESP32-C6 |
193-
| ------------------------------ | ----- | -------- |
223+
| Supported Co-processor Targets | ESP32 | ESP32-C6 | ESP32-C5 |
224+
| ------------------------------ | ----- | -------- | -------- |
194225

195226
There are four steps to flash the ESP-Hosted co-processor firmware:
196227

@@ -540,4 +571,3 @@ After flashing both the co-processor and host devices, follow these steps to con
540571
- [ESP32 Hardware Design Guidelines](https://www.espressif.com/en/products/hardware/esp32/resources)
541572
- [SDIO Protocol Basics](https://en.wikipedia.org/wiki/Serial_Peripheral_Interface)
542573
- [ESP SDIO Slave Communication](https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/protocols/esp_sdio_slave_protocol.html)
543-

idf_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "2.0.2"
1+
version: "2.0.3"
22
description: ESP-Hosted-MCU provide drivers to act any ESP chipset as Wi-Fi or Bluetooth co-processor.
33
url: https://github.com/espressif/esp-hosted-mcu
44
examples:

slave/main/Kconfig.projbuild

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,47 +280,53 @@ menu "Example Configuration"
280280
bool "High Speed (40 MHz)"
281281
endchoice
282282

283-
283+
# from <esp-idf>/components/soc/<soc>/include/soc/sdio_slave_pins.h
284284
menu "Hosted SDIO GPIOs"
285285
config ESP_SDIO_PIN_CMD
286286
int "CMD GPIO number"
287287
range 15 15 if IDF_TARGET_ESP32
288288
range 18 18 if IDF_TARGET_ESP32C6
289+
range 10 10 if IDF_TARGET_ESP32C5
289290
help
290291
"Value cannot be configured. Displayed for reference."
291292

292293
config ESP_SDIO_PIN_CLK
293294
int "CLK GPIO number"
294295
range 14 14 if IDF_TARGET_ESP32
295296
range 19 19 if IDF_TARGET_ESP32C6
297+
range 9 9 if IDF_TARGET_ESP32C5
296298
help
297299
"Value cannot be configured. Displayed for reference."
298300

299301
config ESP_SDIO_PIN_D0
300302
int "D0 GPIO number"
301303
range 2 2 if IDF_TARGET_ESP32
302304
range 20 20 if IDF_TARGET_ESP32C6
305+
range 8 8 if IDF_TARGET_ESP32C5
303306
help
304307
"Value cannot be configured. Displayed for reference."
305308

306309
config ESP_SDIO_PIN_D1
307310
int "D1 GPIO number"
308311
range 4 4 if IDF_TARGET_ESP32
309312
range 21 21 if IDF_TARGET_ESP32C6
313+
range 7 7 if IDF_TARGET_ESP32C5
310314
help
311315
"Value cannot be configured. Displayed for reference."
312316

313317
config ESP_SDIO_PIN_D2
314318
int "D2 GPIO number"
315319
range 12 12 if IDF_TARGET_ESP32
316320
range 22 22 if IDF_TARGET_ESP32C6
321+
range 14 14 if IDF_TARGET_ESP32C5
317322
help
318323
"Value cannot be configured. Displayed for reference."
319324

320325
config ESP_SDIO_PIN_D3
321326
int "D3 GPIO number"
322327
range 13 13 if IDF_TARGET_ESP32
323328
range 23 23 if IDF_TARGET_ESP32C6
329+
range 13 13 if IDF_TARGET_ESP32C5
324330
help
325331
"Value cannot be configured. Displayed for reference."
326332
endmenu

0 commit comments

Comments
 (0)