From 35960325c13aee9efd40836f54693f85919e1fac Mon Sep 17 00:00:00 2001 From: "joey.zhou" <2775152163@qq.com> Date: Wed, 19 Mar 2025 11:16:22 +0800 Subject: [PATCH 1/2] uart_adc --- zh/peripherals/machine.UART.md | 585 +++++++++++++++------------------ 1 file changed, 270 insertions(+), 315 deletions(-) diff --git a/zh/peripherals/machine.UART.md b/zh/peripherals/machine.UART.md index 50fc1b9..f0b5998 100644 --- a/zh/peripherals/machine.UART.md +++ b/zh/peripherals/machine.UART.md @@ -98,7 +98,6 @@ RX引脚 RTS引脚 CTS引脚 - 注意 @@ -106,9 +105,8 @@ uart1 引脚号124 引脚号123 - - - + NULL + NULL uart2 @@ -116,15 +114,13 @@ 引脚号31 引脚号34 引脚号33 - uart4 引脚号103 引脚号104 - - - + NULL + NULL @@ -136,7 +132,6 @@ RX引脚 RTS引脚 CTS引脚 - 注意 @@ -144,9 +139,8 @@ uart1 引脚号138 引脚号137 - - - + NULL + NULL uart2 @@ -154,15 +148,13 @@ 引脚号68 引脚号65 引脚号64 - uart4 - 引脚号82(EC200UXXAA不支持) + 引脚号82 引脚号81 - - - + NULL + NULL @@ -174,33 +166,29 @@ RX引脚 RTS引脚 CTS引脚 - 注意 - uart0(建议使用其他uart) + uart0 引脚号12 引脚号11 - - - + NULL + NULL uart1 - 引脚号63(EC200ACN_LA: 引脚号26) - 引脚号66(EC200ACN_LA: 引脚号27) - - - EC200ACN_LA模组uart1引脚号与其他型号不同 + 引脚号63 + 引脚号66 + NULL + NULL uart2 引脚号67 引脚号68 - - - + NULL + NULL @@ -212,33 +200,29 @@ RX引脚 RTS引脚 CTS引脚 - 注意 - uart0(建议使用其他uart) + uart0 引脚号12 引脚号11 - - - + NULL + NULL uart1 - 引脚号63(EC200ACN_LA: 引脚号26) - 引脚号66(EC200ACN_LA: 引脚号27) - - - EC200ACN_LA模组uart1引脚号与其他型号不同 + 引脚号63 + 引脚号66 + NULL + NULL uart2 引脚号67 引脚号68 - - - + NULL + NULL @@ -250,7 +234,6 @@ RX引脚 RTS引脚 CTS引脚 - 注意 @@ -258,25 +241,22 @@ uart0 引脚号71 引脚号72 - - - + NULL + NULL uart1 引脚号3 引脚号2 - - - + NULL + NULL uart2 引脚号32 引脚号31 - - - + NULL + NULL @@ -288,7 +268,6 @@ RX引脚 RTS引脚 CTS引脚 - 注意 @@ -296,25 +275,22 @@ uart0 引脚号71 引脚号72 - - - + NULL + NULL uart1 引脚号3 引脚号2 - - - + NULL + NULL uart2 引脚号32 引脚号31 - - - + NULL + NULL @@ -326,7 +302,6 @@ RX引脚 RTS引脚 CTS引脚 - 注意 @@ -334,25 +309,22 @@ uart0 引脚号21 引脚号20 - - - + NULL + NULL uart1 引脚号27 引脚号28 - - - + NULL + NULL uart2 引脚号50 引脚号49 - - - + NULL + NULL @@ -364,7 +336,6 @@ RX引脚 RTS引脚 CTS引脚 - 注意 @@ -372,25 +343,22 @@ uart0 引脚号39 引脚号38 - - - + NULL + NULL uart1 引脚号50 引脚号51 - - - + NULL + NULL uart2 引脚号18 引脚号17 - - - + NULL + NULL @@ -402,7 +370,6 @@ RX引脚 RTS引脚 CTS引脚 - 注意 @@ -410,9 +377,8 @@ uart1 引脚号29 引脚号28 - - - + NULL + NULL @@ -424,7 +390,6 @@ RX引脚 RTS引脚 CTS引脚 - 注意 @@ -432,33 +397,29 @@ uart0 引脚号23 引脚号22 - - - + NULL + NULL uart1 引脚号27 引脚号28 - - - + NULL + NULL uart2 引脚号64 引脚号65 - - - + NULL + NULL uart4 引脚号35 引脚号34 - - - + NULL + NULL @@ -470,7 +431,6 @@ RX引脚 RTS引脚 CTS引脚 - 注意 @@ -478,33 +438,29 @@ uart0 引脚号71 引脚号72 - - - + NULL + NULL uart1(flowctl = 0) 引脚号3 引脚号2 - - - + NULL + NULL uart1(flowctl = 1) 引脚号33 引脚号34 - - - + NULL + NULL uart2 引脚号32 引脚号31 - - - + NULL + NULL @@ -516,7 +472,6 @@ RX引脚 RTS引脚 CTS引脚 - 注意 @@ -524,9 +479,8 @@ uart1 引脚号27 引脚号28 - - - + NULL + NULL uart2 @@ -534,15 +488,13 @@ 引脚号34 引脚号37 引脚号36 - uart4 引脚号19 引脚号18 - - - + NULL + NULL @@ -554,7 +506,6 @@ RX引脚 RTS引脚 CTS引脚 - 注意 @@ -562,41 +513,36 @@ uart0 引脚号39 引脚号38 - - - + NULL + NULL uart1(flowctl = 0) 引脚号50 引脚号51 - - - + NULL + NULL uart1(flowctl = 1) 引脚号22 引脚号23 - - - EC800MCNGA 、CNGB、CNGD/ EG810MCNGA、CNGB 模块的 uart1 不可用 + NULL + NULL uart2 引脚号18 引脚号17 - - - + NULL + NULL uart4 引脚号29 引脚号28 - - - + NULL + NULL @@ -608,7 +554,6 @@ RX引脚 RTS引脚 CTS引脚 - 注意 @@ -616,41 +561,36 @@ uart0 引脚号39 引脚号38 - - - + NULL + NULL uart1(flowctl = 0) 引脚号50 引脚号51 - - - + NULL + NULL uart1(flowctl = 1) 引脚号22 引脚号23 - - - EC800MCNGA 、CNGB、CNGD/ EG810MCNGA、CNGB 模块的 uart1 不可用 + NULL + NULL uart2 引脚号18 引脚号17 - - - + NULL + NULL uart4 引脚号29 引脚号28 - - - + NULL + NULL @@ -662,7 +602,6 @@ RX引脚 RTS引脚 CTS引脚 - 注意 @@ -670,33 +609,29 @@ uart0 引脚号23 引脚号22 - - - + NULL + NULL uart1(flowctl = 0) 引脚号27 引脚号28 - - - + NULL + NULL uart1(flowctl = 1) 引脚号36 引脚号37 - - - + NULL + NULL uart2 引脚号35 引脚号34 - - - + NULL + NULL @@ -708,7 +643,6 @@ RX引脚 RTS引脚 CTS引脚 - 注意 @@ -716,25 +650,22 @@ uart0 引脚号71 引脚号72 - - - + NULL + NULL uart1 引脚号70 引脚号69 - - - EC600ECN_LE&LQ不可用 + NULL + NULL uart2 引脚号32 引脚号31 - - - + NULL + NULL @@ -746,7 +677,6 @@ RX引脚 RTS引脚 CTS引脚 - 注意 @@ -754,25 +684,22 @@ uart0 引脚号39 引脚号38 - - - + NULL + NULL uart1 引脚号29 引脚号28 - - - + NULL + NULL uart2 引脚号18 引脚号17 - - - + NULL + NULL @@ -784,7 +711,6 @@ RX引脚 RTS引脚 CTS引脚 - 注意 @@ -792,9 +718,8 @@ uart0 引脚号124 引脚号123 - - - + NULL + NULL uart2 @@ -802,31 +727,27 @@ 引脚号31 引脚34 引脚33 - uart4 引脚号116 引脚号9 - - - + NULL + NULL uart5 引脚号125 引脚号126 - - - + NULL + NULL uart6 引脚号106 引脚号105 - - - + NULL + NULL @@ -838,7 +759,6 @@ RX引脚 RTS引脚 CTS引脚 - 注意 @@ -846,33 +766,29 @@ uart1 引脚号29 引脚号28 - - - + NULL + NULL uart2 引脚号18 引脚号17 - - - + NULL + NULL uart5 引脚号23 引脚号22 - - - + NULL + NULL uart6 引脚号86 引脚号83 - - - + NULL + NULL @@ -884,7 +800,6 @@ RX引脚 RTS引脚 CTS引脚 - 注意 @@ -892,9 +807,8 @@ uart1 引脚号27 引脚号28 - - - + NULL + NULL uart2 @@ -902,15 +816,13 @@ 引脚号34 引脚号37 引脚号36 - uart4 引脚号19 引脚号18 - - - EG912UGL_AA不可用 + NULL + NULL @@ -922,7 +834,6 @@ RX引脚 RTS引脚 CTS引脚 - 注意 @@ -930,33 +841,29 @@ uart0 引脚号71 引脚号72 - - - + NULL + NULL uart1(flowctl = 0) 引脚号3 引脚号2 - - - + NULL + NULL uart1(flowctl = 1) 引脚号33 引脚号34 - - - + NULL + NULL uart2 引脚号32 引脚号31 - - - + NULL + NULL @@ -968,7 +875,6 @@ RX引脚 RTS引脚 CTS引脚 - 注意 @@ -976,33 +882,29 @@ uart0 引脚号39 引脚号38 - - - + NULL + NULL uart1(flowctl = 0) 引脚号50 引脚号51 - - - EG800KCN不可用 + NULL + NULL uart1(flowctl = 1) 引脚号22 引脚号23 - - - EG800KCN不可用 + NULL + NULL uart2 引脚号18 引脚号17 - - - + NULL + NULL @@ -1014,7 +916,6 @@ RX引脚 RTS引脚 CTS引脚 - 注意 @@ -1022,33 +923,29 @@ uart0 引脚号39 引脚号38 - - - + NULL + NULL uart1(flowctl = 0) 引脚号50 引脚号51 - - - EG800KCN不可用 + NULL + NULL uart1(flowctl = 1) 引脚号22 引脚号23 - - - EG800KCN不可用 + NULL + NULL uart2 引脚号18 引脚号17 - - - + NULL + NULL @@ -1060,7 +957,6 @@ RX引脚 RTS引脚 CTS引脚 - 注意 @@ -1068,17 +964,15 @@ uart0 引脚号39 引脚号38 - - - + NULL + NULL uart1 引脚号22 引脚号23 - - - + NULL + NULL uart2 @@ -1086,15 +980,13 @@ 引脚号17 引脚23 引脚22 - uart3 引脚号29 引脚号28 - - - + NULL + NULL @@ -1106,7 +998,6 @@ RX引脚 RTS引脚 CTS引脚 - 注意 @@ -1114,17 +1005,15 @@ uart0 引脚号27 引脚号26 - - - + NULL + NULL uart1 引脚号20 引脚号19 - - - + NULL + NULL @@ -1136,7 +1025,6 @@ RX引脚 RTS引脚 CTS引脚 - 注意 @@ -1144,17 +1032,15 @@ uart1 引脚号35 引脚号34 - - - + NULL + NULL uart2 引脚号28 引脚号27 - - - + NULL + NULL @@ -1166,7 +1052,6 @@ RX引脚 RTS引脚 CTS引脚 - 注意 @@ -1174,9 +1059,8 @@ uart0 引脚号21 引脚号22 - - - + NULL + NULL @@ -1188,7 +1072,6 @@ RX引脚 RTS引脚 CTS引脚 - 注意 @@ -1196,9 +1079,8 @@ uart0 引脚号22 引脚号21 - - - + NULL + NULL @@ -1210,7 +1092,6 @@ RX引脚 RTS引脚 CTS引脚 - 注意 @@ -1218,17 +1099,15 @@ uart0 引脚号23 引脚号22 - - - + NULL + NULL uart1 引脚号27 引脚号28 - - - + NULL + NULL uart2 @@ -1236,15 +1115,13 @@ 引脚号34 引脚号36 引脚号37 - uart4 引脚号36 引脚号37 - - - EG915NEU_AG不支持 + NULL + NULL @@ -1256,7 +1133,6 @@ RX引脚 RTS引脚 CTS引脚 - 注意 @@ -1264,33 +1140,100 @@ uart0 引脚号39 引脚号38 - - - + NULL + NULL uart1 引脚号29 引脚号28 - - - + NULL + NULL uart2 引脚号18 引脚号17 - - - + NULL + NULL +
+
+
+

注意:

+

uart0不建议使用

+

EC200ACN_LA模组uart1引脚号与其他型号不同:

+

TX:引脚号26

+

RX:引脚号27

+
+
+ +
+
+

注意:

+

uart0不建议使用

+
+
+ +
+
+

注意:

+

EC800MCNGA 、CNGB、CNGD模块的uart1 不可用

+
+
+ +
+
+

注意:

+

EG810MCNGA、CNGB模块的uart1 不可用

+
+
+ +
+
+

注意:

+

EG800KCN模块的uart1不可用

+
+
+ +
+
+

注意:

+

EG915NEU_AG模块的uart4不可用

+
+
+ +
+
+

注意:

+

EC200UXXAA模组uart4不可用

+
+
+ +
+
+

注意:

+

EC600ECN_LE&LQ模组uart1不可用

+
+
+ +
+
+

注意:

+

EG912UGL_AA模组uart4不可用

+
+
+
+
+

使用UART4需要先调用modem.main_uart_enable_set(1)使能UART4,重启生效,如下

+
+

uart1在flowctl = 1时,仅将uart1映射到不同的引脚,未开启流控功能。

+
+

UART2被初始化后交互口将无法使用,需要在代码中执行uart2.close()或者重启模组才可继续使用交互口。

+
+

UART1被初始化后交互口将无法使用,需要在代码中执行uart1.close()或者重启模组才可继续使用交互口。

+
@@ -1389,7 +1338,7 @@ uart.close() 成功返回整型值`0`,失败返回整型值`-1`。
-
+

uart.control_485

uart.control_485(UART.GPIOn, direction)
 
@@ -1407,6 +1356,12 @@ uart.close()
from machine import UART
uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
art1.control_485(UART.GPIO24, 1)
+ +
+

uart.control_485

+

该型号不支持此API

+
+
### `uart.set_callback` -- Gitee From 74d819ffa49b2b22968d62d390b71219200366ca Mon Sep 17 00:00:00 2001 From: "joey.zhou" <2775152163@qq.com> Date: Wed, 19 Mar 2025 11:21:09 +0800 Subject: [PATCH 2/2] uart_adc --- en/peripherals/machine.UART.md | 586 +++++++++++++++------------------ 1 file changed, 271 insertions(+), 315 deletions(-) diff --git a/en/peripherals/machine.UART.md b/en/peripherals/machine.UART.md index f699449..98319e1 100644 --- a/en/peripherals/machine.UART.md +++ b/en/peripherals/machine.UART.md @@ -66,7 +66,6 @@ This class transmits data through the UART. RX pin RTS pin CTS pin - Attention @@ -74,9 +73,8 @@ This class transmits data through the UART. UART1 pin124 pin123 - - - + NULL + NULL UART2 @@ -84,15 +82,13 @@ This class transmits data through the UART. pin31 pin34 pin33 - UART4 pin103 pin104 - - - + NULL + NULL @@ -104,7 +100,6 @@ This class transmits data through the UART. RX pin RTS pin CTS pin - Attention @@ -112,9 +107,8 @@ This class transmits data through the UART. UART1 pin138 pin137 - - - + NULL + NULL UART2 @@ -122,15 +116,13 @@ This class transmits data through the UART. pin68 pin65 pin64 - UART4 - pin82(EC200UXXAA is not supported.) + pin82 pin81 - - - + NULL + NULL @@ -142,33 +134,29 @@ This class transmits data through the UART. RX pin RTS pin CTS pin - Attention - UART0(The use of other Uarts is recommended.) + UART0 pin12 pin11 - - - + NULL + NULL UART1 - pin63(EC200ACN_LA: pin26) - pin66(EC200ACN_LA: pin27) - - - EC200ACN_LA module uart1 pin is different from other models. + pin63 + pin66 + NULL + NULL UART2 pin67 pin68 - - - + NULL + NULL @@ -180,33 +168,29 @@ This class transmits data through the UART. RX pin RTS pin CTS pin - Attention - UART0(The use of other Uarts is recommended.) + UART0 pin12 pin11 - - - + NULL + NULL UART1 - pin63(EC200ACN_LA: pin26) - pin66(EC200ACN_LA: pin27) - - - EC200ACN_LA module uart1 pin is different from other models. + pin63 + pin66 + NULL + NULL UART2 pin67 pin68 - - - + NULL + NULL @@ -218,7 +202,6 @@ This class transmits data through the UART. RX pin RTS pin CTS pin - Attention @@ -226,25 +209,22 @@ This class transmits data through the UART. UART0 pin71 pin72 - - - + NULL + NULL UART1 pin3 pin2 - - - + NULL + NULL UART2 pin32 pin31 - - - + NULL + NULL @@ -256,7 +236,6 @@ This class transmits data through the UART. RX pin RTS pin CTS pin - Attention @@ -264,25 +243,22 @@ This class transmits data through the UART. UART0 pin71 pin72 - - - + NULL + NULL UART1 pin3 pin2 - - - + NULL + NULL UART2 pin32 pin31 - - - + NULL + NULL @@ -294,7 +270,6 @@ This class transmits data through the UART. RX pin RTS pin CTS pin - Attention @@ -302,25 +277,22 @@ This class transmits data through the UART. UART0 pin21 pin20 - - - + NULL + NULL UART1 pin27 pin28 - - - + NULL + NULL UART2 pin50 pin49 - - - + NULL + NULL @@ -332,7 +304,6 @@ This class transmits data through the UART. RX pin RTS pin CTS pin - Attention @@ -340,25 +311,22 @@ This class transmits data through the UART. UART0 pin39 pin38 - - - + NULL + NULL UART1 pin50 pin51 - - - + NULL + NULL UART2 pin18 pin17 - - - + NULL + NULL @@ -370,7 +338,6 @@ This class transmits data through the UART. RX pin RTS pin CTS pin - Attention @@ -378,9 +345,8 @@ This class transmits data through the UART. UART1 pin29 pin28 - - - + NULL + NULL @@ -392,7 +358,6 @@ This class transmits data through the UART. RX pin RTS pin CTS pin - Attention @@ -400,33 +365,29 @@ This class transmits data through the UART. UART0 pin23 pin22 - - - + NULL + NULL UART1 pin27 pin28 - - - + NULL + NULL UART2 pin64 pin65 - - - + NULL + NULL UART4 pin35 pin34 - - - + NULL + NULL @@ -438,7 +399,6 @@ This class transmits data through the UART. RX pin RTS pin CTS pin - Attention @@ -446,33 +406,29 @@ This class transmits data through the UART. UART0 pin71 pin72 - - - + NULL + NULL UART1(flowctl = 0) pin3 pin2 - - - + NULL + NULL UART1(flowctl = 1) pin33 pin34 - - - + NULL + NULL UART2 pin32 pin31 - - - + NULL + NULL @@ -484,7 +440,6 @@ This class transmits data through the UART. RX pin RTS pin CTS pin - Attention @@ -492,9 +447,8 @@ This class transmits data through the UART. UART1 pin27 pin28 - - - + NULL + NULL UART2 @@ -502,15 +456,13 @@ This class transmits data through the UART. pin34 pin37 pin36 - UART4 pin19 pin18 - - - + NULL + NULL @@ -522,7 +474,6 @@ This class transmits data through the UART. RX pin RTS pin CTS pin - Attention @@ -530,41 +481,36 @@ This class transmits data through the UART. UART0 pin39 pin38 - - - + NULL + NULL UART1(flowctl = 0) pin50 pin51 - - - + NULL + NULL UART1(flowctl = 1) pin22 pin23 - - - Uart1 is not available for EC800MCNGA, CNGB, CNGD/ EG810MCNGA, and CNGB modules. + NULL + NULL UART2 pin18 pin17 - - - + NULL + NULL UART4 pin29 pin28 - - - + NULL + NULL @@ -576,7 +522,6 @@ This class transmits data through the UART. RX pin RTS pin CTS pin - Attention @@ -584,41 +529,36 @@ This class transmits data through the UART. UART0 pin39 pin38 - - - + NULL + NULL UART1(flowctl = 0) pin50 pin51 - - - + NULL + NULL UART1(flowctl = 1) pin22 pin23 - - - Uart1 is not available for EC800MCNGA, CNGB, CNGD/ EG810MCNGA, and CNGB modules. + NULL + NULL UART2 pin18 pin17 - - - + NULL + NULL UART4 pin29 pin28 - - - + NULL + NULL @@ -630,7 +570,6 @@ This class transmits data through the UART. RX pin RTS pin CTS pin - Attention @@ -638,33 +577,29 @@ This class transmits data through the UART. UART0 pin23 pin22 - - - + NULL + NULL UART1(flowctl = 0) pin27 pin28 - - - + NULL + NULL UART1(flowctl = 1) pin36 pin37 - - - + NULL + NULL UART2 pin35 pin34 - - - + NULL + NULL @@ -676,7 +611,6 @@ This class transmits data through the UART. RX pin RTS pin CTS pin - Attention @@ -684,25 +618,22 @@ This class transmits data through the UART. UART0 pin71 pin72 - - - + NULL + NULL UART1 pin70 pin69 - - - EC600ECN_LE&LQ is not available. + NULL + NULL UART2 pin32 pin31 - - - + NULL + NULL @@ -714,7 +645,6 @@ This class transmits data through the UART. RX pin RTS pin CTS pin - Attention @@ -722,25 +652,22 @@ This class transmits data through the UART. UART0 pin39 pin38 - - - + NULL + NULL UART1 pin29 pin28 - - - + NULL + NULL UART2 pin18 pin17 - - - + NULL + NULL @@ -752,7 +679,6 @@ This class transmits data through the UART. RX pin RTS pin CTS pin - Attention @@ -760,9 +686,8 @@ This class transmits data through the UART. UART0 pin124 pin123 - - - + NULL + NULL UART2 @@ -770,31 +695,27 @@ This class transmits data through the UART. pin31 pin34 pin33 - UART4 pin116 pin9 - - - + NULL + NULL UART5 pin125 pin126 - - - + NULL + NULL UART6 pin106 pin105 - - - + NULL + NULL @@ -806,7 +727,6 @@ This class transmits data through the UART. RX pin RTS pin CTS pin - Attention @@ -814,33 +734,29 @@ This class transmits data through the UART. UART1 pin29 pin28 - - - + NULL + NULL UART2 pin18 pin17 - - - + NULL + NULL UART5 pin23 pin22 - - - + NULL + NULL UART6 pin86 pin83 - - - + NULL + NULL @@ -852,7 +768,6 @@ This class transmits data through the UART. RX pin RTS pin CTS pin - Attention @@ -860,9 +775,8 @@ This class transmits data through the UART. UART1 pin27 pin28 - - - + NULL + NULL UART2 @@ -870,15 +784,13 @@ This class transmits data through the UART. pin34 pin37 pin36 - UART4 pin19 pin18 - - - EG912UGL_AA is not available. + NULL + NULL @@ -890,7 +802,6 @@ This class transmits data through the UART. RX pin RTS pin CTS pin - Attention @@ -898,33 +809,29 @@ This class transmits data through the UART. UART0 pin71 pin72 - - - + NULL + NULL UART1(flowctl = 0) pin3 pin2 - - - + NULL + NULL UART1(flowctl = 1) pin33 pin34 - - - + NULL + NULL UART2 pin32 pin31 - - - + NULL + NULL @@ -936,7 +843,6 @@ This class transmits data through the UART. RX pin RTS pin CTS pin - Attention @@ -944,33 +850,29 @@ This class transmits data through the UART. UART0 pin39 pin38 - - - + NULL + NULL UART1(flowctl = 0) pin50 pin51 - - - EG800KCN is not available. + NULL + NULL UART1(flowctl = 1) pin22 pin23 - - - EG800KCN is not available. + NULL + NULL UART2 pin18 pin17 - - - + NULL + NULL @@ -982,7 +884,6 @@ This class transmits data through the UART. RX pin RTS pin CTS pin - Attention @@ -990,33 +891,29 @@ This class transmits data through the UART. UART0 pin39 pin38 - - - + NULL + NULL UART1(flowctl = 0) pin50 pin51 - - - EG800KCN is not available. + NULL + NULL UART1(flowctl = 1) pin22 pin23 - - - EG800KCN is not available. + NULL + NULL UART2 pin18 pin17 - - - + NULL + NULL @@ -1028,7 +925,6 @@ This class transmits data through the UART. RX pin RTS pin CTS pin - Attention @@ -1036,17 +932,15 @@ This class transmits data through the UART. UART0 pin39 pin38 - - - + NULL + NULL UART1 pin22 pin23 - - - + NULL + NULL UART2 @@ -1054,15 +948,13 @@ This class transmits data through the UART. pin17 pin23 pin22 - UART3 pin29 pin28 - - - + NULL + NULL @@ -1074,7 +966,6 @@ This class transmits data through the UART. RX pin RTS pin CTS pin - Attention @@ -1082,17 +973,15 @@ This class transmits data through the UART. UART0 pin27 pin26 - - - + NULL + NULL UART1 pin20 pin19 - - - + NULL + NULL @@ -1104,7 +993,6 @@ This class transmits data through the UART. RX pin RTS pin CTS pin - Attention @@ -1112,17 +1000,15 @@ This class transmits data through the UART. UART1 pin35 pin34 - - - + NULL + NULL UART2 pin28 pin27 - - - + NULL + NULL @@ -1134,7 +1020,6 @@ This class transmits data through the UART. RX pin RTS pin CTS pin - Attention @@ -1142,9 +1027,8 @@ This class transmits data through the UART. UART0 pin21 pin22 - - - + NULL + NULL @@ -1156,7 +1040,6 @@ This class transmits data through the UART. RX pin RTS pin CTS pin - Attention @@ -1164,9 +1047,8 @@ This class transmits data through the UART. UART0 pin22 pin21 - - - + NULL + NULL @@ -1178,7 +1060,6 @@ This class transmits data through the UART. RX pin RTS pin CTS pin - Attention @@ -1186,17 +1067,15 @@ This class transmits data through the UART. UART0 pin23 pin22 - - - + NULL + NULL UART1 pin27 pin28 - - - + NULL + NULL UART2 @@ -1204,15 +1083,13 @@ This class transmits data through the UART. pin34 pin36 pin37 - UART4 pin36 pin37 - - - Not supported by EG915NEU_AG. + NULL + NULL @@ -1224,7 +1101,6 @@ This class transmits data through the UART. RX pin RTS pin CTS pin - Attention @@ -1232,33 +1108,101 @@ This class transmits data through the UART. UART0 pin39 pin38 - - - + NULL + NULL UART1 pin29 pin28 - - - + NULL + NULL UART2 pin18 pin17 - - - + NULL + NULL
+
+
+
+

Attention:

+

Uart0 is not recommended

+

EC200ACN_LA module uart1 pin number is different from other models:

+

TX: Pin26

+

RX: Pin27

+
+
+ +
+
+

Attention:

+

Uart0 is not recommended

+
+
+ +
+
+

Attention:

+

Uart1 for EC800MCNGA, CNGB, and CNGD modules is not available

+
+
+ +
+
+

Attention:

+

Uart1 for EG810MCNGA, CNGB modules is not available

+
+
+ +
+
+

Attention:

+

The uart1 of the EG800KCN module is not available

+
+
+ +
+
+

Attention:

+

The uart4 of the EG915NEU_AG module is not available

+
+
+ +
+
+

Attention:

+

EC200UXXAA module uart4 is not available

+
+
+ +
+
+

Attention:

+

EC600ECN_LE&LQ module uart1 is not available

+
+
+ +
+
+

Attention:

+

EG912UGL_AA module uart4 is not available

+
+
+ +
+
+

To use UART4, you need to call modem.main_uart_enable_set(1) to enable UART4, and restart it as follows

+
    import modem
     # Get Main UART enabled status 1-enabled, 0-not enabled
    @@ -1270,16 +1214,22 @@ modem.main_uart_enable_set(1)
     
+

When flowctl = 1, uart1 only maps uart1 to different pins and does not turn on the flow control function.

+
+

UART2 is initialized after the interaction port will not be used, you need to execute uart2.close() in the code or restart the module to continue to use the interaction port.

+
+

UART1 is initialized after the interaction port will not be used, you need to execute uart1.close() in the code or restart the module to continue to use the interaction port.

+
@@ -1359,7 +1309,7 @@ This method disables the UART. `-1` - Failed execution
-
+

uart.control_485

uart.control_485(UART.GPIOn, direction)
 
@@ -1377,6 +1327,12 @@ This method disables the UART.
from machine import UART
uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
art1.control_485(UART.GPIO24, 1)
+ +
+

uart.control_485

+

This API is not supported by this model

+
+
### `uart.set_callback` -- Gitee