Skip to content

Commit

Permalink
Merge branch 'bugfix/esp32s3_usb_otg_console_without_efuse_v5.2' into…
Browse files Browse the repository at this point in the history
… 'release/v5.2'

fix(console): switch USB PHY to OTG when OTG is used for console (v5.2)

See merge request espressif/esp-idf!27134
  • Loading branch information
suda-morris committed Nov 16, 2023
2 parents 681439b + 8fe15a2 commit 43f2476
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion components/bootloader_support/src/bootloader_console.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2020-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand All @@ -18,6 +18,9 @@
#include "esp32s2/rom/usb/cdc_acm.h"
#include "esp32s2/rom/usb/usb_common.h"
#endif
#if SOC_USB_SERIAL_JTAG_SUPPORTED
#include "hal/usb_phy_ll.h"
#endif
#include "esp_rom_gpio.h"
#include "esp_rom_uart.h"
#include "esp_rom_sys.h"
Expand Down Expand Up @@ -98,6 +101,9 @@ void bootloader_console_init(void)
esp_rom_uart_usb_acm_init(s_usb_cdc_buf, sizeof(s_usb_cdc_buf));
esp_rom_uart_set_as_console(ESP_ROM_USB_OTG_NUM);
esp_rom_install_channel_putc(1, bootloader_console_write_char_usb);
#if SOC_USB_SERIAL_JTAG_SUPPORTED
usb_phy_ll_int_otg_enable(&USB_WRAP);
#endif
}
#endif //CONFIG_ESP_CONSOLE_USB_CDC

Expand Down

0 comments on commit 43f2476

Please sign in to comment.