mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
first look at the data
This commit is contained in:
parent
f007db6661
commit
5784999002
2 changed files with 12 additions and 17 deletions
|
@ -55,8 +55,6 @@ int HfReadADC(uint32_t samplesCount, bool ledcontrol) {
|
||||||
|
|
||||||
if (ledcontrol) LED_A_ON();
|
if (ledcontrol) LED_A_ON();
|
||||||
|
|
||||||
uint32_t samples = 0;
|
|
||||||
//uint32_t dma_start_time = 0;
|
|
||||||
uint16_t *upTo = dma->buf;
|
uint16_t *upTo = dma->buf;
|
||||||
|
|
||||||
uint32_t sbs = samplesCount;
|
uint32_t sbs = samplesCount;
|
||||||
|
@ -71,11 +69,13 @@ int HfReadADC(uint32_t samplesCount, bool ledcontrol) {
|
||||||
if (behindBy == 0)
|
if (behindBy == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
samples++;
|
uint16_t sample = *upTo;
|
||||||
if (samples == 1) {
|
logSample(sample & 0xff, 1, 8, false);
|
||||||
// DMA has transferred the very first data
|
logSample((sample >> 8) & 0xff, 1, 8, false);
|
||||||
//dma_start_time = GetCountSspClk() & 0xfffffff0;
|
upTo++;
|
||||||
}
|
|
||||||
|
if (getSampleCounter() >= samplesCount)
|
||||||
|
break;
|
||||||
|
|
||||||
if (upTo >= dma->buf + DMA_BUFFER_SIZE) { // we have read all of the DMA buffer content.
|
if (upTo >= dma->buf + DMA_BUFFER_SIZE) { // we have read all of the DMA buffer content.
|
||||||
upTo = dma->buf; // start reading the circular buffer from the beginning
|
upTo = dma->buf; // start reading the circular buffer from the beginning
|
||||||
|
@ -97,12 +97,6 @@ int HfReadADC(uint32_t samplesCount, bool ledcontrol) {
|
||||||
WDT_HIT();
|
WDT_HIT();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
logSample(50, 1, 8, false);
|
|
||||||
|
|
||||||
if (getSampleCounter() >= samplesCount)
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FpgaDisableSscDma();
|
FpgaDisableSscDma();
|
||||||
|
@ -112,11 +106,10 @@ int HfReadADC(uint32_t samplesCount, bool ledcontrol) {
|
||||||
// Turn the field off
|
// Turn the field off
|
||||||
FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);
|
FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);
|
||||||
|
|
||||||
reply_ng(CMD_HF_ACQ_RAW_ADC, PM3_SUCCESS, NULL, 0);
|
uint32_t scnt = getSampleCounter();
|
||||||
|
reply_ng(CMD_HF_ACQ_RAW_ADC, PM3_SUCCESS, (uint8_t*)&scnt, 4);
|
||||||
if (ledcontrol) LEDsoff();
|
if (ledcontrol) LEDsoff();
|
||||||
|
|
||||||
Dbprintf("-- samples: %d", getSampleCounter());
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,9 @@ static int CmdHFTexkomReader(const char *Cmd) {
|
||||||
return PM3_ETIMEOUT;
|
return PM3_ETIMEOUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
getSamples(samplesCount, true);
|
uint32_t size = (resp.data.asDwords[0]);
|
||||||
|
if (size > 0)
|
||||||
|
getSamples(samplesCount, true);
|
||||||
|
|
||||||
return PM3_SUCCESS;
|
return PM3_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue