From 90b5d2a1499bd6e4afa10bc2de97c3886ee2fba6 Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Fri, 18 May 2018 15:05:24 +0100 Subject: [PATCH] Differentiate flash part across sensortag/cc2650 versions Older CC2650 sensortags have a Winbond W25X40CL 4MBit SPI flash. Newer ones have a Macronix MX25R8035F 8MBit part. The parts have almost identical instruction sets and are both supported by our generic external flash driver. The key difference between the two parts is that they have different Manufacturer and Device IDs. This commit allows us to switch between the two: We default to the new revision, and allow users to build for the older one by defining `SENSORTAG_CC2650_REV_1_2_0` to 1. Current tags are version 1.5.1. Older tags are version 1.2.0. To identify older tags, look for "Rev: 1.2" printed on the PCB. They should also have a sticker that reads "Rev: 1.3.0" and "HW Rev 1.2.0". --- arch/platform/srf06-cc26xx/sensortag/cc2650/board.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/platform/srf06-cc26xx/sensortag/cc2650/board.h b/arch/platform/srf06-cc26xx/sensortag/cc2650/board.h index 7da0e9458..dda3e46e5 100644 --- a/arch/platform/srf06-cc26xx/sensortag/cc2650/board.h +++ b/arch/platform/srf06-cc26xx/sensortag/cc2650/board.h @@ -149,8 +149,13 @@ #define EXT_FLASH_SPI_PIN_MISO 18 #define EXT_FLASH_SPI_PIN_CS 14 +#if SENSORTAG_CC2650_REV_1_2_0 +#define EXT_FLASH_DEVICE_ID 0x12 +#define EXT_FLASH_MID 0xEF +#else #define EXT_FLASH_DEVICE_ID 0x14 #define EXT_FLASH_MID 0xC2 +#endif #define EXT_FLASH_PROGRAM_PAGE_SIZE 256 #define EXT_FLASH_ERASE_SECTOR_SIZE 4096