mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 13:00:42 -07:00
some generic devices has other sizes of flash
This commit is contained in:
parent
21ab53c7cf
commit
475bbe183d
2 changed files with 22 additions and 9 deletions
|
@ -350,11 +350,25 @@ void Flashmem_print_status(void) {
|
||||||
if (!Flash_ReadID_90(&device_type)) {
|
if (!Flash_ReadID_90(&device_type)) {
|
||||||
DbpString(" Device ID............... " _RED_(" --> Not Found <--"));
|
DbpString(" Device ID............... " _RED_(" --> Not Found <--"));
|
||||||
} else {
|
} else {
|
||||||
if ((device_type.manufacturer_id == WINBOND_MANID) && (device_type.device_id == WINBOND_DEVID)) {
|
if (device_type.manufacturer_id == WINBOND_MANID) {
|
||||||
DbpString(" Memory size............. " _GREEN_("2 mbits / 256 kb"));
|
switch (device_type.device_id) {
|
||||||
|
case WINBOND_2MB_DEVID:
|
||||||
|
DbpString(" Memory size............. " _YELLOW_("2 mbits / 256 kb"));
|
||||||
|
break;
|
||||||
|
case WINBOND_1MB_DEVID:
|
||||||
|
DbpString(" Memory size..... ....... " _YELLOW_("1 mbits / 128 kb"));
|
||||||
|
break;
|
||||||
|
case WINBOND_512KB_DEVID:
|
||||||
|
DbpString(" Memory size............. " _YELLOW_("512 kbits / 64 kb"));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Dbprintf(" Device ID............... " _YELLOW_("%02X / %02X (unknown)"),
|
Dbprintf(" Device ID............... " _YELLOW_("%02X / %02X (unknown)"),
|
||||||
device_type.manufacturer_id, device_type.device_id);
|
device_type.manufacturer_id,
|
||||||
|
device_type.device_id
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -578,10 +592,6 @@ bool Flash_CheckBusy(uint32_t timeout) {
|
||||||
StartCountUS();
|
StartCountUS();
|
||||||
uint32_t _time = GetCountUS();
|
uint32_t _time = GetCountUS();
|
||||||
|
|
||||||
#ifndef AS_BOOTROM
|
|
||||||
if (g_dbglevel > 3) Dbprintf("Checkbusy in...");
|
|
||||||
#endif // AS_BOOTROM
|
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if (!(Flash_ReadStat1() & BUSY)) {
|
if (!(Flash_ReadStat1() & BUSY)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -55,7 +55,10 @@
|
||||||
#define BUSY_TIMEOUT 200000L
|
#define BUSY_TIMEOUT 200000L
|
||||||
|
|
||||||
#define WINBOND_MANID 0xEF
|
#define WINBOND_MANID 0xEF
|
||||||
#define WINBOND_DEVID 0x11
|
#define WINBOND_2MB_DEVID 0x11
|
||||||
|
#define WINBOND_1MB_DEVID 0x10
|
||||||
|
#define WINBOND_512KB_DEVID 0x05
|
||||||
|
|
||||||
#define PAGESIZE 0x100
|
#define PAGESIZE 0x100
|
||||||
#define WINBOND_WRITE_DELAY 0x02
|
#define WINBOND_WRITE_DELAY 0x02
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue