Extend the Sensortag external flash Driver to support more parts

The driver currently supports two Winbond external flash parts with identical instruction sets. The instruction set of the Macronix MX25R8035F appears to be a superset. We therefore change the driver to add the MID/DID of the Macronix to the list of supported parts.

This will subsequently allow us to share the same driver for both the SensorTag and the CC2650 LauchPad.
This commit is contained in:
George Oikonomou 2016-01-24 16:49:51 +00:00
parent 7d6966b22c
commit 24871b0702

View File

@ -72,8 +72,10 @@
/* Part specific constants */
#define BLS_DEVICE_ID_W25X20CL 0x11
#define BLS_DEVICE_ID_W25X40CL 0x12
#define BLS_DEVICE_ID_MX25R8035F 0x14
#define BLS_MANUFACTURER_ID 0xEF
#define BLS_WINBOND_MID 0xEF
#define BLS_MACRONIX_MID 0xC2
#define BLS_PROGRAM_PAGE_SIZE 256
#define BLS_ERASE_SECTOR_SIZE 4096
@ -175,8 +177,9 @@ verify_part(void)
return VERIFY_PART_ERROR;
}
if(rbuf[0] != BLS_MANUFACTURER_ID ||
(rbuf[1] != BLS_DEVICE_ID_W25X20CL && rbuf[1] != BLS_DEVICE_ID_W25X40CL)) {
if((rbuf[0] != BLS_WINBOND_MID && rbuf[0] != BLS_MACRONIX_MID) ||
(rbuf[1] != BLS_DEVICE_ID_W25X20CL && rbuf[1] != BLS_DEVICE_ID_W25X40CL
&& rbuf[1] != BLS_DEVICE_ID_MX25R8035F)) {
return VERIFY_PART_POWERED_DOWN;
}
return VERIFY_PART_OK;