Skip to content

Commit 0a30a30

Browse files
authored
Merge pull request zephyrproject-rtos#5 from ccli8/nvt_m467_esp8266
drivers: wifi: esp8266: numaker: Support numaker_pfm_m467 board
2 parents 9e8a7b4 + 3ea7b68 commit 0a30a30

File tree

3 files changed

+52
-1
lines changed

3 files changed

+52
-1
lines changed

boards/arm/numaker_pfm_m467/numaker_pfm_m467.dts

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
chosen {
2626
zephyr,console = &uart0;
27-
zephyr,shell = &uart0;
27+
zephyr,shell-uart = &uart0;
2828
zephyr,sram = &sram0;
2929
zephyr,flash = &flash0;
3030
zephyr,code-partition = &slot0_partition;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
# Without enable, ESP8266 shield will continuously push data to board (+IPD) anyway
4+
# on receive and board's Rx buffer can get OOM easily. However, current driver
5+
# implementation on Passive Receive mode has the following concerns:
6+
# 1. On <conn_id>,CLOSED, driver closes the socket prematurely and buffered Rx data on
7+
# ESP8266 shield gets unable to fetch (AT+RECVDATA).
8+
# NOTE: To re-produce the issue, go samples/net/sockets/http_get in which the server
9+
# end will close the connection immediately after replying the http response.
10+
# 2. On +IPD, driver doesn't consider available Rx buffer and straight schedules to fetch
11+
# buffered Rx data on ESP8266 shield, still causing Rx buffer OOM. One approach may
12+
# pre-allocate Rx buffer before the schedule.
13+
# NOTE: To re-produce the issue, go samples/net/sockets/big_http_download/src, adding
14+
# delay e.g. k_msleep(8000) in the download() while loop.
15+
# NOTE: With or without this feature enabled, esp_socket_prepare_pkt() enabling timed
16+
# wait (CONFIG_WIFI_ESP_AT_RX_NET_PKT_ALLOC_TIMEOUT) can relieve the problem to
17+
# some degree.
18+
#
19+
# See: https://github.com/zephyrproject-rtos/zephyr/issues/52702
20+
#CONFIG_WIFI_ESP_AT_PASSIVE_MODE=y
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/* SPDX-License-Identifier: Apache-2.0 */
2+
3+
&pinctrl {
4+
uart2_esp8266: uart2_esp8266 {
5+
pinmux = <PC1MFP_UART2_TXD 0x0000>, /* UART2 TX */
6+
<PC0MFP_UART2_RXD 0x0000>, /* UART2 RX */
7+
<PC3MFP_UART2_nRTS 0x0000>, /* UART2 RTS */
8+
<PC2MFP_UART2_nCTS 0x0000>; /* UART2 CTS */
9+
};
10+
};
11+
12+
&uart2 {
13+
status = "okay";
14+
current-speed = <115200>;
15+
hw-flow-control;
16+
17+
pinctrl-0 = <&uart2_esp8266>;
18+
pinctrl-names = "default";
19+
20+
esp8266: esp8266 {
21+
compatible = "espressif,esp-at";
22+
label = "esp8266";
23+
status = "okay";
24+
target-speed = <115200>;
25+
reset-gpios = <&gpioc 4 GPIO_ACTIVE_LOW>;
26+
};
27+
};
28+
29+
&gpioc {
30+
status = "okay";
31+
};

0 commit comments

Comments
 (0)