uart_set_pin problem with UART_PIN_NO_CHANGE ?
Posted: Sun Jul 09, 2017 3:31 am
I was trying to use UART2 with this statement:
uart_set_pin(EX_UART_NUM, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE); // as per esp-idf UART example
and my external serial device output was connected to GPIO16, but the statement doesn work.
instead
uart_set_pin(EX_UART_NUM, 17, 16, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE); // works Ok
so the documentation for uart_set_pin and UART_PIN_NO_CHANGE is a little confusing:
"UART ** pin GPIO number, if set to UART_PIN_NO_CHANGE, use the current pin. " and my wild guess was that current pin eventaually mean the pin listed in esp32_datasheet_en.pdf pg47 table IO_MUX which for UART2 are 16(RXD) and 17(TXD), but obviously either my guess is wrong, or there is some bug in the SDK?
Could you explain where is the problem?
Thanks
uart_set_pin(EX_UART_NUM, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE); // as per esp-idf UART example
and my external serial device output was connected to GPIO16, but the statement doesn work.
instead
uart_set_pin(EX_UART_NUM, 17, 16, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE); // works Ok
so the documentation for uart_set_pin and UART_PIN_NO_CHANGE is a little confusing:
"UART ** pin GPIO number, if set to UART_PIN_NO_CHANGE, use the current pin. " and my wild guess was that current pin eventaually mean the pin listed in esp32_datasheet_en.pdf pg47 table IO_MUX which for UART2 are 16(RXD) and 17(TXD), but obviously either my guess is wrong, or there is some bug in the SDK?
Could you explain where is the problem?
Thanks