TSI GPIO Features

Introduction

TLSR8258F512ET/AT48, TLSR8258F512ET/AT32 and TLSR8258F512ET/AT24 supports up to 32, 17 and 10 GPIOs respectively. All digital IOs can be used as general purpose IOs. All functions supported by GPIO Module are as follows:

  • All GPIOs(including PA<0> ~ PD<7>)have configurable pull-up and pull-down resistor inside.
  • Support multi-function multiplexing of the same pin,For More...
  • Driver Strength of all GPIOs are configurable,For More...
  • Support GPIO Interrupt mechanism,For More...

GPIO Mux Function

The multiplexing function of all pins of TLSR8258 is as follows:

pin Mux1 Mux2 Mux3 Mux4 default
A0 GPIO UART_RX PWM0_N DMIC_DI GPIO
A1 GPIO I2S_CLK 7816_CLK DMIC_CLK GPIO
A2 GPIO PWM0 UART_TX SPI_DO GPIO
A3 GPIO PWM1 UART_CTS SPI_DI GPIO
A4 GPIO PWM2 UART_RTS SPI_CK GPIO
A5 GPIO - - DM GPIO
A6 GPIO - - DP(To SWS) GPIO
A7 GPIO - UART_RTS SWS SWS


pin Mux1 Mux2 Mux3 Mux4 default
B0 GPIO ATSEL1 UART_RX PWM3 GPIO
B1 GPIO ATSEL2 UART_TX PWM4 GPIO
B2 GPIO RX_CYC2LNA UART_CTS PWM5 GPIO
B3 GPIO TX_CYC2PA UART_RTS PWM0_N GPIO
B4 GPIO - PWM4 SDM_P0 GPIO
B5 GPIO - PWM5 SDM_N0 GPIO
B6 GPIO UART_RTS SPI_DI SDM_P1 SPI_DI
B7 GPIO UART_RX SPI_DO SDM_N1 SPI_DO


pin Mux1 Mux2 Mux3 Mux4 default
C0 GPIO UART_RTS PWM4_N I2C_SDA GPIO
C1 GPIO PWM0 PWM1_N I2C_SCK GPIO
C2 GPIO I2C_SDA 7816_TRX PWM0 GPIO
C3 GPIO I2C_SCK UART_RX PWM1 GPIO
C4 GPIO PWM0_N UART_CTS PWM2 GPIO
C5 GPIO ATSEL0 UART_RX PWM3_N GPIO
C6 GPIO PWM4_N ATSEL1 RX_CYC2LNA GPIO
C7 GPIO PWM5_N ATSEL2 TX_CYC2PA GPIO


pin Mux1 Mux2 Mux3 Mux4 default
D0 GPIO 7816_TRX - RX_CYC2LNA GPIO
D1 GPIO UART_CTS - TX_CYC2PA GPIO
D2 GPIO PWM3 I2S_LR SPI_CN SPI_CN
D3 GPIO 7816_TRX I2S_SDI PWM1_N GPIO
D4 GPIO PWM2_N I2S_SDO SWM GPIO
D5 GPIO PWM0_N - PWM0 GPIO
D6 GPIO ATSEL0 UART_RX SPI_CN GPIO
D7 GPIO SPI_CK 7816_TRX I2S_BCK SPI_CK

GPIO Drive Strength

There are some differences in the driving strength of different GPIOs. The details are shown in the following table.

pin minimum(mA) maximum(mA) default(mA)
A0 2 4 4
A1 2 4 4
A2 2 4 4
A3 2 4 4
A4 2 4 4
A5 4 8 8
A6 4 8 8
A7 4 8 8


pin minimum(mA) maximum(mA) default(mA)
B0 4 8 8
B1 4 8 8
B2 4 8 8
B3 4 8 8
B4 12 16 16
B5 12 16 16
B6 12 16 16
B7 12 16 16


pin minimum(mA) maximum(mA) default(mA)
C0 2 4 4
C1 2 4 4
C2 2 4 4
C3 2 4 4
C4 2 4 4
C5 2 4 4
C6 2 4 4
C7 2 4 4


pin minimum(mA) maximum(mA) default(mA)
D0 2 4 4
D1 2 4 4
D2 2 4 4
D3 2 4 4
D4 2 4 4
D5 2 4 4
D6 2 4 4
D7 2 4 4

GPIO APIs List

In order to facilitate users to quickly develop products according to their own needs, TSI provide the following related APIs and examples.

APIs list Description Example Update Date Status
gpio_init() initiate all status of GPIO API-GPIO-CASE1 2019-1-10 Done
gpio_set_func() set the multiplex function of GPIO API-GPIO-CASE1 2019-1-10 Done
gpio_set_output_en() enable the output of GPIO API-GPIO-CASE1 2019-1-10 Done
gpio_set_input_en() enable the input of GPIO API-GPIO-CASE1 2019-1-10 Done
gpio_is_output_en() determine if the output of GPIO is enabled - 2019-1-10 Done
gpio_is_input_en() determine if the input of GPIO is enabled - 2019-1-10 Done
gpio_write() set the status of GPIO API-GPIO-CASE4 2019-1-10 Done
gpio_read() get the status of GPIO API-GPIO-CASE4 2019-1-10 Done
gpio_toggle() toggle the status of GPIO API-GPIO-CASE4 2019-1-10 Done
gpio_set_data_strength() set the data strength of GPIO, data strength is set as the highest by default - 2019-1-10 Done
gpio_setup_up_down_resistor() select pull-up resistor or pull-down resistor for GPIO API-GPIO-CASE1 2019-1-10 Done
gpio_set_interrupt() set the specified GPIO as GPIO interrupt API-GPIO-CASE1 2019-1-10 Done
gpio_set_interrupt_risc0() set the specified GPIO as GPIO interrupt risc0 API-GPIO-CASE2 2019-1-10 Done
gpio_set_interrupt_risc1() set the specified GPIO as GPIO interrupt risc1 API-GPIO-CASE3 2019-1-10 Done
gpio_shutdown() set the specified GPIO as high resistor API-GPIO-CASE5 2019-1-10 Done

TSI provides the following examples of this module to help users quickly understand and apply related modules.

Examples list Description Update Date Status
API-GPIO-CASE1 set pin for GPIO interrupt 2019-1-10 Todo
API-GPIO-CASE2 set pin for GPIO interrupt risc0 2019-1-10 Todo
API-GPIO-CASE3 set pin for GPIO interrupt risc1 2019-1-10 Todo
API-GPIO-CASE4 toggle GPIO 2019-1-10 Todo
API-GPIO-CASE5 set the specified GPIO as high resistor 2019-1-10 Todo

History Record

Date Description Author
2019-1-10 initial release LJW
2019-8-15 update api name for application LJW