mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 13:00:42 -07:00
Reduce BUSY_TIMEOUT and handles FPC/FLASH FW more gracefully on non-RDV4 pm3
This commit is contained in:
parent
ec5f70caf2
commit
9d261adfb1
4 changed files with 11 additions and 9 deletions
|
@ -1564,15 +1564,16 @@ void __attribute__((noreturn)) AppMain(void) {
|
||||||
usart_init();
|
usart_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WITH_FLASH
|
|
||||||
loadT55xxConfig();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// This is made as late as possible to ensure enumeration without timeout
|
// This is made as late as possible to ensure enumeration without timeout
|
||||||
// against device such as http://www.hobbytronics.co.uk/usb-host-board-v2
|
// against device such as http://www.hobbytronics.co.uk/usb-host-board-v2
|
||||||
usb_disable();
|
usb_disable();
|
||||||
usb_enable();
|
usb_enable();
|
||||||
|
|
||||||
|
#ifdef WITH_FLASH
|
||||||
|
// If flash is not present, BUSY_TIMEOUT kicks in, let's do it after USB
|
||||||
|
loadT55xxConfig();
|
||||||
|
#endif
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
WDT_HIT();
|
WDT_HIT();
|
||||||
|
|
||||||
|
|
|
@ -521,10 +521,10 @@ void Flashmem_print_status(void) {
|
||||||
Dbprintf(" Baudrate................%dMHz", FLASHMEM_SPIBAUDRATE / 1000000);
|
Dbprintf(" Baudrate................%dMHz", FLASHMEM_SPIBAUDRATE / 1000000);
|
||||||
|
|
||||||
if (!FlashInit()) {
|
if (!FlashInit()) {
|
||||||
DbpString(" Init....................FAIL");
|
DbpString(" Init...................." _RED_("FAILED"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
DbpString(" Init....................OK");
|
DbpString(" Init...................." _GREEN_("OK"));
|
||||||
|
|
||||||
uint8_t dev_id = Flash_ReadID();
|
uint8_t dev_id = Flash_ReadID();
|
||||||
switch (dev_id) {
|
switch (dev_id) {
|
||||||
|
@ -538,7 +538,7 @@ void Flashmem_print_status(void) {
|
||||||
DbpString(" Memory size.............512 kbits / 64kb");
|
DbpString(" Memory size.............512 kbits / 64kb");
|
||||||
break;
|
break;
|
||||||
default :
|
default :
|
||||||
DbpString(" Device ID............... --> Unknown <--");
|
DbpString(" Device ID..............." _YELLOW_(" --> Unknown <--"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,8 @@
|
||||||
#define SUSPEND 0x75
|
#define SUSPEND 0x75
|
||||||
#define RESUME 0x7A
|
#define RESUME 0x7A
|
||||||
|
|
||||||
#define BUSY_TIMEOUT 1000000000L
|
// Flash busy timeout: 20ms is the strict minimum when writing 256kb
|
||||||
|
#define BUSY_TIMEOUT 50000L
|
||||||
|
|
||||||
#define WINBOND_MANID 0xEF
|
#define WINBOND_MANID 0xEF
|
||||||
#define WINBOND_DEVID 0x11
|
#define WINBOND_DEVID 0x11
|
||||||
|
|
|
@ -600,7 +600,7 @@ void I2C_print_status(void) {
|
||||||
if (len > 0)
|
if (len > 0)
|
||||||
Dbprintf(" version.................v%x.%02d", resp[0], resp[1]);
|
Dbprintf(" version.................v%x.%02d", resp[0], resp[1]);
|
||||||
else
|
else
|
||||||
DbpString(" version.................FAILED");
|
DbpString(" version................." _RED_("FAILED"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Will read response from smart card module, retries 3 times to get the data.
|
// Will read response from smart card module, retries 3 times to get the data.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue