From 509080a87d075b909e5b896fbb017eff67c299b8 Mon Sep 17 00:00:00 2001 From: Tangxiulin <11016272+ha-ha-earl@user.noreply.gitee.com> Date: Tue, 19 Aug 2025 19:17:36 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=A2=9E=E5=8A=A0sony=E7=9A=84bsp=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/peripherals/machine.I2C.md | 56 +++++++++++++++++++++++++++++++++- en/peripherals/machine.Pin.md | 9 ++++++ en/peripherals/machine.SPI.md | 36 ++++++++++++++++++++++ en/peripherals/machine.UART.md | 38 +++++++++++++++++++++++ en/peripherals/misc.ADC.md | 39 +++++++++++++++++++++++ en/peripherals/misc.PWM.md | 8 +++-- zh/peripherals/machine.I2C.md | 53 +++++++++++++++++++++++++++++++- zh/peripherals/machine.Pin.md | 9 ++++++ zh/peripherals/machine.SPI.md | 35 +++++++++++++++++++++ zh/peripherals/machine.UART.md | 40 +++++++++++++++++++++++- zh/peripherals/misc.ADC.md | 38 +++++++++++++++++++++++ zh/peripherals/misc.PWM.md | 7 +++-- 12 files changed, 359 insertions(+), 9 deletions(-) diff --git a/en/peripherals/machine.I2C.md b/en/peripherals/machine.I2C.md index 8df3ab7..a8f404e 100644 --- a/en/peripherals/machine.I2C.md +++ b/en/peripherals/machine.I2C.md @@ -89,11 +89,24 @@ This class is designed for the two-wire serial protocol for communication betwee + +
+
class machine.I2C(I2Cn, MODE)
+
+

Parameter:

+ +
+
-
+

Example:


 >>> from machine import I2C
@@ -675,6 +688,23 @@ This class is designed for the two-wire serial protocol for communication betwee
 
 
 
+
+
+
+  
+  
+  
+
+
+
+
+  
+  
+  
+
+
+
I2CSCLSDA
I2C0pin40pin41
+
## Methods @@ -1376,4 +1406,28 @@ if __name__ == '__main__': + + + + + + + + + + + + + + + + + + + + + + +
ConstantDescription
I2C.I2C0I2C passage index number: 0
I2C.STANDARD_MODEStandard mode
I2C.FAST_MODEFast mode
+
\ No newline at end of file diff --git a/en/peripherals/machine.Pin.md b/en/peripherals/machine.Pin.md index 652f01e..af4e87e 100644 --- a/en/peripherals/machine.Pin.md +++ b/en/peripherals/machine.Pin.md @@ -3567,8 +3567,17 @@ class machine.Pin(GPIOn, direction, pullMode, level)

Note:

1.Pin37-GPIO11,Pin38-GPIO12,Pin39-GPIO13,Module that support GNSS function do not enable the multiplexing function of this pin and it need to be left open.

+

2.When using the (U)SIM2 function, Pin1, Pin2 and Pin4 can no longer be used as GPIOs.

+ +
+
+

Note:

+

1.There is a hardware conflict between GPIO27-Pin53, GPIO28-Pin52, GPIO29-Pin51 and Pin145 to Pin147. If the pins Pin145 to Pin147 of the (U)SIM2 interface are used, then pins Pin51 to Pin53 cannot be used as GPIO.

+
+
+ diff --git a/en/peripherals/machine.SPI.md b/en/peripherals/machine.SPI.md index 13de26d..ec6d79c 100644 --- a/en/peripherals/machine.SPI.md +++ b/en/peripherals/machine.SPI.md @@ -129,9 +129,23 @@ This class provides bus protocol of serial peripheral interface (SPI) .
  • mode - SPI working mode.
    Clock polarity CPOL: The pin level of clock signal SCLK when SPI is idle (0: low level; 1: high level)
    0CPOL=0, CPHA=0
    1CPOL=0, CPHA=1
    2CPOL=1, CPHA=0
    3CPOL=1, CPHA=1

  • clk - Clock frequency.
    0500kHz
    11MHz
    25MHz
    310MHz
    420MHz

    +
  • +
    +
    class machine.SPI(spi, mode, clk, [group])
    +
    +

    Parameter:

    + +
    @@ -908,6 +922,28 @@ This class provides bus protocol of serial peripheral interface (SPI) . + + + + + + + + + + + + + + + + + + + + +
    SPICSCLKMOSIMISO
    spi0 pin86 pin85 pin88 pin87
    + ## Methods diff --git a/en/peripherals/machine.UART.md b/en/peripherals/machine.UART.md index bec8ed7..45bbc27 100644 --- a/en/peripherals/machine.UART.md +++ b/en/peripherals/machine.UART.md @@ -87,6 +87,23 @@ This class transmits data through the UART. + +
    +
    class machine.UART(UART.UARTn, baudrate, databits, parity, stopbits, flowctl)
    +
    +

    Parametric Description:

    + +
    + **UART Pin Correspondences:** @@ -1072,6 +1089,27 @@ This class transmits data through the UART. + + + + + + + + + + + + + + + + + + + +
    UART numberTX pinRX pinRTS pinCTS pin
    UART2pin35pin34NULLNULL
    +
    diff --git a/en/peripherals/misc.ADC.md b/en/peripherals/misc.ADC.md index 1534d2e..f8cd3b1 100644 --- a/en/peripherals/misc.ADC.md +++ b/en/peripherals/misc.ADC.md @@ -530,6 +530,26 @@ If successful, a specified channel voltage value is returned. + + + + + + + + + + + + + + + + + + +
    ADC numberPin correspondence
    ADC0Pin number24
    ADC1Pin number2
    +
    ### ADC.close @@ -1018,4 +1038,23 @@ ADC.close() + + + + + + + + + + + + + + + + + +
    ConstantDescription
    ADC.ADC0ADC channel 0
    ADC.ADC1ADC channel 1
    + \ No newline at end of file diff --git a/en/peripherals/misc.PWM.md b/en/peripherals/misc.PWM.md index a61f08a..fe74381 100644 --- a/en/peripherals/misc.PWM.md +++ b/en/peripherals/misc.PWM.md @@ -74,6 +74,8 @@ The corresponding pins of EG915N module for PWM0-PWM3 are as follow:
    PWM0 The corresponding pins of EC800K module for PWM0-PWM3 are as follow:
    PWM1 – pin78
    PWM2 – pin83 +The corresponding pins of BG950S module for PWM0-PWM2 are as follow:
    PWM0 – pin66
    PWM1 – pin38
    PWM2 – pin30 + ## Methods ### `PWM.open` @@ -163,7 +165,7 @@ if __name__ == '__main__': | Constant | Description | Module | | -------- | ----------- | ------------------------------------------------------------ | -| PWM.PWM0 | PWM0 | EC600S / EC600N / EC100Y/EC600U/EC200U/EC800N/EC600M/EG915U/EC800M/EG912N/EG912U/EG915N | -| PWM.PWM1 | PWM1 | EC600S / EC600N / EC100Y/EC800N/EC600M/EC800M/EG912N/EG915N/EC800K | -| PWM.PWM2 | PWM2 | EC600S / EC600N / EC100Y/EC800N/EC600M/EC800M/EG912N/EG915N/EC800K | +| PWM.PWM0 | PWM0 | EC600S / EC600N / EC100Y/EC600U/EC200U/EC800N/EC600M/EG915U/EC800M/EG912N/EG912U/EG915N/BG950S | +| PWM.PWM1 | PWM1 | EC600S / EC600N / EC100Y/EC800N/EC600M/EC800M/EG912N/EG915N/EC800K/BG950S | +| PWM.PWM2 | PWM2 | EC600S / EC600N / EC100Y/EC800N/EC600M/EC800M/EG912N/EG915N/EC800K/BG950S | | PWM.PWM3 | PWM3 | EC600S / EC600N / EC100Y/EC800N/EC600M/EC800M/EG912N/EG915N | \ No newline at end of file diff --git a/zh/peripherals/machine.I2C.md b/zh/peripherals/machine.I2C.md index 42fa83b..4f75353 100644 --- a/zh/peripherals/machine.I2C.md +++ b/zh/peripherals/machine.I2C.md @@ -91,8 +91,20 @@ +
    +
    class machine.I2C(I2Cn, MODE)
    +
    +

    参数描述:

    + +
    +
    -
    +

    示例:

    >>> from machine import I2C
     >>> # 创建I2C对象
    @@ -673,6 +685,23 @@
     
     
     
    +
    +
    +
    +  
    +  
    +  
    +
    +
    +
    +
    +  
    +  
    +  
    +
    +
    +
    I2C编号SCL引脚SDA引脚
    I2C0引脚40引脚41
    +
    @@ -1361,6 +1390,28 @@ if __name__ == '__main__': + + + + + + + + + + + + + + + + + + + + + +
    常量说明
    I2C.I2C0I2C通路索引号: 0
    I2C.STANDARD_MODE标准模式
    I2C.FAST_MODE快速模式
    \ No newline at end of file diff --git a/zh/peripherals/machine.Pin.md b/zh/peripherals/machine.Pin.md index b116aee..754f6ca 100644 --- a/zh/peripherals/machine.Pin.md +++ b/zh/peripherals/machine.Pin.md @@ -3567,8 +3567,17 @@ class machine.Pin(GPIOn, direction, pullMode, level)

    注:

    1.Pin37-GPIO11,Pin38-GPIO12,Pin39-GPIO13,支持GNSS的模块不会启用此引脚的复用功能,因此该引脚需要保持处于断开状态。

    +

    2.Pin1、Pin2、Pin4在使用(U)SIM2功能时,不能再作为GPIO使用。

    + +
    +
    +

    注:

    +

    1.GPIO27-Pin53、GPIO28-Pin52、GPIO29-Pin51与Pin145~Pin147有硬件冲突。如使用(U)SIM2接口的Pin145~Pin147引脚,则引脚Pin51~Pin53不能用作GPIO。

    +
    +
    + ## 方法 diff --git a/zh/peripherals/machine.SPI.md b/zh/peripherals/machine.SPI.md index e20d303..85b5f20 100644 --- a/zh/peripherals/machine.SPI.md +++ b/zh/peripherals/machine.SPI.md @@ -141,6 +141,21 @@ + +
    +
    class machine.SPI(spi, mode, clk)
    +
    +

    参数描述:

    +
    +
    + @@ -919,6 +934,26 @@ + + + + + + + + + + + + + + + + + + + +
    SPI通道CS引脚CLK引脚MOSI引脚MISO引脚
    spi0引脚86引脚85引脚88引脚87
    diff --git a/zh/peripherals/machine.UART.md b/zh/peripherals/machine.UART.md index 44b3034..2745d98 100644 --- a/zh/peripherals/machine.UART.md +++ b/zh/peripherals/machine.UART.md @@ -119,6 +119,23 @@ + +
    +
    class machine.UART(UART.UARTn, baudrate, databits, parity, stopbits, flowctl)
    +
    +

    参数描述:

    + +
    + **UART引脚对应关系 :** @@ -880,7 +897,7 @@ uart1(group = 2) - 引脚号27 + 引脚号29 引脚号28 NULL NULL @@ -1104,6 +1121,27 @@ + + + + + + + + + + + + + + + + + + + +
    uart编号TX引脚RX引脚RTS引脚CTS引脚
    uart2引脚号35引脚号34NULLNULL
    +
    diff --git a/zh/peripherals/misc.ADC.md b/zh/peripherals/misc.ADC.md index 054772c..beef8f3 100644 --- a/zh/peripherals/misc.ADC.md +++ b/zh/peripherals/misc.ADC.md @@ -536,6 +536,25 @@ ADC.close() + + + + + + + + + + + + + + + + + +
    ADC编号引脚对应
    ADC0引脚号24
    ADC1引脚号2
    +
    ## 常量 @@ -1012,4 +1031,23 @@ ADC.close() + + + + + + + + + + + + + + + + + +
    常量说明
    ADC.ADC0ADC通道0
    ADC.ADC1ADC通道1
    + \ No newline at end of file diff --git a/zh/peripherals/misc.PWM.md b/zh/peripherals/misc.PWM.md index 4f8bf80..bf8a3c2 100644 --- a/zh/peripherals/misc.PWM.md +++ b/zh/peripherals/misc.PWM.md @@ -84,6 +84,7 @@ pwm1 = PWM_V2(PWM_V2.PWM1, 100.0, 50)#频率100Hz,占空比50% | EC800K/EG800K | PWM1 – 引脚号78
    PWM2 – 引脚号83 | | FCM360W | PWM0 – 引脚号13
    PWM1 – 引脚号14
    PWM2 – 引脚号15
    PWM3 – 引脚号16
    PWM4 – 引脚号8
    PWM5 – 引脚号7 | | EG915N | PWM0 – 引脚号25
    PWM1 – 引脚号26
    PWM2 – 引脚号104
    PWM3 – 引脚号18 | +| BG950S | PWM0 – 引脚号66
    PWM1 – 引脚号38
    PWM2 – 引脚号30 | ## 方法 @@ -177,9 +178,9 @@ if __name__ == '__main__': | 常量 | 说明 | 使用平台 | | --------- | ----- | ------------------------------------------------------------ | -| PWM.PWM0 | PWM0 | EC600S / EC600N / EC100Y/EC600U/EC200U/EC800N/EC600M/EG915U/EC800M/
    EG912N/BG95/EC600E/EC800E/EC600G/EC800G/EC200A/EG912U/EC600K/FCM360W/EG915N | -| PWM.PWM1 | PWM1 | EC600S / EC600N / EC100Y/EC800N/EC600M/EC800M/EG912N/BG95/EC600E/EC800E/
    EC600G/EC800G/EC200A/EC800K/FCM360W/EG915N/ | -| PWM.PWM2 | PWM2 | EC600S / EC600N / EC100Y/EC800N/EC600M/EC800M/EG912N/EC600E/EC800E/EC600G/
    EC800G/EC200A/EC600K/FCM360W/EG915N/EC800K| +| PWM.PWM0 | PWM0 | EC600S / EC600N / EC100Y/EC600U/EC200U/EC800N/EC600M/EG915U/EC800M/
    EG912N/BG95/EC600E/EC800E/EC600G/EC800G/EC200A/EG912U/EC600K/FCM360W/EG915N/BG950S | +| PWM.PWM1 | PWM1 | EC600S / EC600N / EC100Y/EC800N/EC600M/EC800M/EG912N/BG95/EC600E/EC800E/
    EC600G/EC800G/EC200A/EC800K/FCM360W/EG915N/BG950S | +| PWM.PWM2 | PWM2 | EC600S / EC600N / EC100Y/EC800N/EC600M/EC800M/EG912N/EC600E/EC800E/EC600G/
    EC800G/EC200A/EC600K/FCM360W/EG915N/EC800K/BG950S| | PWM.PWM3 | PWM3 | EC600S / EC600N / EC100Y/EC800N/EC600M/EC800M/EG912N/EC600E/EC800E/EC600G/
    EC800G/EC600K/FCM360W/EG915N | | PWM.PWM4 | PWM4 | EC600E/EC800E/EC800G/FCM360W | | PWM.PWM5 | PWM5 | EC600E/EC800E/EC800G/FCM360W | -- Gitee From 3d12f172b920e8edf6846be77bf3ee979207b07e Mon Sep 17 00:00:00 2001 From: Tangxiulin <11016272+ha-ha-earl@user.noreply.gitee.com> Date: Tue, 19 Aug 2025 19:56:24 +0800 Subject: [PATCH 2/2] =?UTF-8?q?4.=E5=88=A0=E9=99=A4ADC=E4=B8=ADEG915N?= =?UTF-8?q?=E5=A4=9A=E4=BD=99=E7=9A=84=E6=8D=A2=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/peripherals/misc.ADC.md | 4 ---- zh/peripherals/misc.ADC.md | 3 --- 2 files changed, 7 deletions(-) diff --git a/en/peripherals/misc.ADC.md b/en/peripherals/misc.ADC.md index f8cd3b1..37f20ce 100644 --- a/en/peripherals/misc.ADC.md +++ b/en/peripherals/misc.ADC.md @@ -486,7 +486,6 @@ If successful, a specified channel voltage value is returned. ADC0 Pin number2 - @@ -506,7 +505,6 @@ If successful, a specified channel voltage value is returned. ADC1 Pin number2 - @@ -526,7 +524,6 @@ If successful, a specified channel voltage value is returned. ADC1 Pin number96 - @@ -546,7 +543,6 @@ If successful, a specified channel voltage value is returned. ADC1 Pin number2 - diff --git a/zh/peripherals/misc.ADC.md b/zh/peripherals/misc.ADC.md index beef8f3..910bae0 100644 --- a/zh/peripherals/misc.ADC.md +++ b/zh/peripherals/misc.ADC.md @@ -492,7 +492,6 @@ ADC.close() ADC0 引脚号2 - @@ -512,7 +511,6 @@ ADC.close() ADC1 引脚号2 - @@ -532,7 +530,6 @@ ADC.close() ADC1 引脚号96 - -- Gitee