这是最新(主)开发分支的文档。如果您正在查找以前版本的文档,使用左侧的下拉菜单选择所需的版本。

Pinmux

SoC 通过 IO 引脚进行外设控制和数据交互,W80X 系列的 SOC 包含有不同封装,引出不同数量的 IO, 举例下图为 W800 的引脚图:

w800_io

考虑到芯片封装面积及成本关系,芯片的引脚数量会做尽可能的做限制,而为了多支持一些功能,一些引脚会被复用成多种功能,也即 当前章节所介绍的 pinmux 引脚复用。

IO pinmux 定义是项目开发非常重要,但很容易混乱的地方。拿到新的平台或启动新的设备功能,往往要先依据项目功能需求,结合 硬件工程师的原理图,在SDK中配置好 pinmux 参数,这是相关设备驱动能正常运行的前提。 为了避免混乱,可以注意如下一些地方:

备注

1.注意 所参考的 芯片规格书 务必与项目所选型的 SoC 一致。

2.注意 设备表 中所配置的 IO 是否超出 了所选择 SOC 的支持的范围。建议配置引脚时使用引脚枚举定义,以便编译系统能够检查是否合法。

3.注意 设备表 中所配置的 IO 是否在多个 device 中被重复定义。

4.注意 设备表 中对 IO 的属性配置是否正确 (如 pullup/pulldown, input/output方向 等)。

5.注意 项目新增加的应用软件中 是否存在上述 2,3,4 的问题。

未来我们会完善并提供一些途径协助用户 预先检测出这些错误。

如下几个表格是 依据 W80X 系列 SoC 的芯片规格书 整理出的 更加直观的 Pinmux Table.

W800, W805 芯片的 pinmux 功能复用关系

GPIO_NUM

PadName

FUN1

FUN2

FUN3

FUN4

FUN5

FUN6

FUN7

WM_GPIO_NUM_0

PA0

I2S_MCLK

L-SPI_CS

PWM2

I2S_DO

GPIO

WM_GPIO_NUM_1

PA1

JTAG_CK

I2C_SCL

PWM3

I2S_LRCLK

GPIO

ADC_0

WM_GPIO_NUM_4

PA4

JTAG_SWO

I2C_SDA

PWM4

I2S_BCLK

GPIO

ADC_1

WM_GPIO_NUM_7

PA7

PWM4

L-SPI_MOSI

I2S_MCLK

I2S_DI

GPIO

WM_GPIO_NUM_16

PB0

PWM0

L-SPI_MISO

UART3_TX

PSRAM_CK

GPIO

WM_GPIO_NUM_17

PB1

PWM1

L-SPI_CK

UART3_RX

PSRAM_CS

GPIO

WM_GPIO_NUM_18

PB2

PWM2

L-SPI_CK

UART2_TX

PSRAM_DAT0

GPIO

WM_GPIO_NUM_19

PB3

PWM3

L-SPI_MISO

UART2_RX

PSRAM_DAT1

GPIO

WM_GPIO_NUM_20

PB4

L-SPI_CS

UART2_RTS

UART4_TX

PSRAM_DAT2

GPIO

WM_GPIO_NUM_21

PB5

L-SPI_MOSI

UART2_CTS

UART4_RX

PSRAM_DAT3

GPIO

WM_GPIO_NUM_22

PB6

UART1_TX

MMC_CLK

H-SPI_CK

SDIO_SLAVE_CK

GPIO

WM_GPIO_NUM_23

PB7

UART1_RX

MMC_CMD

H-SPI_INT

SDIO_SLAVE_CMD

GPIO

WM_GPIO_NUM_24

PB8

I2S_BCLK

MMC_DAT0

PWM_BREAK

SDIO_SLAVE_D0

GPIO

WM_GPIO_NUM_25

PB9

I2S_LRCLK

MMC_DAT1

H-SPI_CS

SDIO_SLAVE_D1

GPIO

WM_GPIO_NUM_26

PB10

I2S_DI

MMC_DAT2

H-SPI_DI

