Page 1 of 1

Changing console UART from menuconfig/Component Config/ESP32-specific not working

Posted: Mon Jan 07, 2019 3:53 am
by mincher
Hi.

I'm trying to select a custom console configuration using menuconfig settings. From Component Config->ESP32-Specific I am setting UART Console Output to Custom, UART Peripheral to use to UART0, TX GPIO pin to 15, and RX GPIO pin to 14. When I do this I get no console output on GPIO 15. I get no output on the standard console TX pin either after setting this configuration.

I know that these pins are correct for my hardware because I can run the UART echo example specifying those pins and loopback does work.

I can see code in the bootloader_support code that seems to do the uart_tx_switch, etc. The #ifdefs in there seem to match what I expect from the configuration I'm setting with menuconfig.

Is there anything else I should have to do? I'm sure it's not a common thing to do, but the mechanism exists and what I can see of the implementation it seems to make sense. Seems very simple just to swap the io pins -- I'm not even trying to change the uart #.

Thanks.

Re: Changing console UART from menuconfig/Component Config/ESP32-specific not working

Posted: Thu Feb 07, 2019 1:26 pm
by A.Binder
Hi!

I have exactly the same problem. Could you solve your problem?

regards, astrid

Re: Changing console UART from menuconfig/Component Config/ESP32-specific not working

Posted: Mon Feb 11, 2019 6:42 am
by A.Binder
okay, I found it out myself. I put the following lines into app_main and now it works:

Code: Select all

	gpio_set_direction(GPIO_NUM_15, GPIO_MODE_DEF_OUTPUT);
	uart_set_pin(UART_NUM_0, 15, 21, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE);