Make detection threshold for ISO14443A configurable

This adds a new command "hw sethfthresh" to configure the thresholds
used inside the FPGA while demodulating ISO14443A. The thresholds
need to be increased on particularly noisy hardware, such as certain
Chinese PM3 Easy clones.
This commit is contained in:
Christian Zietz 2024-02-01 17:48:06 +01:00
commit dbfd8b7a6d
12 changed files with 68 additions and 12 deletions

View file

@ -127,6 +127,10 @@ hi_simulate hs(
);
// 2 - HF ISO14443-A
`define EDGE_DETECT_THRESHOLD 3
`define EDGE_DETECT_THRESHOLDHIGH 20
hi_iso14443a hisn(
.ck_1356meg (ck_1356meg),
.pwr_lo (hisn_pwr_lo),
@ -142,7 +146,9 @@ hi_iso14443a hisn(
.ssp_dout (ssp_dout),
.ssp_clk (hisn_ssp_clk),
.debug (hisn_debug),
.mod_type (minor_mode)
.mod_type (minor_mode),
.edge_detect_threshold (`EDGE_DETECT_THRESHOLD),
.edge_detect_threshold_high (`EDGE_DETECT_THRESHOLDHIGH)
);
// 3 - HF sniff