SDIO_SLAVE_D2

GPIO

WM_GPIO_NUM_27

PB11

I2S_D0

MMC_DAT3

H-SPI_DO

SDIO_SLAVE_D3

GPIO

WM_GPIO_NUM_35

PB19

UART0_TX

PWM0

UART1_RTS

I2C_SDA

GPIO

WM_GPIO_NUM_36

PB20

UART0_RX

PWM1

UART1_CTS

I2C_SCL

GPIO

W801S 芯片的 pinmux 功能复用关系

GPIO_NUM

PadName

FUN1

FUN2

FUN3

FUN4

FUN5

FUN6

FUN7

WM_GPIO_NUM_0

PA0

I2S_MCLK

L-SPI_CS

PWM2

I2S_DO

GPIO

WM_GPIO_NUM_1

PA1

JTAG_CK

I2C_SCL

PWM3

I2S_LRCLK

GPIO

ADC_0

WM_GPIO_NUM_2

PA2

UART1_RTS

UART2_TX

PWM0

UART3_RTS

GPIO

ADC_3

WM_GPIO_NUM_3

PA3

UART1_CTS

UART2_RX

PWM1

UART3_CTS

GPIO

ADC_2

WM_GPIO_NUM_4

PA4

JTAG_SWO

I2C_SDA

PWM4

I2S_BCLK

GPIO

ADC_1

WM_GPIO_NUM_5

PA5

UART3_TX

UART2_RTS

PWM_BREAK

UART4_RTS

GPIO

WM_GPIO_NUM_6

PA6

UART3_RX

UART2_CTS

UART4_CTS

GPIO

LCD_SEG31

WM_GPIO_NUM_7

PA7

PWM4

L-SPI_MOSI

I2S_MCLK

I2S_DI

GPIO

LCD_SEG03

WM_GPIO_NUM_8

PA8

PWM_BREAK

UART4_TX

UART5_TX

I2S_BCLK

GPIO

LCD_SEG04

WM_GPIO_NUM_9

PA9

MMC_CLK

UART4_RX

UART5_RX

I2S_LRCLK

GPIO

LCD_SEG05

Touch1

WM_GPIO_NUM_10

PA10

MMC_CMD

UART4_RTS

PWM0

I2S_DO

GPIO

LCD_SEG06

Touch2

WM_GPIO_NUM_11

PA11

MMC_DAT0

UART4_CTS

PWM1

I2S_DI

GPIO

LCD_SEG07

WM_GPIO_NUM_12

PA12

MMC_DAT1

UART5_TX

PWM2

GPIO

LCD_SEG08

CMOD

WM_GPIO_NUM_13

PA13

MMC_DAT2

UART5_RX

PWM3

GPIO

LCD_SEG09

WM_GPIO_NUM_14

PA14

MMC_DAT3

UART5_CTS

PWM4

GPIO

LCD_SEG10

CDC

WM_GPIO_NUM_15

PA15

PSRAM_CK

UART5_RTS

PWM_BREAK

GPIO

LCD_SEG11

WM_GPIO_NUM_16

PB0

PWM0

L-SPI_MISO

UART3_TX

PSRAM_CK

GPIO

LCD_SEG12

Touch3

WM_GPIO_NUM_17

PB1

PWM1

L-SPI_CK

UART3_RX

PSRAM_CS

GPIO

LCD_SEG13

Touch4

WM_GPIO_NUM_18

PB2

PWM2

L-SPI_CK

UART2_TX

PSRAM_DAT0

GPIO

LCD_SEG14

Touch5

WM_GPIO_NUM_19

PB3

PWM3

L-SPI_MISO

UART2_RX

PSRAM_DAT1

GPIO

LCD_SEG15

Touch6

WM_GPIO_NUM_20

PB4

L-SPI_CS

UART2_RTS

UART4_TX

PSRAM_DAT2

GPIO

LCD_SEG16

Touch7

WM_GPIO_NUM_21

PB5

L-SPI_MOSI

UART2_CTS

UART4_RX

PSRAM_DAT3

GPIO

LCD_SEG17

Touch8

WM_GPIO_NUM_22

PB6

UART1_TX

MMC_CLK

H-SPI_CK

SDIO_SLAVE_CK

GPIO

LCD_SEG18

Touch9

WM_GPIO_NUM_23

PB7

UART1_RX

MMC_CMD

H-SPI_INT

SDIO_SLAVE_CMD

GPIO

LCD_SEG19

Touch10

WM_GPIO_NUM_24

PB8

I2S_BCLK

MMC_DAT0

PWM_BREAK

SDIO_SLAVE_D0

GPIO

LCD_SEG20

Touch11

WM_GPIO_NUM_25

PB9

I2S_LRCLK

MMC_DAT1

H-SPI_CS

SDIO_SLAVE_D1

GPIO

LCD_SEG21

Touch12

WM_GPIO_NUM_26

PB10

I2S_DI

MMC_DAT2

H-SPI_DI

SDIO_SLAVE_D2

GPIO

LCD_SEG22

WM_GPIO_NUM_27

PB11

I2S_D0

MMC_DAT3

H-SPI_DO

SDIO_SLAVE_D3

GPIO

LCD_SEG23

WM_GPIO_NUM_28

PB12

H-SPI_CK

PWM0

UART5_CTS

I2S_BCLK

GPIO

LCD_SEG24

WM_GPIO_NUM_29

PB13

H-SPI_INT

PWM1

UART5_RTS

I2S_LRCLK

GPIO

LCD_SEG25

WM_GPIO_NUM_30

PB14

HSPI_CS

PWM2

L-SPI_CS

I2S_DO

GPIO

LCD_SEG26

WM_GPIO_NUM_31

PB15

HSPI_DI

PWM3

L-SPI_CK

I2S_DI

GPIO

LCD_SEG27

WM_GPIO_NUM_32

PB16

HSPI_DO

PWM4

L-SPI_MISO

UART1_RX

GPIO

LCD_SEG28

WM_GPIO_NUM_33

PB17

UART5_RX

PWM_BREAK

L-SPI_MOSI

I2S_MCLK

GPIO

LCD_SEG29

WM_GPIO_NUM_34

PB18

UART5_TX

GPIO

LCD_SEG30

WM_GPIO_NUM_35

PB19

UART0_TX

PWM0

UART1_RTS

I2C_SDA

GPIO

WM_GPIO_NUM_36

PB20

UART0_RX

PWM1

UART1_CTS

I2C_SCL

GPIO

WM_GPIO_NUM_37

PB21

UART0_RTS

GPIO

LCD_COM1

WM_GPIO_NUM_38

PB22

UART0_CTS

GPIO

LCD_COM2

WM_GPIO_NUM_40

PB24

L-SPI_CK

PWM2

GPIO

LCD_SEG2

WM_GPIO_NUM_41

PB25

L-SPI_MISO

PWM3

GPIO

LCD_COM0

WM_GPIO_NUM_42

PB26

L-SPI_MOSI

PWM4

GPIO

LCD_SEG1

WM_GPIO_NUM_43

PB27

PSRAM_CS

UART0_TX

GPIO

LCD_COM3

W802 芯片的 pinmux 功能复用关系

GPIO_NUM

PadName

FUN1

FUN2

FUN3

FUN4

FUN5

FUN6

FUN7

WM_GPIO_NUM_0

PA0

I2S_MCLK

L-SPI_CS

PWM2

I2S_DO

GPIO

WM_GPIO_NUM_1

PA1

JTAG_CK

I2C_SCL

PWM3

I2S_LRCLK

GPIO

ADC_0

WM_GPIO_NUM_2

PA2

UART1_RTS

UART2_TX

PWM0

UART3_RTS

GPIO

ADC_3

WM_GPIO_NUM_3

PA3

UART1_CTS

UART2_RX

PWM1

UART3_CTS

GPIO

ADC_2

WM_GPIO_NUM_4

PA4

JTAG_SWO

I2C_SDA

PWM4

I2S_BCLK

GPIO

ADC_1

WM_GPIO_NUM_7

PA7

PWM4

L-SPI_MOSI

I2S_MCLK

I2S_DI

GPIO

WM_GPIO_NUM_9

PA9

MMC_CLK

UART4_RX

UART5_RX

I2S_LRCLK

GPIO

Touch1

WM_GPIO_NUM_10

PA10

MMC_CMD

UART4_RTS

PWM0

I2S_DO

GPIO

Touch2

WM_GPIO_NUM_12

PA12

MMC_DAT1

UART5_TX

PWM2

GPIO

CMOD

WM_GPIO_NUM_14

PA14

MMC_DAT3

UART5_CTS

PWM4

GPIO

CDC

WM_GPIO_NUM_16

PB0

PWM0

L-SPI_MISO

UART3_TX

PSRAM_CK

GPIO

Touch3

WM_GPIO_NUM_17

PB1

PWM1

L-SPI_CK

UART3_RX

PSRAM_CS

GPIO

Touch4

WM_GPIO_NUM_18

PB2

PWM2

L-SPI_CK

UART2_TX

PSRAM_DAT0

GPIO

Touch5

WM_GPIO_NUM_19

PB3

PWM3

L-SPI_MISO

UART2_RX

PSRAM_DAT1

GPIO

Touch6

WM_GPIO_NUM_20

PB4

L-SPI_CS

UART2_RTS

UART4_TX

PSRAM_DAT2

GPIO

Touch7

WM_GPIO_NUM_21

PB5

L-SPI_MOSI

UART2_CTS

UART4_RX

PSRAM_DAT3

GPIO

Touch8

WM_GPIO_NUM_22

PB6

UART1_TX

MMC_CLK

H-SPI_CK

SDIO_SLAVE_CK

GPIO

Touch9

WM_GPIO_NUM_23

PB7

UART1_RX

MMC_CMD

H-SPI_INT

SDIO_SLAVE_CMD

GPIO

Touch10

WM_GPIO_NUM_24

PB8

I2S_BCLK

MMC_DAT0

PWM_BREAK

SDIO_SLAVE_D0

GPIO

Touch11

WM_GPIO_NUM_25

PB9

I2S_LRCLK

MMC_DAT1

H-SPI_CS

SDIO_SLAVE_D1

GPIO

Touch12

WM_GPIO_NUM_26

PB10

I2S_DI

MMC_DAT2

H-SPI_DI

SDIO_SLAVE_D2

GPIO

WM_GPIO_NUM_27

PB11

I2S_D0

MMC_DAT3

H-SPI_DO

SDIO_SLAVE_D3

GPIO

WM_GPIO_NUM_28

PB12

H-SPI_CK

PWM0

UART5_CTS

I2S_BCLK

GPIO

WM_GPIO_NUM_29

PB13

H-SPI_INT

PWM1

UART5_RTS

I2S_LRCLK

GPIO

WM_GPIO_NUM_30

PB14

HSPI_CS

PWM2

L-SPI_CS

I2S_DO

GPIO

WM_GPIO_NUM_31

PB15

HSPI_DI

PWM3

L-SPI_CK

I2S_DI

GPIO

WM_GPIO_NUM_32

PB16

HSPI_DO

PWM4

L-SPI_MISO

UART1_RX

GPIO

WM_GPIO_NUM_33

PB17

UART5_RX

PWM_BREAK

L-SPI_MOSI

I2S_MCLK

GPIO

WM_GPIO_NUM_34

PB18

UART5_TX

GPIO

WM_GPIO_NUM_35

PB19

UART0_TX

PWM0

UART1_RTS

I2C_SDA

GPIO

WM_GPIO_NUM_36

PB20

UART0_RX

PWM1

UART1_CTS

I2C_SCL

GPIO

WM_GPIO_NUM_37

PB21

UART0_RTS

GPIO

WM_GPIO_NUM_38

PB22

UART0_CTS

GPIO

WM_GPIO_NUM_40

PB24

L-SPI_CK

PWM2

