pio-usb now only need sysclk to be multiple of 12Mhz

This commit is contained in:
hathach
2025-02-20 22:16:05 +07:00
parent cafc788508
commit 61aab7a86a
2 changed files with 6 additions and 1 deletions

View File

@@ -1,2 +1,3 @@
set(PICO_PLATFORM rp2040)
set(PICO_BOARD pico)
#set(OPENOCD_SERIAL E6614103E719612F)

View File

@@ -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);