Chat here is you are connecting ESP-xx type modules to existing AVR based Arduino

Moderator: igrr

User avatar
By btidey
#81281 I don't think the things called pin12, 13 in the document refer to GPIO numbering. They also don't relate to the chip pins. I suspect they may refer to numbering on the evaluation board featured.

As far as I know U0CTS is on GPIO13 and U0RTS is on GPIO15
User avatar
By HowardHo
#81320 It was hard to find and a lot of trial and error, but this seems to work. It required a lot of digging in the header files of the 8266. Note the const of RTSPin and CTSPin are not used.

const int RTSPin = GPF15; // GPIO15 for RTS
U0C0 |= 0x08000; // this sets tx (rx_flow_en) flow control via MTDO( RTS )

const int CTSPin = GPF13; // GPIO13 for CTS input
U0C1 |= 0x00800000; // 2^24; // UCRXHFE enable rx flow control (rx_flow_en)
// set fifo threshold levels note: setting threshold may not be necessary
const long UART_RX_FLOW_THRHD = 0x0000007F; // FIFO threshold level 0-7 bits 0-127
const long UART_RX_FLOW_THRHD_S = 16; // starts at bit 16

// set pin function the hard way
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTCK_U, FUNC_UART0_CTS); // function 5 according to
// ESP8266_Pin_List_141105.xlsx

I think the "secret" was the mux of the pins in the last two statements. I found this earlier in another post but the parameters of the PIN_FUNC_SELECT were either wrong or changed so I didn't try it.
User avatar
By JimDrew
#81329 What routine do yo have for PIN_FUNC_SELECT() ??

This generates an error when trying to compile with the Arduino IDE because that function does not exist.

Also, how do you have this wired? ie. CTS on ESP8266 to RTS on RS232 interface/micro/etc.?