diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-03-02 23:22:40 -0700 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-03-04 00:12:54 -0700 |
commit | 7a1f764cda070de396fcb186e1f7457ff2704ba4 (patch) | |
tree | 7597531f40d76017114b1762e2803f687888a132 /cmd/sbc_harness | |
parent | c336bf7f2205131c86e6d2991770a2c150d85ca9 (diff) |
Bump the CPU clock speed, wring a few more MHz out of the hwspi
Diffstat (limited to 'cmd/sbc_harness')
-rw-r--r-- | cmd/sbc_harness/CMakeLists.txt | 10 | ||||
-rw-r--r-- | cmd/sbc_harness/main.c | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/cmd/sbc_harness/CMakeLists.txt b/cmd/sbc_harness/CMakeLists.txt index 081a5fc..d7923c2 100644 --- a/cmd/sbc_harness/CMakeLists.txt +++ b/cmd/sbc_harness/CMakeLists.txt @@ -31,6 +31,16 @@ target_link_libraries(sbc_harness_objs pico_minimize_runtime(sbc_harness_objs INCLUDE PRINTF PRINTF_MINIMAL PRINTF_LONG_LONG PRINTF_PTRDIFF_T ) +target_compile_definitions(sbc_harness_objs PRIVATE + #PICO_USE_FASTEST_SUPPORTED_CLOCK=1 + + # Calculated by `./3rd-party/pico-sdk/src/rp2_common/hardware_clocks/scripts/vcocalc.py --cmake-only 170` + PLL_SYS_REFDIV=2 + PLL_SYS_VCO_FREQ_HZ=1530000000 + PLL_SYS_POSTDIV1=3 + PLL_SYS_POSTDIV2=3 + SYS_CLK_HZ=170000000 +) suppress_tinyusb_warnings() diff --git a/cmd/sbc_harness/main.c b/cmd/sbc_harness/main.c index 8e2c5ee..c932ec0 100644 --- a/cmd/sbc_harness/main.c +++ b/cmd/sbc_harness/main.c @@ -168,7 +168,7 @@ COROUTINE init_cr(void *) { rp2040_hwspi_init(&globals.dev_spi, "W5500", RP2040_HWSPI_0, SPI_MODE_0, /* the W5500 supports mode 0 or mode 3 */ - 31250000, /* min(w5500, hwspi); w5500=80MHz; hwspi=31.25MHz, see rp2040_hwspi.h for a comment about why this is so low */ + 42500000, /* min(w5500, hwspi); w5500=80MHz; hwspi=42.5MHz, see rp2040_hwspi.h for a comment about why this is so low */ 30, /* W5500 datasheet says min(T_CS = SCSn High Time) = 30ns */ 0, /* bogus write write data when doing a read */ 16, /* PIN_MISO */ |