GPIO

WM_GPIO_NUM_41

PB25

L-SPI_MISO

PWM3

GPIO

WM_GPIO_NUM_42

PB26

L-SPI_MOSI

PWM4

GPIO

WM_GPIO_NUM_45

PB29

PSRAM_DAT1_1

UART0_RTS_1

GPIO

Touch15

W803 芯片的 pinmux 功能复用关系

GPIO_NUM

PadName

FUN1

FUN2

FUN3

FUN4

FUN5

FUN6

FUN7

WM_GPIO_NUM_0

PA0

I2S_MCLK

L-SPI_CS

PWM2

I2S_DO

GPIO

WM_GPIO_NUM_1

PA1

JTAG_CK

I2C_SCL

PWM3

I2S_LRCLK

GPIO

ADC_0

WM_GPIO_NUM_4

PA4

JTAG_SWO

I2C_SDA

PWM4

I2S_BCLK

GPIO

ADC_1

WM_GPIO_NUM_7

PA7

PWM4

L-SPI_MOSI

I2S_MCLK

I2S_DI

GPIO

WM_GPIO_NUM_12

PA12

UART5_TX

PWM2

GPIO

CMOD

WM_GPIO_NUM_14

PA14

UART5_CTS

PWM4

GPIO

CDC

WM_GPIO_NUM_16

PB0

PWM0

L-SPI_MISO

UART3_TX

PSRAM_CK

GPIO

Touch3

WM_GPIO_NUM_17

PB1

PWM1

L-SPI_CK

UART3_RX

PSRAM_CS

GPIO

Touch4

WM_GPIO_NUM_18

PB2

PWM2

L-SPI_CK

UART2_TX

PSRAM_DAT0

GPIO

Touch5

WM_GPIO_NUM_19

PB3

PWM3

L-SPI_MISO

UART2_RX

PSRAM_DAT1

GPIO

Touch6

WM_GPIO_NUM_20

PB4

L-SPI_CS

UART2_RTS

UART4_TX

PSRAM_DAT2

GPIO

Touch7

WM_GPIO_NUM_21

PB5

L-SPI_MOSI

UART2_CTS

UART4_RX

PSRAM_DAT3

GPIO

Touch8

WM_GPIO_NUM_22

PB6

UART1_TX

MMC_CLK

H-SPI_CK

SDIO_SLAVE_CK

GPIO

Touch9

WM_GPIO_NUM_23

PB7

UART1_RX

MMC_CMD

H-SPI_INT

SDIO_SLAVE_CMD

GPIO

Touch10

WM_GPIO_NUM_24

PB8

I2S_BCLK

MMC_DAT0

PWM_BREAK

SDIO_SLAVE_D0

GPIO

Touch11

WM_GPIO_NUM_25

PB9

I2S_LRCLK

MMC_DAT1

H-SPI_CS

SDIO_SLAVE_D1

GPIO

Touch12

WM_GPIO_NUM_26

PB10

I2S_DI

MMC_DAT2

H-SPI_DI

SDIO_SLAVE_D2

GPIO

WM_GPIO_NUM_27

PB11

I2S_D0

MMC_DAT3

H-SPI_DO

SDIO_SLAVE_D3

GPIO

WM_GPIO_NUM_35

PB19

UART0_TX

PWM0

UART1_RTS

I2C_SDA

GPIO

WM_GPIO_NUM_36

PB20

UART0_RX

PWM1

UART1_CTS

I2C_SCL

GPIO

W806 芯片的 pinmux 功能复用关系

GPIO_NUM

PadName

FUN1

FUN2

FUN3

FUN4

FUN5

FUN6

FUN7

WM_GPIO_NUM_0

PA0

I2S_MCLK

L-SPI_CS

PWM2

I2S_DO

GPIO

WM_GPIO_NUM_1

PA1

JTAG_CK

I2C_SCL

PWM3

I2S_LRCLK

GPIO

ADC_0

WM_GPIO_NUM_2

PA2

UART1_RTS

UART2_TX

PWM0

