mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
test(uhci): enable uhci ota test on C5 and P4
This commit is contained in:
@@ -301,13 +301,13 @@ esp_err_t uhci_receive(uhci_controller_handle_t uhci_ctrl, uint8_t *read_buffer,
|
|||||||
|
|
||||||
size_t node_count = uhci_ctrl->rx_dir.rx_num_dma_nodes;
|
size_t node_count = uhci_ctrl->rx_dir.rx_num_dma_nodes;
|
||||||
|
|
||||||
// Initialize the mount configurations for each DMA node, making sure every no
|
// Initialize the mount configurations for each DMA node, making sure every node is properly aligned.
|
||||||
size_t usable_size = (max_alignment_needed == 0) ? buffer_size : (buffer_size / max_alignment_needed) * max_alignment_needed;
|
size_t usable_size = (max_alignment_needed == 0) ? buffer_size : (buffer_size / max_alignment_needed) * max_alignment_needed;
|
||||||
size_t base_size = (max_alignment_needed == 0) ? usable_size / node_count : (usable_size / node_count / max_alignment_needed) * max_alignment_needed;
|
size_t base_size = (max_alignment_needed == 0) ? usable_size / node_count : (usable_size / node_count / max_alignment_needed) * max_alignment_needed;
|
||||||
size_t remaining_size = usable_size - (base_size * node_count);
|
size_t remaining_size = usable_size - (base_size * node_count);
|
||||||
|
|
||||||
gdma_buffer_mount_config_t mount_configs[node_count];
|
gdma_buffer_mount_config_t mount_configs[node_count];
|
||||||
memset(mount_configs, 0, node_count);
|
memset(mount_configs, 0, node_count * sizeof(gdma_buffer_mount_config_t));
|
||||||
|
|
||||||
for (size_t i = 0; i < node_count; i++) {
|
for (size_t i = 0; i < node_count; i++) {
|
||||||
uhci_ctrl->rx_dir.buffer_size_per_desc_node[i] = base_size;
|
uhci_ctrl->rx_dir.buffer_size_per_desc_node[i] = base_size;
|
||||||
|
|||||||
@@ -480,10 +480,6 @@ examples/peripherals/twai/twai_self_test:
|
|||||||
examples/peripherals/uart/uart_dma_ota:
|
examples/peripherals/uart/uart_dma_ota:
|
||||||
disable:
|
disable:
|
||||||
- if: SOC_UHCI_SUPPORTED != 1
|
- if: SOC_UHCI_SUPPORTED != 1
|
||||||
disable_test:
|
|
||||||
- if: IDF_TARGET in ["esp32p4", "esp32c5"]
|
|
||||||
temporary: true
|
|
||||||
reason: Lack runners
|
|
||||||
|
|
||||||
examples/peripherals/uart/uart_echo_rs485:
|
examples/peripherals/uart/uart_echo_rs485:
|
||||||
enable:
|
enable:
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ def send_file_via_uart(port: str, baud_rate: int, file_path: str, packet_size: i
|
|||||||
],
|
],
|
||||||
indirect=True,
|
indirect=True,
|
||||||
)
|
)
|
||||||
@idf_parametrize('target', ['esp32c6', 'esp32c3', 'esp32s3', 'esp32h2'], indirect=['target'])
|
@idf_parametrize('target', ['esp32c6', 'esp32c3', 'esp32c5', 'esp32s3', 'esp32h2', 'esp32p4'], indirect=['target'])
|
||||||
def test_uart_dma_ota(dut: Dut) -> None:
|
def test_uart_dma_ota(dut: Dut) -> None:
|
||||||
dut.expect_exact('uhci-example: OTA process started')
|
dut.expect_exact('uhci-example: OTA process started')
|
||||||
# We OTA the same binary to another partition and switch to there.
|
# We OTA the same binary to another partition and switch to there.
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
CONFIG_IDF_TARGET="esp32c5"
|
||||||
|
CONFIG_UART_RX_IO=12
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
CONFIG_IDF_TARGET="esp32p4"
|
||||||
|
CONFIG_UART_RX_IO=38
|
||||||
Reference in New Issue
Block a user