Skip to content

Commit f3d4ede

Browse files
committed
Merge branch 'feat/update_docs_v2' into 'master'
Feat/update docs v2 See merge request espressif/esp-extconn!8
2 parents fd5ddfd + 0167e6f commit f3d4ede

File tree

7 files changed

+234
-68
lines changed

7 files changed

+234
-68
lines changed

README.md

Lines changed: 195 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ This component provides external wireless connectivity(Wi-Fi & Bluetooth) for ES
7171

7272
* Hardware setup
7373
- Pin Connections
74-
| ESP32P4 | ESP8689 | Function |
75-
|:--------:|:--------:|:--------:|
76-
| 53 | EN |Reset|
77-
| GND | IO0 | Forcing ESP8689 in download mode|
74+
| ESP32P4 | ESP8689 | Function |
75+
| :-----: | :-----: | :------------------------------: |
76+
| 53 | EN | Reset |
77+
| GND | IO0 | Forcing ESP8689 in download mode |
7878
- The ESP32P4 controls the reset of the ESP8689 through pin 53.
7979

8080
## Supported Transports
@@ -89,14 +89,14 @@ This component provides external wireless connectivity(Wi-Fi & Bluetooth) for ES
8989
<th>Supported APIs</th>
9090
</tr>
9191
<tr>
92-
<td rowspan="2">Initialization</td>
92+
<td rowspan="2"style="text-align:center; vertical-align:middle;">Initialization</td>
9393
<td>esp_wifi_<b>init</b> / esp_wifi_<b>deinit</b></td>
9494
</tr>
9595
<tr>
9696
<td>esp_wifi_<b>start</b> / esp_wifi_<b>stop</b></td>
9797
</tr>
9898
<tr>
99-
<td rowspan="13">Configuration</td>
99+
<td rowspan="13"style="text-align:center; vertical-align:middle;">Configuration</td>
100100
<td>esp_wifi_<b>set_mode</b> / esp_wifi_<b>get_mode</b></td>
101101
</tr>
102102
<tr>
@@ -136,7 +136,7 @@ This component provides external wireless connectivity(Wi-Fi & Bluetooth) for ES
136136
<td> esp_wifi_<b>set_rssi_threshold</b>
137137
</tr>
138138
<tr>
139-
<td rowspan="7">Connection</td>
139+
<td rowspan="7"style="text-align:center; vertical-align:middle;">Connection</td>
140140
<td>esp_wifi_<b>connect</b> / esp_wifi_<b>disconnect</b></td>
141141
</tr>
142142
<tr>
@@ -158,7 +158,7 @@ This component provides external wireless connectivity(Wi-Fi & Bluetooth) for ES
158158
<td>esp_wifi_<b>sta_get_negotiated_phymode</b></td>
159159
</tr>
160160
<tr>
161-
<td rowspan="5">Scan</td>
161+
<td rowspan="5"style="text-align:center; vertical-align:middle;">Scan</td>
162162
<td>esp_wifi_<b>scan_start</b> / esp_wifi_<b>scan_stop</b></td>
163163
</tr>
164164
<tr>
@@ -174,7 +174,7 @@ This component provides external wireless connectivity(Wi-Fi & Bluetooth) for ES
174174
<td>esp_wifi_<b>clear_ap_list</b></td>
175175
</tr>
176176
<tr>
177-
<td rowspan="2">Others</td>
177+
<td rowspan="2"style="text-align:center; vertical-align:middle;">Others</td>
178178
<td>esp_wifi_<b>80211_tx</b></td>
179179
</tr>
180180
<tr>
@@ -204,66 +204,204 @@ This component provides external wireless connectivity(Wi-Fi & Bluetooth) for ES
204204
4. Using esp_wifi components like built-in wireless chips :)
205205

206206
## Throughput Performance
207+
### 1. Parameters
208+
209+
<table border="1" cellspacing="0" cellpadding="5">
210+
<tr>
211+
<td colspan="2", style="text-align: center; font-size: 20px; font-weight: bold;">Parameters</td>
212+
<td style="font-size: 20px; font-weight: bold;">Value</td>
213+
</tr>
214+
<tr>
215+
<td rowspan="3"> System Parameters </td>
216+
<td>CACHE_L2_CACHE</td>
217+
<td>128 KB</td>
218+
</tr>
219+
<tr>
220+
<td>CACHE_L2_CACHE_LINE</td>
221+
<td>64 B</td>
222+
</tr>
223+
<tr>
224+
<td>FREERTOS_HZ</td>
225+
<td>100 Hz</td>
226+
</tr>
227+
<tr>
228+
<td rowspan="6"> Wi-Fi Parameters </td>
229+
<td>WIFI_STATIC_RX_BUFFER_NUM</td>
230+
<td>24</td>
231+
</tr>
232+
<tr>
233+
<td>WIFI_DYNAMIC_RX_BUFFER_NUM</td>
234+
<td>128</td>
235+
</tr>
236+
<tr>
237+
<td>WIFI_DYNAMIC_TX_BUFFER_NUM</td>
238+
<td>128</td>
239+
</tr>
240+
<tr>
241+
<td>WIFI_RX_BA_WIN</td>
242+
<td>32</td>
243+
</tr>
244+
<tr>
245+
<td>WIFI_IRAM_OPT</td>
246+
<td>y</td>
247+
</tr>
248+
<tr>
249+
<td>WIFI_RX_IRAM_OPT </td>
250+
<td>y</td>
251+
</tr>
252+
<tr>
253+
<td rowspan="7"> Lwip Parameters </td>
254+
<td>LWIP_IRAM_OPTIMIZATION</td>
255+
<td>y</td>
256+
</tr>
257+
<tr>
258+
<td>LWIP_TCPIP_RECVMBOX_SIZE</td>
259+
<td>64</td>
260+
</tr>
261+
<tr>
262+
<td>LWIP_TCP_WND_DEFAULT</td>
263+
<td>65535</td>
264+
</tr>
265+
<tr>
266+
<td>LWIP_TCP_SND_BUF_DEFAULT</td>
267+
<td>65535</td>
268+
</tr>
269+
<tr>
270+
<td>LWIP_TCP_RECVMBOX_SIZE</td>
271+
<td>64</td>
272+
</tr>
273+
<tr>
274+
<td>LWIP_TCP_ACCEPTMBOX_SIZE</td>
275+
<td>64</td>
276+
</tr>
277+
<tr>
278+
<td>LWIP_UDP_RECVMBOX_SIZE</td>
279+
<td>64</td>
280+
</tr>
281+
<tr>
282+
<td rowspan="10"> Tasks Parameters </td>
283+
<td>Iperf traffic Core ID</td>
284+
<td>0</td>
285+
</tr>
286+
<tr>
287+
<td>Iperf traffic Priority</td>
288+
<td>23</td>
289+
</tr>
290+
<tr>
291+
<td>Lwip Core ID</td>
292+
<td>0</td>
293+
</tr>
294+
<tr>
295+
<td>Lwip Priority</td>
296+
<td>23</td>
297+
</tr>
298+
<tr>
299+
<td>Wi-Fi Core ID</td>
300+
<td>0</td>
301+
</tr>
302+
<tr>
303+
<td>Wi-Fi Priority</td>
304+
<td>23</td>
305+
</tr>
306+
<tr>
307+
<td>SDIO TX Core ID</td>
308+
<td>1</td>
309+
</tr>
310+
<tr>
311+
<td>SDIO TX Priority</td>
312+
<td>24</td>
313+
</tr>
314+
<tr>
315+
<td>SDIO RX Core ID</td>
316+
<td>1</td>
317+
</tr>
318+
<tr>
319+
<td>SDIO RX Priority</td>
320+
<td>23</td>
321+
</tr>
322+
<tr>
323+
<td rowspan="4"> Router parameters </td>
324+
<td>Type</td>
325+
<td>ASUS RT-AX88U Pro</td>
326+
</tr>
327+
<tr>
328+
<td>Bandwidth</td>
329+
<td>40MHZ</td>
330+
</tr>
331+
<tr>
332+
<td>Beacon interval (ms)</td>
333+
<td>1000</td>
334+
</tr>
335+
<tr>
336+
<td>Mode</td>
337+
<td>N only</td>
338+
</tr>
339+
340+
</table>
341+
342+
### 2. Performance
207343
#### 1. TCP TX
208344
```sh
209-
[ ID] Interval Transfer Bandwidth
210-
[ 4] 0.0- 1.0 sec 5.47 MBytes 45.9 Mbits/sec
211-
[ 4] 1.0- 2.0 sec 5.51 MBytes 46.2 Mbits/sec
212-
[ 4] 2.0- 3.0 sec 5.56 MBytes 46.7 Mbits/sec
213-
[ 4] 3.0- 4.0 sec 5.56 MBytes 46.6 Mbits/sec
214-
[ 4] 4.0- 5.0 sec 5.51 MBytes 46.3 Mbits/sec
215-
[ 4] 5.0- 6.0 sec 5.58 MBytes 46.8 Mbits/sec
216-
[ 4] 6.0- 7.0 sec 5.53 MBytes 46.4 Mbits/sec
217-
[ 4] 7.0- 8.0 sec 5.55 MBytes 46.5 Mbits/sec
218-
[ 4] 8.0- 9.0 sec 5.59 MBytes 46.9 Mbits/sec
219-
[ 4] 9.0-10.0 sec 5.56 MBytes 46.7 Mbits/sec
220-
[ 4] 0.0-10.0 sec 55.4 MBytes 46.5 Mbits/sec
345+
[ ID] Interval Transfer Bandwidth
346+
[ 1] 0.0000-1.0000 sec 5.69 MBytes 47.7 Mbits/sec
347+
[ 1] 1.0000-2.0000 sec 5.77 MBytes 48.4 Mbits/sec
348+
[ 1] 2.0000-3.0000 sec 5.79 MBytes 48.6 Mbits/sec
349+
[ 1] 3.0000-4.0000 sec 5.81 MBytes 48.8 Mbits/sec
350+
[ 1] 4.0000-5.0000 sec 5.90 MBytes 49.5 Mbits/sec
351+
[ 1] 5.0000-6.0000 sec 5.87 MBytes 49.2 Mbits/sec
352+
[ 1] 6.0000-7.0000 sec 5.88 MBytes 49.3 Mbits/sec
353+
[ 1] 7.0000-8.0000 sec 5.80 MBytes 48.6 Mbits/sec
354+
[ 1] 8.0000-9.0000 sec 5.80 MBytes 48.6 Mbits/sec
355+
[ 1] 9.0000-10.0000 sec 5.79 MBytes 48.6 Mbits/sec
356+
[ 1] 0.0000-10.0053 sec 58.1 MBytes 48.7 Mbits/sec
221357
```
222358

223359
#### 2. TCP RX
224360
```sh
225-
Interval Bandwidth
226-
0.0- 1.0 sec 44.47 Mbits/sec
227-
1.0- 2.0 sec 45.66 Mbits/sec
228-
2.0- 3.0 sec 45.50 Mbits/sec
229-
3.0- 4.0 sec 45.55 Mbits/sec
230-
4.0- 5.0 sec 45.93 Mbits/sec
231-
5.0- 6.0 sec 45.52 Mbits/sec
232-
6.0- 7.0 sec 45.36 Mbits/sec
233-
7.0- 8.0 sec 45.12 Mbits/sec
234-
8.0- 9.0 sec 45.92 Mbits/sec
235-
9.0-10.0 sec 45.50 Mbits/sec
236-
0.0-10.0 sec 45.45 Mbits/sec
361+
Interval Bandwidth
362+
0.0- 1.0 sec 51.24 Mbits/sec
363+
1.0- 2.0 sec 51.04 Mbits/sec
364+
2.0- 3.0 sec 51.59 Mbits/sec
365+
3.0- 4.0 sec 51.44 Mbits/sec
366+
4.0- 5.0 sec 51.58 Mbits/sec
367+
5.0- 6.0 sec 51.45 Mbits/sec
368+
6.0- 7.0 sec 51.25 Mbits/sec
369+
7.0- 8.0 sec 51.91 Mbits/sec
370+
8.0- 9.0 sec 51.66 Mbits/sec
371+
9.0-10.0 sec 51.21 Mbits/sec
372+
0.0-10.0 sec 51.44 Mbits/sec
237373
```
238374

239375
#### 3. UDP TX
240376
```sh
241-
[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
242-
[ 3] 0.0- 1.0 sec 6.12 MBytes 51.3 Mbits/sec 0.242 ms 0/ 4366 (0%)
243-
[ 3] 1.0- 2.0 sec 6.09 MBytes 51.1 Mbits/sec 0.237 ms 0/ 4343 (0%)
244-
[ 3] 2.0- 3.0 sec 6.06 MBytes 50.9 Mbits/sec 0.245 ms 0/ 4324 (0%)
245-
[ 3] 3.0- 4.0 sec 6.06 MBytes 50.9 Mbits/sec 0.437 ms 0/ 4326 (0%)
246-
[ 3] 4.0- 5.0 sec 6.05 MBytes 50.7 Mbits/sec 0.231 ms 0/ 4315 (0%)
247-
[ 3] 5.0- 6.0 sec 6.06 MBytes 50.8 Mbits/sec 0.249 ms 0/ 4321 (0%)
248-
[ 3] 6.0- 7.0 sec 6.06 MBytes 50.8 Mbits/sec 0.253 ms 0/ 4322 (0%)
249-
[ 3] 7.0- 8.0 sec 6.06 MBytes 50.8 Mbits/sec 0.242 ms 0/ 4323 (0%)
250-
[ 3] 8.0- 9.0 sec 6.05 MBytes 50.8 Mbits/sec 0.257 ms 0/ 4317 (0%)
251-
[ 3] 9.0-10.0 sec 6.05 MBytes 50.7 Mbits/sec 0.251 ms 0/ 4315 (0%)
252-
[ 3] 0.0-10.0 sec 60.7 MBytes 50.9 Mbits/sec 0.251 ms 0/43272 (0%)
377+
[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
378+
[ 1] 0.0000-1.0000 sec 7.69 MBytes 64.5 Mbits/sec 0.178 ms 0/5558 (0%)
379+
[ 1] 1.0000-2.0000 sec 7.72 MBytes 64.7 Mbits/sec 0.172 ms 0/5580 (0%)
380+
[ 1] 2.0000-3.0000 sec 7.73 MBytes 64.8 Mbits/sec 0.196 ms 0/5589 (0%)
381+
[ 1] 3.0000-4.0000 sec 7.71 MBytes 64.7 Mbits/sec 0.178 ms 0/5576 (0%)
382+
[ 1] 4.0000-5.0000 sec 7.72 MBytes 64.8 Mbits/sec 0.167 ms 0/5583 (0%)
383+
[ 1] 5.0000-6.0000 sec 7.73 MBytes 64.8 Mbits/sec 0.163 ms 0/5588 (0%)
384+
[ 1] 6.0000-7.0000 sec 7.73 MBytes 64.9 Mbits/sec 0.168 ms 22/5615 (0.39%)
385+
[ 1] 7.0000-8.0000 sec 7.73 MBytes 64.8 Mbits/sec 0.177 ms 24/5614 (0.43%)
386+
[ 1] 8.0000-9.0000 sec 7.72 MBytes 64.8 Mbits/sec 0.171 ms 20/5606 (0.36%)
387+
[ 1] 9.0000-10.0000 sec 7.72 MBytes 64.7 Mbits/sec 0.176 ms 27/5607 (0.48%)
388+
[ 1] 0.0000-10.0010 sec 77.2 MBytes 64.8 Mbits/sec 0.195 ms 93/55922 (0.17%)
253389
```
254390

255391
#### 4. UDP RX
256392
```sh
257393
Interval Bandwidth
258-
0.0- 1.0 sec 66.11 Mbits/sec
259-
1.0- 2.0 sec 65.82 Mbits/sec
260-
2.0- 3.0 sec 66.54 Mbits/sec
261-
3.0- 4.0 sec 65.83 Mbits/sec
262-
4.0- 5.0 sec 65.78 Mbits/sec
263-
5.0- 6.0 sec 66.44 Mbits/sec
264-
6.0- 7.0 sec 66.25 Mbits/sec
265-
7.0- 8.0 sec 66.09 Mbits/sec
266-
8.0- 9.0 sec 65.72 Mbits/sec
267-
9.0-10.0 sec 65.77 Mbits/sec
268-
0.0-10.0 sec 66.04 Mbits/sec
269-
```
394+
0.0- 1.0 sec 84.16 Mbits/sec
395+
1.0- 2.0 sec 84.34 Mbits/sec
396+
2.0- 3.0 sec 84.43 Mbits/sec
397+
3.0- 4.0 sec 84.14 Mbits/sec
398+
4.0- 5.0 sec 83.56 Mbits/sec
399+
5.0- 6.0 sec 84.45 Mbits/sec
400+
6.0- 7.0 sec 84.57 Mbits/sec
401+
7.0- 8.0 sec 84.20 Mbits/sec
402+
8.0- 9.0 sec 83.71 Mbits/sec
403+
9.0-10.0 sec 83.86 Mbits/sec
404+
0.0-10.0 sec 84.14 Mbits/sec
405+
```
406+
407+
> **Note : Due to the limited clock frequency (40M) of SDIO, there may be slight packet loss in the UDP TX direction.**

src/esp_sip.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,11 @@ esp_err_t esp_sip_write_mem(uint32_t addr, const uint8_t *buf, uint32_t len)
7777

7878
if (sip->rawbuf == NULL) {
7979
size_t actual_size = 0;
80-
err = esp_dma_calloc(1, SIP_BOOT_BUF_SIZE, 0, (void*)&sip->rawbuf, &actual_size);
80+
esp_dma_mem_info_t dma_mem_info = {
81+
.extra_heap_caps = MALLOC_CAP_DMA | MALLOC_CAP_INTERNAL,
82+
.dma_alignment_bytes = 4, //legacy API behaviour is only check max dma buffer alignment
83+
};
84+
err = esp_dma_capable_malloc(SIP_BOOT_BUF_SIZE, &dma_mem_info, (void*)&sip->rawbuf, &actual_size);
8185
}
8286

8387
chdr = (struct sip_hdr *)sip->rawbuf;

src/ext_boot.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ static sdmmc_card_t *sdmmc_init(void)
6060

6161
#if CONFIG_ESP_EXT_CONN_VIA_SDIO
6262
config.flags = SDMMC_HOST_FLAG_4BIT | SDMMC_HOST_FLAG_ALLOC_ALIGNED_BUF;
63-
config.max_freq_khz = SDMMC_FREQ_DEFAULT;
63+
config.max_freq_khz = SDMMC_FREQ_HIGHSPEED;
6464

6565
sd_pwr_ctrl_ldo_config_t ldo_config = {
6666
.ldo_chan_id = 4, // `LDO_VO4` is used as the SDMMC IO power

src/ext_sdio_adapter.c

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,11 @@ esp_err_t esp_extconn_sdio_read_reg_window(unsigned int reg_addr, uint8_t *value
222222
ESP_RETURN_ON_FALSE(reg_addr <= 0x7f, ESP_ERR_INVALID_ARG, TAG, "Invalid parameters");
223223

224224
size_t actual_size = 0;
225-
esp_dma_calloc(1, sizeof(uint32_t), 0, (void*)&p_tbuf, &actual_size);
225+
esp_dma_mem_info_t dma_mem_info = {
226+
.extra_heap_caps = MALLOC_CAP_DMA | MALLOC_CAP_INTERNAL,
227+
.dma_alignment_bytes = 4, //legacy API behaviour is only check max dma buffer alignment
228+
};
229+
esp_dma_capable_malloc(sizeof(uint32_t), &dma_mem_info, (void*)&p_tbuf, &actual_size);
226230
ESP_RETURN_ON_FALSE(p_tbuf != NULL, ESP_ERR_NO_MEM, TAG, "Fatal: Sufficient memory");
227231

228232
p_tbuf[0] = (reg_addr & 0x7f);
@@ -255,7 +259,11 @@ static int esp_extconn_sdio_write_reg_window(unsigned int reg_addr, uint8_t *val
255259
ESP_RETURN_ON_FALSE(reg_addr <= 0x7f, ESP_ERR_INVALID_ARG, TAG, "Invalid parameters");
256260

257261
size_t actual_size = 0;
258-
esp_dma_calloc(1, sizeof(uint32_t), 0, (void*)&p_tbuf, &actual_size);
262+
esp_dma_mem_info_t dma_mem_info = {
263+
.extra_heap_caps = MALLOC_CAP_DMA | MALLOC_CAP_INTERNAL,
264+
.dma_alignment_bytes = 4, //legacy API behaviour is only check max dma buffer alignment
265+
};
266+
esp_dma_capable_malloc(sizeof(uint32_t), &dma_mem_info, (void*)&p_tbuf, &actual_size);
259267
ESP_RETURN_ON_FALSE(p_tbuf != NULL, ESP_ERR_NO_MEM, TAG, "Fatal: Sufficient memory");
260268

261269
memcpy(p_tbuf, value, 4);
@@ -272,7 +280,11 @@ static esp_err_t esp_extconn_sdio_init_slave_link(void)
272280
{
273281
uint32_t *t_buf = NULL;
274282
size_t actual_size = 0;
275-
esp_dma_calloc(1, sizeof(uint32_t), 0, (void*)&t_buf, &actual_size);
283+
esp_dma_mem_info_t dma_mem_info = {
284+
.extra_heap_caps = MALLOC_CAP_DMA | MALLOC_CAP_INTERNAL,
285+
.dma_alignment_bytes = 4, //legacy API behaviour is only check max dma buffer alignment
286+
};
287+
esp_dma_capable_malloc(sizeof(uint32_t), &dma_mem_info, (void*)&t_buf, &actual_size);
276288
ESP_RETURN_ON_FALSE(t_buf != NULL, ESP_ERR_NO_MEM, TAG, "Fatal: Sufficient memory");
277289

278290
// set stitch en
@@ -303,7 +315,7 @@ static esp_err_t esp_extconn_sdio_init_slave_link(void)
303315

304316
// Enable target interrupt
305317
uint32_t *val = 0;
306-
esp_dma_calloc(1, sizeof(uint32_t), 0, (void*)&val, &actual_size);
318+
esp_dma_capable_malloc(sizeof(uint32_t), &dma_mem_info, (void*)&val, &actual_size);
307319
ESP_RETURN_ON_FALSE(val != NULL, ESP_ERR_NO_MEM, TAG, "Fatal: Sufficient memory");
308320

309321
extconn_sdio_read_bytes(host->card, 1, ESP_SDIO_FUNC1_INT_ENA, (uint8_t *)val, sizeof(uint32_t));

src/trans_bt.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,11 @@ static void bt_tx_task(void *arg)
6868

6969
if (buf.data && buf.len) {
7070
size_t actual_size = 0;
71-
ESP_ERROR_CHECK(esp_dma_calloc(1, sizeof(sbp_hdr_t) + buf.len, 0, (void*)&hdr, &actual_size));
71+
esp_dma_mem_info_t dma_mem_info = {
72+
.extra_heap_caps = MALLOC_CAP_DMA | MALLOC_CAP_INTERNAL,
73+
.dma_alignment_bytes = 4, //legacy API behaviour is only check max dma buffer alignment
74+
};
75+
ESP_ERROR_CHECK(esp_dma_capable_malloc(sizeof(sbp_hdr_t) + buf.len, &dma_mem_info, (void*)&hdr, &actual_size));
7276

7377
hdr->len = sizeof(sbp_hdr_t) + buf.len;
7478
hdr->type = 0;

0 commit comments

Comments
 (0)