Skip to content

Commit dcd46ad

Browse files
committed
Merge branch 'feature/c5_spi' into 'master'
feat: add C5 SPI support See merge request application/esp-at!1933
2 parents 4489a6d + 3df1369 commit dcd46ad

File tree

12 files changed

+598
-107
lines changed

12 files changed

+598
-107
lines changed

.github/workflows/main.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,13 @@ jobs:
156156
artifacts_name: esp32c5-sdio-at
157157
secrets: inherit
158158

159+
build-esp32c5-spi-at:
160+
uses: ./.github/workflows/build_template_esp32c5.yml
161+
with:
162+
module_name: ESP32C5-SPI
163+
artifacts_name: esp32c5-spi-at
164+
secrets: inherit
165+
159166
build-esp32c2-4mb-g2-at:
160167
uses: ./.github/workflows/build_template_esp32c2.yml
161168
with:

.gitlab/ci/build_esp32c5.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ esp32c5_at_wifi_function_test:
2323
variables:
2424
MODULE_NAME: "ESP32C5-4MB"
2525

26+
esp32c5_spi_at:
27+
extends:
28+
- .build_template_esp32c5
29+
- .rules:build:build_project
30+
variables:
31+
MODULE_NAME: "ESP32C5-SPI"
32+
2633
esp32c5_sdio_at:
2734
extends:
2835
- .build_template_esp32c5

components/at/src/at_default_config.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ static const at_module_info_t s_module_info[] = {
6060
#if defined(CONFIG_IDF_TARGET_ESP32C5)
6161
{"ESP32C5-4MB", CONFIG_ESP_AT_OTA_TOKEN_ESP32C5_4MB, CONFIG_ESP_AT_OTA_SSL_TOKEN_ESP32C5_4MB},
6262
{"ESP32C5-SDIO", NULL, NULL},
63+
{"ESP32C5-SPI", NULL, NULL }, // ESP32C5-SPI
6364
#endif
6465

6566
#if defined(CONFIG_IDF_TARGET_ESP32C6)

components/customized_partitions/raw_data/factory_param/factory_param_data.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ PLATFORM_ESP32C2,ESP32C2-2MB-BLE-G2,"2MB, BLE, No OTA, ECO4, TX:7 RX:6",4,78,1,1
1818
PLATFORM_ESP32C2,ESP32C2-2MB-NO-OTA-G2,"2MB, Wi-Fi + BLE, No OTA, ECO4, TX:7 RX:6",4,78,1,1,13,CN,115200,7,6,5,4,1
1919
PLATFORM_ESP32C5,ESP32C5-4MB,"4MB, Wi-Fi + BLE, OTA, TX:23 RX:24",4,78,1,1,13,CN,115200,23,24,25,26,1
2020
PLATFORM_ESP32C5,ESP32C5-SDIO,"4MB, Wi-Fi + BLE, OTA, communicate with MCU via SDIO",4,78,-1,1,13,CN,-1,-1,-1,-1,-1,1
21+
PLATFORM_ESP32C5,ESP32C5-SPI,"4MB, Wi-Fi + BLE, OTA, communicate with MCU via SPI",4,78,1,1,13,CN,-1,-1,-1,-1,-1,1
2122
PLATFORM_ESP32C6,ESP32C6-4MB,"4MB, Wi-Fi + BLE, OTA, TX:7 RX:6",4,78,1,1,13,CN,115200,7,6,5,4,1
2223
PLATFORM_ESP32C61,ESP32C61-4MB,"4MB, Wi-Fi + BLE, OTA, TX:7 RX:6",4,78,1,1,13,CN,115200,7,6,5,4,1
2324
PLATFORM_ESP32S2,MINI,"4MB, Wi-Fi, OTA, TX:17 RX:21",4,78,1,1,13,CN,115200,17,21,20,19,1

docs/en/Compile_and_Develop/How_to_implement_SPI_AT.rst

Lines changed: 94 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,31 @@ The following pin assignments are used by default:
8585
* - QUADHD (qio/qout) :sup:`1`
8686
- 2
8787

88+
.. only:: esp32c5
89+
90+
.. list-table:: The Default Pins for SPI AT
91+
:widths: 10 25
92+
:header-rows: 1
93+
94+
* - Signal
95+
- GPIO Number
96+
* - SCLK
97+
- 6
98+
* - MISO
99+
- 2
100+
* - MOSI
101+
- 7
102+
* - CS
103+
- 10
104+
* - HANDSHAKE
105+
- 3
106+
* - GND
107+
- GND
108+
* - QUADWP (qio/qout) :sup:`1`
109+
- 5
110+
* - QUADHD (qio/qout) :sup:`1`
111+
- 4
112+
88113
**Note** 1: QUADWP and QUADHD signals are only used for 4-bit (qio/qout) transactions.
89114

90115
You can change the default pin assignments by ``./build.py menuconfig`` > ``Component config`` > ``AT`` > ``communicate method for AT command`` > ``AT through SPI`` > ``AT SPI GPIO settings`` and compile the project (see :doc:`../Compile_and_Develop/How_to_clone_project_and_compile_it`).
@@ -302,51 +327,72 @@ Reference Results
302327

303328
The table below shows the throughput results we got in a shield box.
304329

305-
.. list-table:: SPI AT Wi-Fi TCP Throughput
306-
:header-rows: 1
307-
:widths: 15 20 25 25
308-
309-
* - Clock
310-
- SPI mode
311-
- master->slave
312-
- slave->master
313-
* - 10 M
314-
- Standard
315-
- 0.95 MByte/s
316-
- 1.00 MByte/s
317-
* - 10 M
318-
- Dual
319-
- 1.37 MByte/s
320-
- 1.29 MByte/s
321-
* - 10 M
322-
- Quad
323-
- 1.43 MByte/s
324-
- 1.31 MByte/s
325-
* - 20 M
326-
- Standard
327-
- 1.41 MByte/s
328-
- 1.30 MByte/s
329-
* - 20 M
330-
- Dual
331-
- 1.39 MByte/s
332-
- 1.30 MByte/s
333-
* - 20 M
334-
- Quad
335-
- 1.39 MByte/s
336-
- 1.30 MByte/s
337-
* - 40 M
338-
- Standard
339-
- 1.37 MByte/s
340-
- 1.30 MByte/s
341-
* - 40 M
342-
- Dual
343-
- 1.40 MByte/s
344-
- 1.31 MByte/s
345-
* - 40 M
346-
- Quad
347-
- 1.48 MByte/s
348-
- 1.31 MByte/s
349-
350-
**Note** 1: When SPI clock frequency is high, due to the limitation of upper network components, the communication rate of Dual or Quad mode is not significantly improved compared with Standard mode.
351-
352-
**Note** 2: For more information about SPI communication, please refer to the `Technical Reference Manuals <https://www.espressif.com/en/support/documents/technical-documents>`_.
330+
.. only:: esp32c6 or esp32c3
331+
332+
.. list-table:: SPI AT Wi-Fi TCP Throughput
333+
:header-rows: 1
334+
:widths: 15 20 25 25
335+
336+
* - Clock
337+
- SPI mode
338+
- master->slave
339+
- slave->master
340+
* - 10 M
341+
- Standard
342+
- 0.95 MByte/s
343+
- 1.00 MByte/s
344+
* - 10 M
345+
- Dual
346+
- 1.37 MByte/s
347+
- 1.29 MByte/s
348+
* - 10 M
349+
- Quad
350+
- 1.43 MByte/s
351+
- 1.31 MByte/s
352+
* - 20 M
353+
- Standard
354+
- 1.41 MByte/s
355+
- 1.30 MByte/s
356+
* - 20 M
357+
- Dual
358+
- 1.39 MByte/s
359+
- 1.30 MByte/s
360+
* - 20 M
361+
- Quad
362+
- 1.39 MByte/s
363+
- 1.30 MByte/s
364+
* - 40 M
365+
- Standard
366+
- 1.37 MByte/s
367+
- 1.30 MByte/s
368+
* - 40 M
369+
- Dual
370+
- 1.40 MByte/s
371+
- 1.31 MByte/s
372+
* - 40 M
373+
- Quad
374+
- 1.48 MByte/s
375+
- 1.31 MByte/s
376+
377+
**Note** : When SPI clock frequency is high, due to the limitation of upper network components, the communication rate of Dual or Quad mode is not significantly improved compared with Standard mode.
378+
379+
.. only:: esp32c5
380+
381+
.. list-table:: SPI AT Wi-Fi 5G TCP Throughput
382+
:header-rows: 1
383+
:widths: 15 20 25 25
384+
385+
* - Clock
386+
- SPI mode
387+
- master->slave
388+
- slave->master
389+
* - 26 M
390+
- Standard
391+
- 2.15 MByte/s
392+
- 2.25 MByte/s
393+
* - 26 M
394+
- Dual
395+
- 2.97 MByte/s
396+
- 2.59 MByte/s
397+
398+
**Note** : For more information about SPI communication, please refer to the `Technical Reference Manuals <https://www.espressif.com/en/support/documents/technical-documents>`_.

docs/zh_CN/Compile_and_Develop/How_to_implement_SPI_AT.rst

Lines changed: 95 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,31 @@ SPI AT 默认管脚
8585
* - QUADHD (qio/qout) :sup:`1`
8686
- 2
8787

88+
.. only:: esp32c5
89+
90+
.. list-table:: SPI AT 默认管脚
91+
:widths: 10 25
92+
:header-rows: 1
93+
94+
* - 信号
95+
- GPIO 编号
96+
* - SCLK
97+
- 6
98+
* - MISO
99+
- 2
100+
* - MOSI
101+
- 7
102+
* - CS
103+
- 10
104+
* - HANDSHAKE
105+
- 3
106+
* - GND
107+
- GND
108+
* - QUADWP (qio/qout) :sup:`1`
109+
- 5
110+
* - QUADHD (qio/qout) :sup:`1`
111+
- 4
112+
88113
**说明** 1:QUADWP 引脚和 QUADHD 引脚仅在使用 4 线 SPI 工作时使用。
89114

90115
您可以通过 ``./build.py menuconfig`` > ``Component config`` > ``AT`` > ``communicate method for AT command`` > ``AT through SPI`` > ``AT SPI GPIO settings``,然后编译工程来配置 SPI AT 对应的管脚(参考 :doc:`../Compile_and_Develop/How_to_clone_project_and_compile_it`)。
@@ -302,51 +327,73 @@ SPI AT 速率
302327

303328
下表显示了我们在屏蔽箱中得到的通信速率结果:
304329

305-
.. list-table:: SPI AT Wi-Fi TCP 通信速率
306-
:header-rows: 1
307-
:widths: 15 20 25 25
308-
309-
* - Clock
310-
- SPI mode
311-
- master->slave
312-
- slave->master
313-
* - 10 M
314-
- Standard
315-
- 0.95 MByte/s
316-
- 1.00 MByte/s
317-
* - 10 M
318-
- Dual
319-
- 1.37 MByte/s
320-
- 1.29 MByte/s
321-
* - 10 M
322-
- Quad
323-
- 1.43 MByte/s
324-
- 1.31 MByte/s
325-
* - 20 M
326-
- Standard
327-
- 1.41 MByte/s
328-
- 1.30 MByte/s
329-
* - 20 M
330-
- Dual
331-
- 1.39 MByte/s
332-
- 1.30 MByte/s
333-
* - 20 M
334-
- Quad
335-
- 1.39 MByte/s
336-
- 1.30 MByte/s
337-
* - 40 M
338-
- Standard
339-
- 1.37 MByte/s
340-
- 1.30 MByte/s
341-
* - 40 M
342-
- Dual
343-
- 1.40 MByte/s
344-
- 1.31 MByte/s
345-
* - 40 M
346-
- Quad
347-
- 1.48 MByte/s
348-
- 1.31 MByte/s
349-
350-
**说明** 1:当 SPI 的时钟频率较高时,受限于上层网络组件的限制,使用 Dual 或者 Quad 工作模式的通信速率想比较于 Standard 模式并未显著改善。
351-
352-
**说明** 2:更多关于 SPI 通信的介绍请参考对应模组的 `技术参考手册 <https://www.espressif.com/zh-hans/support/documents/technical-documents>`_。
330+
.. only:: esp32c6 or esp32c3
331+
332+
.. list-table:: SPI AT Wi-Fi TCP 通信速率
333+
:header-rows: 1
334+
:widths: 15 20 25 25
335+
336+
* - Clock
337+
- SPI mode
338+
- master->slave
339+
- slave->master
340+
* - 10 M
341+
- Standard
342+
- 0.95 MByte/s
343+
- 1.00 MByte/s
344+
* - 10 M
345+
- Dual
346+
- 1.37 MByte/s
347+
- 1.29 MByte/s
348+
* - 10 M
349+
- Quad
350+
- 1.43 MByte/s
351+
- 1.31 MByte/s
352+
* - 20 M
353+
- Standard
354+
- 1.41 MByte/s
355+
- 1.30 MByte/s
356+
* - 20 M
357+
- Dual
358+
- 1.39 MByte/s
359+
- 1.30 MByte/s
360+
* - 20 M
361+
- Quad
362+
- 1.39 MByte/s
363+
- 1.30 MByte/s
364+
* - 40 M
365+
- Standard
366+
- 1.37 MByte/s
367+
- 1.30 MByte/s
368+
* - 40 M
369+
- Dual
370+
- 1.40 MByte/s
371+
- 1.31 MByte/s
372+
* - 40 M
373+
- Quad
374+
- 1.48 MByte/s
375+
- 1.31 MByte/s
376+
377+
**说明** :当 SPI 的时钟频率较高时,受限于上层网络组件的限制,使用 Dual 或者 Quad 工作模式的通信速率想比较于 Standard 模式并未显著改善。
378+
379+
.. only:: esp32c5
380+
381+
.. list-table:: SPI AT Wi-Fi 5G TCP 通信速率
382+
:header-rows: 1
383+
:widths: 15 20 25 25
384+
385+
* - Clock
386+
- SPI mode
387+
- master->slave
388+
- slave->master
389+
* - 26 M
390+
- Standard
391+
- 2.15 MByte/s
392+
- 2.25 MByte/s
393+
* - 26 M
394+
- Dual
395+
- 2.97 MByte/s
396+
- 2.59 MByte/s
397+
398+
399+
**说明** :更多关于 SPI 通信的介绍请参考对应模组的 `技术参考手册 <https://www.espressif.com/zh-hans/support/documents/technical-documents>`_。

0 commit comments

Comments
 (0)