mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-22 06:13:27 -07:00
Legic: adjusted sampling to new ssp clock speed
Sampling is 4 times faster and pipeline daly reduced to 1/4. The new code samples each bit earyler to account for the shorter pipeline. That introduced bit errors by leeking the next bit into the current one.
This commit is contained in:
parent
4c6ca8d5e2
commit
043b0ced06
1 changed files with 3 additions and 1 deletions
|
@ -141,7 +141,7 @@ static inline int32_t sample_power() {
|
||||||
static inline bool rx_bit_as_reader() {
|
static inline bool rx_bit_as_reader() {
|
||||||
int32_t power;
|
int32_t power;
|
||||||
|
|
||||||
for(size_t i = 0; i<5; ++i) {
|
for(size_t i = 0; i<3; ++i) {
|
||||||
power = sample_power();
|
power = sample_power();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -216,6 +216,7 @@ static uint32_t rx_frame_as_reader(uint8_t len) {
|
||||||
|
|
||||||
// rx_bit_as_reader runs only 95us, resync to TAG_BIT_PERIOD
|
// rx_bit_as_reader runs only 95us, resync to TAG_BIT_PERIOD
|
||||||
last_frame_end += TAG_BIT_PERIOD;
|
last_frame_end += TAG_BIT_PERIOD;
|
||||||
|
while(GET_TICKS < last_frame_end) { };
|
||||||
}
|
}
|
||||||
|
|
||||||
return frame;
|
return frame;
|
||||||
|
@ -239,6 +240,7 @@ static bool rx_ack_as_reader() {
|
||||||
|
|
||||||
// rx_bit_as_reader runs only 95us, resync to TAG_BIT_PERIOD
|
// rx_bit_as_reader runs only 95us, resync to TAG_BIT_PERIOD
|
||||||
last_frame_end += TAG_BIT_PERIOD;
|
last_frame_end += TAG_BIT_PERIOD;
|
||||||
|
while(GET_TICKS < last_frame_end) { };
|
||||||
|
|
||||||
// check if it was an ACK
|
// check if it was an ACK
|
||||||
if(ack) {
|
if(ack) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue