mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
Changing timings, this now waits for max 276 bytes while 8051 speaks with card
This commit is contained in:
parent
4c9c0b5264
commit
c5582ab7c7
1 changed files with 9 additions and 5 deletions
12
armsrc/i2c.c
12
armsrc/i2c.c
|
@ -208,12 +208,15 @@ static bool I2C_Start(void) {
|
||||||
SDA_H;
|
SDA_H;
|
||||||
I2C_DELAY_1CLK;
|
I2C_DELAY_1CLK;
|
||||||
SCL_H;
|
SCL_H;
|
||||||
if (!WaitSCL_H()) return false;
|
if (!WaitSCL_H())
|
||||||
|
return false;
|
||||||
|
|
||||||
I2C_DELAY_2CLK;
|
I2C_DELAY_2CLK;
|
||||||
|
|
||||||
if (!SCL_read) return false;
|
if (!SCL_read)
|
||||||
if (!SDA_read) return false;
|
return false;
|
||||||
|
if (!SDA_read)
|
||||||
|
return false;
|
||||||
|
|
||||||
SDA_L;
|
SDA_L;
|
||||||
I2C_DELAY_2CLK;
|
I2C_DELAY_2CLK;
|
||||||
|
@ -228,8 +231,9 @@ static bool I2C_WaitForSim(void) {
|
||||||
|
|
||||||
// 8051 speaks with smart card.
|
// 8051 speaks with smart card.
|
||||||
// 1000*50*3.07 = 153.5ms
|
// 1000*50*3.07 = 153.5ms
|
||||||
|
// 1000*90*3.07 = 276.3ms
|
||||||
// 1byte transfer == 1ms with max frame being 256bytes
|
// 1byte transfer == 1ms with max frame being 256bytes
|
||||||
return WaitSCL_H_delay(1000 * 300);
|
return WaitSCL_H_delay(1000 * 90);
|
||||||
}
|
}
|
||||||
|
|
||||||
// send i2c STOP
|
// send i2c STOP
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue