How to arrange UART0/UART1 pins and functions

costaud
Posts: 138
Joined: Fri Oct 24, 2014 7:40 pm

How to arrange UART0/UART1 pins and functions

Postby costaud » Sun Jan 04, 2015 1:31 pm

1. There are two uart port on esp8266, UART0 and UART1.

The original pin function related to the UART0 port shows below:
001.jpg
001.jpg (130.8 KiB) Viewed 13926 times

FUNC : PIN NAME
U0TXD --> U0TXD
U0RXD --> U0RXD
U0CTS --> MTCK
U0RTS --> MTDO
These pins can operate in a full duplex way with hardware handshake(flwo control).
config details --> viewtopic.php?f=7&t=48

On esp demo board, this picture shows a basic debug environment:
002.png
002.png (663.8 KiB) Viewed 13926 times





2. uart debug info. output:
Usually,for iot project , UART0 can output the debug information. But in AT mode , UART0 communicates with the PC or MCU, so the debug info. should be output via UART1.
(1).SET UART1 PIN FUNC:
PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO2_U, FUNC_U1TXD_BK);
(2).change output port for os_printf:
os_install_putc1((void *)uart1_write_char);

3. how to prevent uart0 output when the chip is booting up.
see --> viewtopic.php?f=7&t=22

Who is online

Users browsing this forum: No registered users and 1 guest