summaryrefslogtreecommitdiff
path: root/cmd/sbc_harness
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-03-02 21:16:35 -0700
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-03-02 23:49:27 -0700
commit6354a440b24d9a0b157c8c5571403f09dd04c245 (patch)
tree303b9bb8d5cb80c9ec5b85cfee34f06bc519c8d6 /cmd/sbc_harness
parent5a3d7bafd47067e9659c5773e371e796e6d3585b (diff)
libhw: Update comments and asserts about clock rate
Diffstat (limited to 'cmd/sbc_harness')
-rw-r--r--cmd/sbc_harness/config/config.h4
-rw-r--r--cmd/sbc_harness/main.c10
2 files changed, 9 insertions, 5 deletions
diff --git a/cmd/sbc_harness/config/config.h b/cmd/sbc_harness/config/config.h
index 0fa95ae..e923ac8 100644
--- a/cmd/sbc_harness/config/config.h
+++ b/cmd/sbc_harness/config/config.h
@@ -9,6 +9,10 @@
#include <stddef.h> /* for size_t */
+/* RP2040 *********************************************************************/
+
+#define CONFIG_RP2040_SPI_DEBUG 1 /* bool */
+
/* W5500 **********************************************************************/
/**
diff --git a/cmd/sbc_harness/main.c b/cmd/sbc_harness/main.c
index 6f1d0ca..6fa76bd 100644
--- a/cmd/sbc_harness/main.c
+++ b/cmd/sbc_harness/main.c
@@ -168,11 +168,11 @@ 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 */
- 60*1000*1000, /* as close to the W5500's max rate of 80MHz as we can without hwspi borking */
- 16, /* PIN_MISO */
- 19, /* PIN_MOSI */
- 18, /* PIN_CLK */
- 17); /* PIN_CS */
+ 31250000, /* min(w5500, hwspi); w5500=80MHz; hwspi=31.25MHz, see rp2040_hwspi.h for a comment about why this is so low */
+ 16, /* PIN_MISO */
+ 19, /* PIN_MOSI */
+ 18, /* PIN_CLK */
+ 17);/* PIN_CS */
w5500_init(&globals.dev_w5500, "W5500",
lo_box_rp2040_hwspi_as_spi(&globals.dev_spi),
21, /* PIN_INTR */