From 7885ef3f9e3e2434e8fd8227c7abd5c8b1a11ce9 Mon Sep 17 00:00:00 2001 From: LowPowerLab Date: Fri, 4 Aug 2017 11:44:22 -0400 Subject: [PATCH] fix wakeup() --- SPIFlash.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPIFlash.cpp b/SPIFlash.cpp index 63642a2..fa6ffd4 100644 --- a/SPIFlash.cpp +++ b/SPIFlash.cpp @@ -179,7 +179,7 @@ void SPIFlash::command(uint8_t cmd, boolean isWrite){ // that is because some chips can take several seconds to carry out a chip erase or other similar multi block or entire-chip operations // a recommended alternative to such situations where chip can be or not be present is to add a 10k or similar weak pulldown on the // open drain MISO input which can read noise/static and hence return a non 0 status byte, causing the while() to hang when a flash chip is not present - while(busy()); + if (cmd != SPIFLASH_WAKE) while(busy()); select(); SPI.transfer(cmd); }