Skip to content

Commit

Permalink
Merge pull request PaulStoffregen#66 from FrankBoesing/Adesto-Chips
Browse files Browse the repository at this point in the history
add Adesto AT25SF128A
  • Loading branch information
PaulStoffregen authored Feb 12, 2020
2 parents 71cfa7a + a1998a3 commit 2b86eb1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions SerialFlashChip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ bool SerialFlashChip::ready()
#define ID0_MICRON 0x20
#define ID0_MACRONIX 0xC2
#define ID0_SST 0xBF
#define ID0_ADESTO 0x1F

//#define FLAG_32BIT_ADDR 0x01 // larger than 16 MByte address
//#define FLAG_STATUS_CMD70 0x02 // requires special busy flag check
Expand Down Expand Up @@ -452,6 +453,9 @@ uint32_t SerialFlashChip::capacity(const uint8_t *id)
{
uint32_t n = 1048576; // unknown chips, default to 1 MByte

if (id[0] == ID0_ADESTO && id[1] == 0x89) {
n = 1048576*16; //16MB
} else
if (id[2] >= 16 && id[2] <= 31) {
n = 1ul << id[2];
} else
Expand Down Expand Up @@ -488,6 +492,7 @@ N25Q512A 4 64
N25Q00AA 4 64
S25FL512S 256
SST26VF032 4
AT25SF128A 32 64
*/


Expand Down Expand Up @@ -520,5 +525,6 @@ SST26VF032 4
// SST25VF032 4 64 BF 25 4A
// SST26VF064 8 ? BF 26 43
// LE25U40CMC 1/2 64 62 06 13
// Adesto AT25SF128A 16 1F 89 01

SerialFlashChip SerialFlash;
6 changes: 6 additions & 0 deletions examples/RawHardwareTest/RawHardwareTest.ino
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,12 @@ const char * id2chip(const unsigned char *id)
if (id[2] == 0x43) return "SST26VF064";
}
}
if (id[0] == 0x1F) {
// Adesto
if (id[1] == 0x89) {
if (id[2] == 0x01) return "AT25SF128A";
}
}
return "(unknown chip)";
}

Expand Down

0 comments on commit 2b86eb1

Please sign in to comment.