Skip to content

Commit

Permalink
configure TX pin to high impedance to improve parallel operation
Browse files Browse the repository at this point in the history
  • Loading branch information
iltis42 committed May 9, 2024
1 parent 63aa91a commit 840eacc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main/Serial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,10 @@ void Serial::begin(){
else{
if( serial1_tx_enable.get() ){
ESP_LOGI(FNAME,"Serial pins normal, TX enabled" );
// Set UART pins(TX, RX, RTS, CTS ) RTS and CTS nor wired, dummy
ESP_ERROR_CHECK(uart_set_pin(uart_num, GPIO_NUM_37, GPIO_NUM_38, GPIO_NUM_33, GPIO_NUM_34));
// Set UART pins(TX, RX, RTS, CTS ) RX, RTS and CTS nor wired, dummy
ESP_ERROR_CHECK(uart_set_pin(uart_num, GPIO_NUM_36, GPIO_NUM_38, GPIO_NUM_33, GPIO_NUM_34));
gpio_set_direction(GPIO_NUM_37, GPIO_MODE_INPUT); // TX: high impedance
gpio_pullup_dis( GPIO_NUM_37 );
}else{
ESP_LOGI(FNAME,"Serial pins normal, TX disable" );
ESP_ERROR_CHECK(uart_set_pin(uart_num, GPIO_NUM_9, GPIO_NUM_38, GPIO_NUM_33, GPIO_NUM_34));
Expand Down

0 comments on commit 840eacc

Please sign in to comment.