본문으로 건너뛰기

L511C/G-Y7PM Peripheral Mapping

Applies to L511C-Y7PM and L511G-Y7PM. The GPIO API uses module pin numbers. I/O defaults to 1.8 V; 3.3 V requires SDK configuration support. “Registered” means the ordinary GPIO API recognizes the pin. An unexposed pin returns OPRT_COM_ERROR from init; ordinary init on Pin 79 returns OPRT_NOT_SUPPORTED. This does not prevent independent peripheral multiplexing.

GPIO​

Tuya PinDefault/multiplexed functionC ordinary GPIOG ordinary GPIONotes
5GPIO1RegisteredRegisteredInit configures a wakeup pad.
6GPIO2RegisteredRegisteredInit configures a wakeup pad.
16NET_STATUSRegisteredRegisteredOccupied by the network status indicator.
19MAIN_DTRRegisteredRegisteredInit configures a wakeup pad.
20MAIN_RIRegisteredRegistered
21MAIN_DCDRegisteredRegistered
22MAIN_CTSRegisteredRegistered
25STATUSRegisteredRegistered
26I2S_MCLKRegisteredRegistered
28AUX_RXDRegisteredRegistered
29AUX_TXDRegisteredRegistered
30PCM_CLKRegisteredRegistered
31PCM_SYNCRegisteredRegistered
32PCM_DINRegisteredRegisteredInterrupt anomaly noted in the old reference.
33PCM_DOUTRegisteredRegistered
49LCD_RSTRegisteredRegistered
50LCD_SPI_OUTRegisteredRegistered
51LCD_SPI_RSRegisteredRegistered
52LCD_SPI_CSRegisteredRegistered
53LCD_SPI_CLKRegisteredRegistered
54CAM_MCLKRegisteredRegistered
55CAM_SPI_DATA0RegisteredRegistered
56CAM_SPI_DATA1RegisteredRegistered
57CAM_I2C_SCLRegisteredRegistered
58CAM_I2C_SDARegisteredRegisteredInterrupt anomaly noted in the old reference.
62USIM2_CLKNot exposedNot exposed
63USIM2_RSTNot exposedNot exposed
64USIM2_DATANot exposedNot exposed
66I2C1_SDARegisteredNot exposedC source notes IRQ abnormal despite output registration.
67I2C1_SCLRegisteredNot exposedC source notes IRQ abnormal despite output registration.
78LCD_TERegisteredNot exposed
79USIM1_DETDedicated/conditionalDedicated/conditionalBoth SDKs return OPRT_NOT_SUPPORTED from tkl_gpio_init; SIM-detect/wakeup use, subject to platform conditions.
80CAM_SPI_CLKRegisteredRegistered
81CAM_PWDNRegisteredRegistered
82USB_BOOTRegisteredRegisteredUSB boot function.
100GPIO3Not exposedRegisteredMay be occupied on versions with built-in GNSS, per hardware reference.
101GPIO4RegisteredNot exposed
103CAM_RST_NRegisteredNot exposed

ADC​

ADC ports 0 and 1 support tkl_adc_read_voltage(); tkl_adc_read_data() and tkl_adc_read_single_channel() return OPRT_NOT_SUPPORTED.

PWM​

Tuya PWMTuya PinPWM channel in hardware reference
022PWM0
123PWM1
254PWM2
325PWM3
420PWM4

PWM pins are multiplexed with other functions; configure the selected model accordingly.

I2C​

Current default routing in the C/G-Y7PM SDK tkl_i2c.c:

SDK I2C portSCLSDAStatus
I2C0Tuya Pin 57Tuya Pin 58SDK default; old reference notes interrupt anomaly on Pin 58
I2C1Tuya Pin 67Tuya Pin 66SDK default; SDA=66, SCL=67

I2C master initialization, send, and receive are supported; IRQ and slave interfaces are not supported.

SPI​

Reference pin multiplexing (requires configuration):

SPI portCSMOSIMISOCLK
SPI066672829
SPI164636249

UART​

Tuya UARTReference status
0OK
1OK
2Pending verification
3 (USB UART)OK

Pin mapping is not provided.

I2S​

Reference PCM/I2S pins: Pin 30 PCM_CLK, 31 PCM_SYNC, 32 PCM_DIN, 33 PCM_DOUT, and 26 I2S_MCLK; ES8311 is listed. Configure the codec and clocks for the design.

References​