mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
Merge branch 'fix/esp32c5_usj_console_stuck_v6.0' into 'release/v6.0'
fix(esp32c5): Do not disable UART0 sclk when USB Serial/JTAG is primary console (v6.0) See merge request espressif/esp-idf!48874
This commit is contained in:
@@ -7,7 +7,7 @@ components/esp_driver_usb_serial_jtag/test_apps/usb_serial_jtag:
|
|||||||
temporary: true
|
temporary: true
|
||||||
reason: p4 rev3 migration # TODO: IDF-14364
|
reason: p4 rev3 migration # TODO: IDF-14364
|
||||||
disable_test:
|
disable_test:
|
||||||
- if: IDF_TARGET in ["esp32c5", "esp32h4", "esp32h21"]
|
- if: IDF_TARGET in ["esp32h4", "esp32h21"]
|
||||||
temporary: true
|
temporary: true
|
||||||
reason: No runners.
|
reason: No runners.
|
||||||
depends_components:
|
depends_components:
|
||||||
@@ -24,7 +24,7 @@ components/esp_driver_usb_serial_jtag/test_apps/usb_serial_jtag_vfs:
|
|||||||
temporary: true
|
temporary: true
|
||||||
reason: p4 rev3 migration # TODO: IDF-14364
|
reason: p4 rev3 migration # TODO: IDF-14364
|
||||||
disable_test:
|
disable_test:
|
||||||
- if: IDF_TARGET in ["esp32c5", "esp32h4", "esp32h21"]
|
- if: IDF_TARGET in ["esp32h4", "esp32h21"]
|
||||||
temporary: true
|
temporary: true
|
||||||
reason: No runners.
|
reason: No runners.
|
||||||
depends_components:
|
depends_components:
|
||||||
|
|||||||
+7
-3
@@ -1,4 +1,4 @@
|
|||||||
# SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
|
# SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
import pytest
|
import pytest
|
||||||
from pytest_embedded import Dut
|
from pytest_embedded import Dut
|
||||||
@@ -13,7 +13,9 @@ from pytest_embedded_idf.utils import idf_parametrize
|
|||||||
],
|
],
|
||||||
indirect=True,
|
indirect=True,
|
||||||
)
|
)
|
||||||
@idf_parametrize('target', ['esp32s3', 'esp32c3', 'esp32c6', 'esp32h2', 'esp32c61', 'esp32p4'], indirect=['target'])
|
@idf_parametrize(
|
||||||
|
'target', ['esp32s3', 'esp32c3', 'esp32c6', 'esp32h2', 'esp32c61', 'esp32p4', 'esp32c5'], indirect=['target']
|
||||||
|
)
|
||||||
def test_usb_serial_jtag_dev(dut: Dut) -> None: # type: ignore
|
def test_usb_serial_jtag_dev(dut: Dut) -> None: # type: ignore
|
||||||
dut.expect_exact('Press ENTER to see the list of tests')
|
dut.expect_exact('Press ENTER to see the list of tests')
|
||||||
dut.write('"test print via usb_serial_jtag driver multiple times in different tasks"')
|
dut.write('"test print via usb_serial_jtag driver multiple times in different tasks"')
|
||||||
@@ -35,7 +37,9 @@ def test_usb_serial_jtag_dev(dut: Dut) -> None: # type: ignore
|
|||||||
],
|
],
|
||||||
indirect=True,
|
indirect=True,
|
||||||
)
|
)
|
||||||
@idf_parametrize('target', ['esp32s3', 'esp32c3', 'esp32c6', 'esp32h2', 'esp32c61', 'esp32p4'], indirect=['target'])
|
@idf_parametrize(
|
||||||
|
'target', ['esp32s3', 'esp32c3', 'esp32c6', 'esp32h2', 'esp32c61', 'esp32p4', 'esp32c5'], indirect=['target']
|
||||||
|
)
|
||||||
def test_usb_serial_jtag_rom_dev(dut: Dut) -> None: # type: ignore
|
def test_usb_serial_jtag_rom_dev(dut: Dut) -> None: # type: ignore
|
||||||
dut.expect_exact('Press ENTER to see the list of tests')
|
dut.expect_exact('Press ENTER to see the list of tests')
|
||||||
dut.write('"test rom printf work after driver installed"')
|
dut.write('"test rom printf work after driver installed"')
|
||||||
|
|||||||
+7
-3
@@ -1,4 +1,4 @@
|
|||||||
# SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
|
# SPDX-FileCopyrightText: 2024-2026 Espressif Systems (Shanghai) CO LTD
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
import pytest
|
import pytest
|
||||||
from pytest_embedded import Dut
|
from pytest_embedded import Dut
|
||||||
@@ -13,7 +13,9 @@ from pytest_embedded_idf.utils import idf_parametrize
|
|||||||
],
|
],
|
||||||
indirect=True,
|
indirect=True,
|
||||||
)
|
)
|
||||||
@idf_parametrize('target', ['esp32s3', 'esp32c3', 'esp32c6', 'esp32h2', 'esp32c61', 'esp32p4'], indirect=['target'])
|
@idf_parametrize(
|
||||||
|
'target', ['esp32s3', 'esp32c3', 'esp32c6', 'esp32h2', 'esp32c61', 'esp32p4', 'esp32c5'], indirect=['target']
|
||||||
|
)
|
||||||
def test_usj_vfs_select(dut: Dut) -> None:
|
def test_usj_vfs_select(dut: Dut) -> None:
|
||||||
test_message = 'test123456789!@#%^&*'
|
test_message = 'test123456789!@#%^&*'
|
||||||
|
|
||||||
@@ -33,7 +35,9 @@ def test_usj_vfs_select(dut: Dut) -> None:
|
|||||||
],
|
],
|
||||||
indirect=True,
|
indirect=True,
|
||||||
)
|
)
|
||||||
@idf_parametrize('target', ['esp32s3', 'esp32c3', 'esp32c6', 'esp32h2', 'esp32c61', 'esp32p4'], indirect=['target'])
|
@idf_parametrize(
|
||||||
|
'target', ['esp32s3', 'esp32c3', 'esp32c6', 'esp32h2', 'esp32c61', 'esp32p4', 'esp32c5'], indirect=['target']
|
||||||
|
)
|
||||||
def test_usj_vfs_read_return(dut: Dut) -> None:
|
def test_usj_vfs_read_return(dut: Dut) -> None:
|
||||||
test_message = '!(@*#&(!*@&#((SDasdkjhad\nce'
|
test_message = '!(@*#&(!*@&#((SDasdkjhad\nce'
|
||||||
|
|
||||||
|
|||||||
@@ -251,5 +251,15 @@ __attribute__((weak)) void esp_perip_clk_init(void)
|
|||||||
clk_gate_config.disable_pvt_clk = true;
|
clk_gate_config.disable_pvt_clk = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG) && CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG
|
||||||
|
/* ESP32-C5 rev <= 1.0: Do not disable UART0 sclk when USB Serial/JTAG is primary console.
|
||||||
|
* Disabling it would cause the chip to end in infinite loop on reset (workaround for rom code issue).
|
||||||
|
* See: IDFGH-17050
|
||||||
|
*/
|
||||||
|
if (efuse_hal_chip_revision() <= 100) {
|
||||||
|
clk_gate_config.disable_uart0_clk = false;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
periph_ll_clk_gate_set_default(rst_reason, &clk_gate_config);
|
periph_ll_clk_gate_set_default(rst_reason, &clk_gate_config);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user