UART3_RTS

GPIO

ADC_3

WM_GPIO_NUM_3

PA3

UART1_CTS

UART2_RX

PWM1

UART3_CTS

GPIO

ADC_2

WM_GPIO_NUM_4

PA4

JTAG_SWO

I2C_SDA

PWM4

I2S_BCLK

GPIO

ADC_1

WM_GPIO_NUM_5

PA5

UART3_TX

UART2_RTS

PWM_BREAK

UART4_RTS

GPIO

WM_GPIO_NUM_6

PA6

UART3_RX

UART2_CTS

UART4_CTS

GPIO

LCD_SEG31

WM_GPIO_NUM_7

PA7

PWM4

L-SPI_MOSI

I2S_MCLK

I2S_DI

GPIO

LCD_SEG03

WM_GPIO_NUM_8

PA8

PWM_BREAK

UART4_TX

UART5_TX

I2S_BCLK

GPIO

LCD_SEG04

WM_GPIO_NUM_9

PA9

MMC_CLK

UART4_RX

UART5_RX

I2S_LRCLK

GPIO

LCD_SEG05

WM_GPIO_NUM_10

PA10

MMC_CMD

UART4_RTS

PWM0

I2S_DO

GPIO

LCD_SEG06

WM_GPIO_NUM_11

PA11

MMC_DAT0

UART4_CTS

PWM1

I2S_DI

GPIO

LCD_SEG07

WM_GPIO_NUM_12

PA12

MMC_DAT1

UART5_TX

PWM2

GPIO

LCD_SEG08

WM_GPIO_NUM_13

PA13

MMC_DAT2

UART5_RX

PWM3

GPIO

LCD_SEG09

WM_GPIO_NUM_14

PA14

MMC_DAT3

UART5_CTS

PWM4

GPIO

LCD_SEG10

WM_GPIO_NUM_15

PA15

PSRAM_CK

UART5_RTS

PWM_BREAK

GPIO

LCD_SEG11

WM_GPIO_NUM_16

PB0

PWM0

L-SPI_MISO

UART3_TX

PSRAM_CK

GPIO

LCD_SEG12

WM_GPIO_NUM_17

PB1

PWM1

L-SPI_CK

UART3_RX

PSRAM_CS

GPIO

LCD_SEG13

WM_GPIO_NUM_18

PB2

PWM2

L-SPI_CK

UART2_TX

PSRAM_DAT0

GPIO

LCD_SEG14

WM_GPIO_NUM_19

PB3

PWM3

L-SPI_MISO

UART2_RX

PSRAM_DAT1

GPIO

LCD_SEG15

WM_GPIO_NUM_20

PB4

L-SPI_CS

UART2_RTS

UART4_TX

PSRAM_DAT2

GPIO

LCD_SEG16

WM_GPIO_NUM_21

PB5

L-SPI_MOSI

UART2_CTS

UART4_RX

PSRAM_DAT3

GPIO

LCD_SEG17

WM_GPIO_NUM_22

PB6

UART1_TX

MMC_CLK

H-SPI_CK

SDIO_SLAVE_CK

GPIO

LCD_SEG18

WM_GPIO_NUM_23

PB7

UART1_RX

MMC_CMD

H-SPI_INT

SDIO_SLAVE_CMD

GPIO

LCD_SEG19

WM_GPIO_NUM_24

PB8

I2S_BCLK

MMC_DAT0

PWM_BREAK

SDIO_SLAVE_D0

GPIO

LCD_SEG20

WM_GPIO_NUM_25

PB9

I2S_LRCLK

MMC_DAT1

H-SPI_CS

SDIO_SLAVE_D1

GPIO

LCD_SEG21

WM_GPIO_NUM_26

PB10

I2S_DI

MMC_DAT2

H-SPI_DI

SDIO_SLAVE_D2

GPIO

LCD_SEG22

WM_GPIO_NUM_27

PB11

I2S_D0

MMC_DAT3

H-SPI_DO

SDIO_SLAVE_D3

GPIO

LCD_SEG23

