From 5ac639113289534a9bcbad01180d081a9dd2e6fb Mon Sep 17 00:00:00 2001 From: Mark Rawling Date: Thu, 7 Oct 2021 11:22:56 -0700 Subject: Tune nanohub spi timeout for faster reads The timeout value of 520 is chosen to work well with DMA, both reads and writes. In particular, it optimises this aspect of read performance and improves the current peak read bandwidth from 290kB/s to 350kB/s. See go/rh-nanohub-mcu-architecture Bug: 169772504 Test: with logic analyser under load and no-load conditions Change-Id: I7a6ca7d5ae71515f922028c1074b2f4074b61d9f --- spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spi.c b/spi.c index bb13f2f..a1383aa 100644 --- a/spi.c +++ b/spi.c @@ -412,7 +412,7 @@ void nanohub_spi_comms_init(struct nanohub_spi_data *spi_data) sizeof(struct nanohub_packet_crc); comms->seq = 1; - comms->timeout_write = 760; + comms->timeout_write = 520; comms->timeout_ack = 272; comms->timeout_reply = 512; comms->open = nanohub_spi_open; -- cgit v1.2.3