ESP32-S2有很多特殊功能的IO,通过查表得到了以下结论
IO | TOUCH功能 | ADC | 内置 flash | 内置PSRAM | 功能 |
---|---|---|---|---|---|
GPIO0 | BOOT/Download模式切换 | ||||
GPIO1 | TOUCH1 | ADC1_CH0 | |||
GPIO2 | TOUCH2 | ADC1_CH1 | |||
GPIO3 | TOUCH3 | ADC1_CH2 | |||
GPIO4 | TOUCH4 | ADC1_CH3 | |||
GPIO5 | TOUCH5 | ADC1_CH4 | |||
GPIO6 | TOUCH6 | ADC1_CH5 | |||
GPIO7 | TOUCH7 | ADC1_CH6 | |||
GPIO8 | TOUCH8 | ADC1_CH7 | |||
GPIO9 | TOUCH9 | ADC1_CH8 | |||
GPIO10 | TOUCH10 | ADC1_CH9 | |||
GPIO11 | TOUCH11 | ADC2_CH0 | |||
GPIO12 | TOUCH12 | ADC2_CH1 | |||
GPIO13 | TOUCH13 | ADC2_CH2 | |||
GPIO14 | TOUCH14 | ADC2_CH3 | |||
GPIO15 | ADC2_CH4 | ||||
GPIO16 | ADC2_CH5 | ||||
GPIO17 | ADC2_CH6 | DAC_1 | |||
GPIO18 | ADC2_CH7 | DAC_2 | |||
GPIO19 | ADC2_CH8 | USB_D- | |||
GPIO20 | ADC2_CH9 | USB_D+ | |||
GPIO21 | |||||
GPIO26 | SPICS1 | 左边为内置 flash,右边为内置PSRAM | |||
GPIO27 | SPIHD | SPIHD | |||
GPIO28 | SPIWP | SPIWP | |||
GPIO29 | SPICS0 | ||||
GPIO30 | SPICLK | SPICLK | |||
GPIO31 | SPIQ | SPIQ | |||
GPIO32 | SPID | SPID | |||
GPIO33 | FSPIHD | 可用的SPI2 | |||
GPIO34 | FSPICS0 | CS | |||
GPIO35 | FSPID | SPID/MOSI | |||
GPIO36 | FSPICLK | SCK | |||
GPIO37 | FSPIQ | SPIQ/MISO | |||
GPIO38 | FSPIWP | ||||
GPIO39 | MTCK | JTAG | |||
GPIO40 | MTDO | ||||
GPIO41 | MTDI | ||||
GPIO42 | MTMS | ||||
GPIO43 | TXD | 串口 | |||
GPIO44 | RXD | ||||
GPIO45 | GPIO45 VDD_SPI 电压选择 | ||||
GPIO46 | GPIO46 系统启动是否打印 ROM Code |
另外,根据IDF的手册,ADC2和ESP32一样和WIFI复用了,所以可能读取操作会失败
暂无评论