How to enable & use UART1?

esp8266ac
Posts: 7
Joined: Sun Oct 04, 2015 12:39 am

How to enable & use UART1?

Postby esp8266ac » Tue Jan 19, 2016 6:11 pm

Hi All:

I want to use UART1 as debug console (simulates input/output from WIFI) and use UART0 as communication port with function device:
PC console <==> UART1 -- ESP8266 -- UART0 <==> Function Device

Questions:
1. Does RTOS-SDK support UART1 ?
2. How to enable & use UART1 in firmware? any sample code?
3. How to connect Hardware wires/pins?

Many thanks!
B.R.
Macrogram

ESP_Faye
Posts: 1646
Joined: Mon Oct 27, 2014 11:08 am

Re: How to enable & use UART1?

Postby ESP_Faye » Wed Jan 20, 2016 3:31 pm

Hi,

ESP8266 do support UART1, but please notice that UART1 only has TX, UART0 has both TX and RX. So it is suggested to use UART1 to print logs, use UART0 to do communication work.

You can refer to the ESP8266_RTOS_SDK\example\driver_lib\driver\uart.c to user UART.

UART documentation : http://bbs.espressif.com/viewtopic.php?f=51&t=819.

Thanks for your interest in ESP8266!

Who is online

Users browsing this forum: No registered users and 190 guests