WM_GPIO_NUM_28

PB12

H-SPI_CK

PWM0

UART5_CTS

I2S_BCLK

GPIO

LCD_SEG24

WM_GPIO_NUM_29

PB13

H-SPI_INT

PWM1

UART5_RTS

I2S_LRCLK

GPIO

LCD_SEG25

WM_GPIO_NUM_30

PB14

HSPI_CS

PWM2

L-SPI_CS

I2S_DO

GPIO

LCD_SEG26

WM_GPIO_NUM_31

PB15

HSPI_DI

PWM3

L-SPI_CK

I2S_DI

GPIO

LCD_SEG27

WM_GPIO_NUM_32

PB16

HSPI_DO

PWM4

L-SPI_MISO

UART1_RX

GPIO

LCD_SEG28

WM_GPIO_NUM_33

PB17

UART5_RX

PWM_BREAK

L-SPI_MOSI

I2S_MCLK

GPIO

LCD_SEG29

WM_GPIO_NUM_34

PB18

UART5_TX

GPIO

LCD_SEG30

WM_GPIO_NUM_35

PB19

UART0_TX

PWM0

UART1_RTS

I2C_SDA

GPIO

WM_GPIO_NUM_36

PB20

UART0_RX

PWM1

UART1_CTS

I2C_SCL

GPIO

WM_GPIO_NUM_37

PB21

UART0_RTS

GPIO

LCD_COM1

WM_GPIO_NUM_38

PB22

UART0_CTS

GPIO

LCD_COM2

WM_GPIO_NUM_40

PB24

L-SPI_CK

PWM2

GPIO

LCD_SEG2

WM_GPIO_NUM_41

PB25

L-SPI_MISO

PWM3

GPIO

LCD_COM0

WM_GPIO_NUM_42

PB26

L-SPI_MOSI

PWM4

GPIO

LCD_SEG1

WM_GPIO_NUM_43

PB27

PSRAM_CS

UART0_TX

GPIO

LCD_COM3

IO function 对 pin 的属性设定要求

IO 通过 pinmux 配置 选择成 不同的function, 部分 function 对 pin 的属性设定会有要求, 如下表格 汇总了 W80X SoC 各个 IO functioin 的具体 IO 属性要求:

IO Function

子功能需求

Pullmode

Direction

LCD_SEG

FLOAT

INPUT

LCD_COM

FLOAT

INPUT

ADC

FLOAT

INPUT

Touch

FLOAT

INPUT

I2C_SDA

PULLUP

无关

I2C_SCL

PULLUP

无关

PWM_BREAK

高电平触发

PULLDOWN

无关

PWM_BREAK

低电平触发

PULLUP

无关

UART RX

PULLUP

无关

GPIO

Input

PULLUP/DOWN/FLOAT

INPUT

GPIO

Output

无关

OUTPUT

I2S_LRCLK

顺序 L->R

PULLUP

无关

I2S_LRCLK

顺序 R->L

PULLDOWN

无关

I2S BCLK/DI/DO

无关

无关

SDIO

无关

无关

HSPI

无关

无关

SIM

无关

无关

PWM

无关

无关

MMC

无关

无关

Uart TX/RTS/CTS

无关

无关

JTAG

无关

无关

比如:WM_GPIO_NUM_1 被配置成 FUN6, 即 ADC 功能,也需要配合将 IO 属性配置成 FLOAT, 将 GPIO Direction 配置成 INPUT。

备注

1.W80X 系列 SoC 上电后,所有 IO 默认为 Floating, Input 状态。

2.IO 配置成 FUN6, FUN7 时,是将此 IO 设定成模拟功能。这种条件下 该 IO 的 Pullmode 不要设定 pullup , 否则可能在一些环境中造成芯片损坏。

3.PWM 应用层需要注意 IO 配置,1个 channel 仅1个 pin func 配置,保持仅一路输出,若多个 pin 设定成同1个 PWM Channel (如:GPIO2, GPIO10 都设定成 PWM0), 这些 pin 都会有PWM0波形的输出。