From 29d4c82efb9654aa8739cd806a9e81d37830e23e Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 27 Aug 2024 16:38:26 +0700 Subject: [PATCH] reset usb when init for max32650/66. change hil max32 to use pico (cmsis dap2), change metro m4 flasher --- hw/bsp/max32650/family.c | 1 + hw/bsp/max32650/family.cmake | 2 +- hw/bsp/max32666/family.c | 1 + test/hil/rpi.json | 19 ++++++------------- 4 files changed, 9 insertions(+), 14 deletions(-) diff --git a/hw/bsp/max32650/family.c b/hw/bsp/max32650/family.c index 89a5db160..bb382cdd4 100644 --- a/hw/bsp/max32650/family.c +++ b/hw/bsp/max32650/family.c @@ -94,6 +94,7 @@ void board_init(void) { } MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_USB); + MXC_SYS_Reset_Periph(MXC_SYS_RESET_USB); } //--------------------------------------------------------------------+ diff --git a/hw/bsp/max32650/family.cmake b/hw/bsp/max32650/family.cmake index e05bd7652..48853b92c 100644 --- a/hw/bsp/max32650/family.cmake +++ b/hw/bsp/max32650/family.cmake @@ -148,10 +148,10 @@ function(family_configure_example TARGET RTOS) # Flashing family_flash_jlink(${TARGET}) + family_flash_openocd_adi(${TARGET}) # Add the optional MSDK OpenOCD flashing family_flash_msdk(${TARGET}) - family_flash_openocd_adi(${TARGET}) endfunction() function(family_flash_msdk TARGET) diff --git a/hw/bsp/max32666/family.c b/hw/bsp/max32666/family.c index 8ee4b6762..f96393fe1 100644 --- a/hw/bsp/max32666/family.c +++ b/hw/bsp/max32666/family.c @@ -93,6 +93,7 @@ void board_init(void) { } MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_USB); + MXC_SYS_Reset_Periph(MXC_SYS_RESET_USB); } //--------------------------------------------------------------------+ diff --git a/test/hil/rpi.json b/test/hil/rpi.json index 7821f1660..259f8ca83 100644 --- a/test/hil/rpi.json +++ b/test/hil/rpi.json @@ -10,9 +10,9 @@ { "name": "metro_m4_express", "uid": "9995AD485337433231202020FF100A34", - "flasher": "openocd", - "flasher_sn": "E6633861A3978538", - "flasher_args": "-f interface/cmsis-dap.cfg -f target/atsame5x.cfg", + "flasher": "jlink", + "flasher_sn": "123456", + "flasher_args": "-device ATSAMD51J19", "tests": { "dual_attached": [{"vid_pid": "1a86_55d4", "serial": "52D2002130"}] } @@ -20,9 +20,9 @@ { "name": "max32666fthr", "uid": "0C81464124010B20FF0A08CC2C", - "flasher": "jlink", - "flasher_sn": "000801011822", - "flasher_args": "-device max32666" + "flasher": "openocd_adi", + "flasher_sn": "E6614C311B597D32", + "flasher_args": "-f interface/cmsis-dap.cfg -f target/max32665.cfg" }, { "name": "lpcxpresso11u37", @@ -92,13 +92,6 @@ "flasher": "esptool", "flasher_sn": "3ea619acd1cdeb11a0a0b806e93fd3f1", "flasher_args": "-b 921600" - }, - { - "name": "max32666fthr", - "uid": "0C81464124010B20FF0A08CC2C", - "flasher": "openocd_adi", - "flasher_sn": "042217023bffc88100000000000000000000000097969906", - "flasher_args": "-f interface/cmsis-dap.cfg -f target/max32665.cfg" } ] }