From d114963f0e2662f65170189a9bf2a182be095792 Mon Sep 17 00:00:00 2001 From: Joshua Tyler Date: Sat, 6 Jun 2020 16:37:18 +0100 Subject: [PATCH] Adjust delay time --- picosoc/spimemio.v | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/picosoc/spimemio.v b/picosoc/spimemio.v index 934ab66..863ebf1 100644 --- a/picosoc/spimemio.v +++ b/picosoc/spimemio.v @@ -204,7 +204,7 @@ module spimemio ( reg [3:0] state; - reg [9:0] wakeup_ctr; + reg [11:0] wakeup_ctr; always @(posedge clk) begin xfer_resetn <= 1; @@ -270,8 +270,9 @@ module spimemio ( // SPI flash chips that support power-down typically require // some time to wake up before they can respond to commands // (e.g. 3us For W25Q128JVSIM) - // This counter wastes 1024 clock cyles - // This is 102.4us at 10MHz, and 5.12us at 200MHz + // (e.g. 30us For MT25QL128ABA1ESE-0SIT) + // This counter wastes 2^12 clock cyles + // I.E. 41us at 100MHz, and 410us at 10MHz // This range should cover all conceivable use cases if(&wakeup_ctr) begin state <= 5;