mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-20 21:33:19 -07:00
Added hitune command for continuously measuring HF antenna tuning
This commit is contained in:
parent
8b576d2d31
commit
1eb7596aad
4 changed files with 36 additions and 2 deletions
|
@ -202,6 +202,27 @@ void MeasureAntennaTuning(void)
|
|||
UsbSendPacket((BYTE *)&c, sizeof(c));
|
||||
}
|
||||
|
||||
void MeasureAntennaTuningHf(void)
|
||||
{
|
||||
int vHf = 0; // in mV
|
||||
|
||||
DbpString("Measuring HF antenna characteristics, press button to exit");
|
||||
|
||||
for (;;) {
|
||||
// Let the FPGA drive the high-frequency antenna around 13.56 MHz.
|
||||
FpgaWriteConfWord(FPGA_MAJOR_MODE_HF_READER_RX_XCORR);
|
||||
SpinDelay(20);
|
||||
// Vref = 3300mV, and an 10:1 voltage divider on the input
|
||||
// can measure voltages up to 33000 mV
|
||||
vHf = (33000 * AvgAdc(ADC_CHAN_HF)) >> 10;
|
||||
|
||||
Dbprintf("%d mV",vHf);
|
||||
if (BUTTON_PRESS()) break;
|
||||
}
|
||||
DbpString("cancelled");
|
||||
}
|
||||
|
||||
|
||||
void SimulateTagHfListen(void)
|
||||
{
|
||||
BYTE *dest = (BYTE *)BigBuf;
|
||||
|
@ -643,6 +664,10 @@ void UsbPacketReceived(BYTE *packet, int len)
|
|||
MeasureAntennaTuning();
|
||||
break;
|
||||
|
||||
case CMD_MEASURE_ANTENNA_TUNING_HF:
|
||||
MeasureAntennaTuningHf();
|
||||
break;
|
||||
|
||||
case CMD_LISTEN_READER_FIELD:
|
||||
ListenReaderField(c->arg[0]);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue