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

mincher
Posts: 2
Joined: Fri Dec 07, 2018 8:07 pm

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

Postby mincher » Mon Jan 07, 2019 3:53 am

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.

A.Binder
Posts: 3
Joined: Thu Feb 07, 2019 1:22 pm

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

Postby A.Binder » Thu Feb 07, 2019 1:26 pm

Hi!

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

regards, astrid

A.Binder
Posts: 3
Joined: Thu Feb 07, 2019 1:22 pm

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

Postby A.Binder » Mon Feb 11, 2019 6:42 am

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);

Who is online

Users browsing this forum: No registered users and 86 guests