From a639511b23a011eb2402e6bf43a58d7c00f11128 Mon Sep 17 00:00:00 2001 From: mikeller Date: Mon, 8 Feb 2021 15:49:55 +1300 Subject: [PATCH] Fixed detection of CC2500 with SPI transactions enabled. --- src/main/rx/cc2500_common.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/rx/cc2500_common.c b/src/main/rx/cc2500_common.c index f7020d735f..05a143c5b5 100644 --- a/src/main/rx/cc2500_common.c +++ b/src/main/rx/cc2500_common.c @@ -103,8 +103,11 @@ void cc2500TxDisable(void) static bool cc2500SpiDetect(void) { + cc2500Reset(); // Reset the chip and give it time to wake up + const uint8_t chipPartNum = cc2500ReadReg(CC2500_30_PARTNUM | CC2500_READ_BURST); //CC2500 read registers chip part num const uint8_t chipVersion = cc2500ReadReg(CC2500_31_VERSION | CC2500_READ_BURST); //CC2500 read registers chip version + if (chipPartNum == 0x80 && chipVersion == 0x03) { return true; }