EasyManua.ls Logo

Bouffalo Lab BL702 - GPIO Input Settings; GPIO Optional Function Settings; GPIO Output Settings

Default Icon
375 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
BL702/704/706 Reference Manual
1 : UART0_CTS
2 : UART0_TXD
3 : UART0_RXD
4 : UART1_RTS
5 : UART1_CTS
6 : UART1_TXD
7 : UART1_RXD
Take GPIO0 as an example, when fun_sel selects UART, GPIO0 selects UART_SIG0. By default, the value of UART_-
SIG0_SEL is 0, which is UART0_RTS, that is, GPIO is UART0_RTS function. If the application wants to use GPIO
as UART1_TXD, then just set UART_SIG0_SEL to 6, then the function of GPIO0 is UART1_TXD.
3.2.9 GPIO output settings
By setting func_sel to SWGPIO, GPIO can be used as the input/output of ordinary GPIO. Set IE to 0 and OE to 1,
then GPIO can be configured as an output function, and the output value is set through the GPIO_O register group.
When the corresponding Bit of GPIO_O is set to 0, GPIO outputs low level. When the corresponding Bit of GPIO_O
is set to 1, GPIO outputs high level. The output capability can be set through the DRV control bit.
3.2.10 GPIO input settings
By setting func_sel to SWGPIO, setting IE to 1, and OE to 0, users can configure GPIO as an input function. Set
whether to enable the Schmitt trigger through the SMT control bit, and set the pull-up and pull-down attributes through
the PD and PU control bits.
The value of external input can be obtained by reading the bit corresponding to the GPIO_I register.
3.2.11 GPIO optional function settings
By setting func_sel as the corresponding peripheral function, the connection between the GPIO and the peripheral
can be realized, and the input and output of the peripheral can be realized. It can be seen from the basic functional
block diagram of GPIO that when selecting optional functions, you need to set IE to 1, and OE to 0, which means that
the output control function of ordinary GPIO is disconnected.
In this way, for a peripheral with a fixed input function, the OE signal of the peripheral is always 0, thereby realizing the
input function. For a fixed output peripheral, its OE signal is always 1, so that the output is controlled by the peripheral,
and the input signal at this time is the output signal, but it will not be collected by the peripheral being output. When
the peripheral needs both input and output, the input and output can be realized by controlling the OE signal of the
peripheral.
That is: for functions other than swgpio, as the output direction function, the configuration values of IE and OE do not
BL702/704/706 Reference Manual 37/ 375
@2021 Bouffalo Lab
guest@bouffalolab

Table of Contents