Extend the flash driver to support the MX25R1635F
According to the CC1310LP design files, the flash on it is the same as the flash on the CC2650 LP (MX25R8035F 8Mbit). However, the flash on some CC1310 LPs reportedly identifies itself as the 16Mbit one (MX25R1635F). Instruction sets are identical, we simply need to tell the driver to recognise this part's Device ID.
This commit is contained in:
parent
18f67dade2
commit
80efd730ae
|
@ -40,6 +40,9 @@
|
||||||
#include "ext-flash.h"
|
#include "ext-flash.h"
|
||||||
#include "ti-lib.h"
|
#include "ti-lib.h"
|
||||||
#include "board-spi.h"
|
#include "board-spi.h"
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
/* Instruction codes */
|
/* Instruction codes */
|
||||||
|
|
||||||
|
@ -73,6 +76,7 @@
|
||||||
#define BLS_DEVICE_ID_W25X20CL 0x11
|
#define BLS_DEVICE_ID_W25X20CL 0x11
|
||||||
#define BLS_DEVICE_ID_W25X40CL 0x12
|
#define BLS_DEVICE_ID_W25X40CL 0x12
|
||||||
#define BLS_DEVICE_ID_MX25R8035F 0x14
|
#define BLS_DEVICE_ID_MX25R8035F 0x14
|
||||||
|
#define BLS_DEVICE_ID_MX25R1635F 0x15
|
||||||
|
|
||||||
#define BLS_WINBOND_MID 0xEF
|
#define BLS_WINBOND_MID 0xEF
|
||||||
#define BLS_MACRONIX_MID 0xC2
|
#define BLS_MACRONIX_MID 0xC2
|
||||||
|
@ -179,7 +183,8 @@ verify_part(void)
|
||||||
|
|
||||||
if((rbuf[0] != BLS_WINBOND_MID && rbuf[0] != BLS_MACRONIX_MID) ||
|
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_W25X20CL && rbuf[1] != BLS_DEVICE_ID_W25X40CL
|
||||||
&& rbuf[1] != BLS_DEVICE_ID_MX25R8035F)) {
|
&& rbuf[1] != BLS_DEVICE_ID_MX25R8035F
|
||||||
|
&& rbuf[1] != BLS_DEVICE_ID_MX25R1635F)) {
|
||||||
return VERIFY_PART_POWERED_DOWN;
|
return VERIFY_PART_POWERED_DOWN;
|
||||||
}
|
}
|
||||||
return VERIFY_PART_OK;
|
return VERIFY_PART_OK;
|
||||||
|
|
Loading…
Reference in a new issue