跳到主要内容

K1 Pro GPIO 扩展接口

K1 Pro预留了一个40Pin的GPIO扩展接口,采用2.54双列直插的座子,方便爱好者们可以根据自己的需求连接外设,扩展不同的功能。我们的系统会将这些IO默认设置为一些特定功能,但是用户可以通过软件的重新配置使这些通用的IO具备一些特殊的功能,因为这些IO都是多功能复用的引脚。 img

1.多功能引脚定义列表

所有的GPIO都可以设置成通用的输入或者输出,也能通过内核配置成更多功能。下面的表格给我们展示了各个GPIO的扩展功能。

Pin NumberPin Definition
13.3V
25.0V
3PWM2_CH1_M2/I2C6_SDA_M2/UART4_RX_M0/SAI4_SDO_M3/ETH1_RXD0_M0/ GPIO2_D1_d
45.0V
5PWM2_CH0_M2/I2C6_SCL_M2/UART4_TX_M0/SAI4_SDI_M3/ETH1_TXCTL_M0/GPIO2_D0_d
6GND
7CAN0_TX_M2/I2C4_SCL_M1/UART6_TX_M0/SPI3_MOSI_M2/FLEXBUS0_D13_M1/PDM1_SDI3_M1/SAI4_SCLK_M0/GPIO4_A4_d
8PWM2_CH2_M2/I3C1_SCL_M0/UART6_TX_M1/SAI4_MCLK_M3/ETH1_RXD1_M/CAM_CLK0_OUT_M1/GPIO2_D2_d
9GND
10PWM2_CH3_M2/I3C1_SDA_M0/UART6_RX_M1/ETH1_RXCTL_M0/GPIO2_D3_d
11CAN0_RX_M2/I2C4_SDA_M1/UART6_RX_M0/SPI3_MISO_M2/FLEXBUS0_D14_M1/PDM1_CLK0_M1/SAI4_LRCK_M0/GPIO4_A6_
12PWM2_CH4_M2/I2C9_SDA_M2/UART6_RTSN_M1/ETH1_MDC_M0/ISP_PRELIGHT_TRIG_M0/GPIO2_D4_d
13PWM2_CH6_M0/SPI3_CLK_M2/SAI4_SDI_M0/SAI1_SDO0_M0/GPIO4_A7_d
14GND
15UART2_RTSN_M1/UART6_RTSN_M0/UART5_TX_M1/SPI4_CLK_M2/FLEXBUS1_D13_M1/PDM1_CLK1_M1/SAI1_SDI3_M0/SAI1_SDO1_M0/GPIO4_B0_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YNC_OUT/SAI4_SCLK_M2/GPIO4_C7_d

备注:

电压

板子上所有的3.3V,5V和地都是不能配置的,剩下的所有引脚都是3.3V的,也就是说GPIO的输入和输出都是3.3V的,当然这些引脚从芯片端并不是3.3V,而是通过电平转换将所有的IO都转换成3.3V。

输入输出

GPIO的高电平设置为3.3V,低电平是0V。