Chat freely about anything...

User avatar
By Zsolex
#78902 I am using EspLink from https://github.com/jeelabs/esp-link.

I have Wemos mini in TX/RX swapped mode (GPIO 13/15).
Unfortunately it is sensitive the state of the GPIO15 pin during the boot. It is connected via TTL level shifter therefore it has HIGH state during the boot and it is not booting.
I can pull down with resistor bit it is inconvenient.

I would like to change the 13/15 pins to other. I have found probably the place in 'serbridge.c' but I am confused with the existing code.

Code: Select allif (flashConfig.swap_uart) {
    PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTCK_U, 4); // RX
    PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDO_U, 4); // TX
    PIN_PULLUP_DIS(PERIPHS_IO_MUX_MTDO_U);
    if (flashConfig.rx_pullup) PIN_PULLUP_EN(PERIPHS_IO_MUX_MTCK_U);
    else                       PIN_PULLUP_DIS(PERIPHS_IO_MUX_MTCK_U);
    system_uart_swap();
  } else {
    PIN_FUNC_SELECT(PERIPHS_IO_MUX_U0TXD_U, 0);
    PIN_FUNC_SELECT(PERIPHS_IO_MUX_U0RXD_U, 0);
    PIN_PULLUP_DIS(PERIPHS_IO_MUX_U0TXD_U);
    if (flashConfig.rx_pullup) PIN_PULLUP_EN(PERIPHS_IO_MUX_U0RXD_U);
    else                       PIN_PULLUP_DIS(PERIPHS_IO_MUX_U0RXD_U);
    system_uart_de_swap();
  }


I really do not undestand how it is possible PIN_FUNC_SELECT provide same GPIO number?