From a7a1a788ff03063f3065f6bab2cc19591cf7ef28 Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Sat, 27 Jul 2024 10:27:34 +0200 Subject: [PATCH] spiFlash: 0x0000 is not a valid jedec id --- src/spiFlash.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spiFlash.cpp b/src/spiFlash.cpp index cdf6d19..2d5eb5a 100644 --- a/src/spiFlash.cpp +++ b/src/spiFlash.cpp @@ -525,7 +525,7 @@ void SPIFlash::read_id() } /* something wrong with read */ - if ((_jedec_id >> 8) == 0xffff) + if ((_jedec_id >> 8) == 0xffff || (_jedec_id >> 8) == 0x0000) throw std::runtime_error("Read ID failed"); if (_verbose > 0)