From 61aab7a86aaaf5c254ba5d14a04ff44aec8623d3 Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 20 Feb 2025 22:16:05 +0700 Subject: [PATCH] pio-usb now only need sysclk to be multiple of 12Mhz --- hw/bsp/rp2040/boards/raspberry_pi_pico/board.cmake | 1 + hw/bsp/rp2040/family.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/bsp/rp2040/boards/raspberry_pi_pico/board.cmake b/hw/bsp/rp2040/boards/raspberry_pi_pico/board.cmake index 804cdb50a..2d739291c 100644 --- a/hw/bsp/rp2040/boards/raspberry_pi_pico/board.cmake +++ b/hw/bsp/rp2040/boards/raspberry_pi_pico/board.cmake @@ -1,2 +1,3 @@ set(PICO_PLATFORM rp2040) set(PICO_BOARD pico) +#set(OPENOCD_SERIAL E6614103E719612F) diff --git a/hw/bsp/rp2040/family.c b/hw/bsp/rp2040/family.c index 0c97d6ed0..a6e176308 100644 --- a/hw/bsp/rp2040/family.c +++ b/hw/bsp/rp2040/family.c @@ -162,8 +162,12 @@ void stdio_rtt_init(void) { void board_init(void) { #if (CFG_TUH_ENABLED && CFG_TUH_RPI_PIO_USB) || (CFG_TUD_ENABLED && CFG_TUD_RPI_PIO_USB) - // Set the system clock to a multiple of 120mhz for bitbanging USB with pico-usb + // Set the system clock to a multiple of 12mhz for bit-banging USB with pico-usb set_sys_clock_khz(120000, true); + // set_sys_clock_khz(180000, true); + // set_sys_clock_khz(192000, true); + // set_sys_clock_khz(240000, true); + // set_sys_clock_khz(264000, true); #ifdef PICO_DEFAULT_PIO_USB_VBUSEN_PIN gpio_init(PICO_DEFAULT_PIO_USB_VBUSEN_PIN);