From f226fe7c5ca7c256d2c0f7e110de654162b20cf0 Mon Sep 17 00:00:00 2001 From: Steve Evans Date: Wed, 28 Jul 2021 18:04:22 +0100 Subject: [PATCH] Fix chipID decode --- src/main/drivers/flash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/drivers/flash.c b/src/main/drivers/flash.c index d42fdba06c..8ec634ca60 100644 --- a/src/main/drivers/flash.c +++ b/src/main/drivers/flash.c @@ -190,7 +190,7 @@ static bool flashSpiInit(const flashConfig_t *flashConfig) #endif // Newer chips - chipID = (readIdResponse[2] << 16) | (readIdResponse[3] << 8) | (readIdResponse[4]); + chipID = (readIdResponse[1] << 16) | (readIdResponse[2] << 8) | (readIdResponse[3]); #ifdef USE_FLASH_W25N01G if (w25n01g_detect(&flashDevice, chipID)) {