mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-09-20 15:26:13 +08:00
Reduce BUSY_TIMEOUT and handles FPC/FLASH FW more gracefully on non-RDV4 pm3
This commit is contained in:
parent
ec5f70caf2
commit
9d261adfb1
|
@ -1564,15 +1564,16 @@ void __attribute__((noreturn)) AppMain(void) {
|
|||
usart_init();
|
||||
#endif
|
||||
|
||||
#ifdef WITH_FLASH
|
||||
loadT55xxConfig();
|
||||
#endif
|
||||
|
||||
// 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
|
||||
usb_disable();
|
||||
usb_enable();
|
||||
|
||||
#ifdef WITH_FLASH
|
||||
// If flash is not present, BUSY_TIMEOUT kicks in, let's do it after USB
|
||||
loadT55xxConfig();
|
||||
#endif
|
||||
|
||||
for (;;) {
|
||||
WDT_HIT();
|
||||
|
||||
|
|
|
@ -521,10 +521,10 @@ void Flashmem_print_status(void) {
|
|||
Dbprintf(" Baudrate................%dMHz", FLASHMEM_SPIBAUDRATE / 1000000);
|
||||
|
||||
if (!FlashInit()) {
|
||||
DbpString(" Init....................FAIL");
|
||||
DbpString(" Init...................." _RED_("FAILED"));
|
||||
return;
|
||||
}
|
||||
DbpString(" Init....................OK");
|
||||
DbpString(" Init...................." _GREEN_("OK"));
|
||||
|
||||
uint8_t dev_id = Flash_ReadID();
|
||||
switch (dev_id) {
|
||||
|
@ -538,7 +538,7 @@ void Flashmem_print_status(void) {
|
|||
DbpString(" Memory size.............512 kbits / 64kb");
|
||||
break;
|
||||
default :
|
||||
DbpString(" Device ID............... --> Unknown <--");
|
||||
DbpString(" Device ID..............." _YELLOW_(" --> Unknown <--"));
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,8 @@
|
|||
#define SUSPEND 0x75
|
||||
#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_DEVID 0x11
|
||||
|
|
|
@ -600,7 +600,7 @@ void I2C_print_status(void) {
|
|||
if (len > 0)
|
||||
Dbprintf(" version.................v%x.%02d", resp[0], resp[1]);
|
||||
else
|
||||
DbpString(" version.................FAILED");
|
||||
DbpString(" version................." _RED_("FAILED"));
|
||||
}
|
||||
|
||||
// Will read response from smart card module, retries 3 times to get the data.
|
||||
|
|
Loading…
Reference in a new issue