X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/779d9a0e90a20392785adbaa4974cafaa27005a8..654b6ae3f4bf56bc210022b603edbb1575e05dff:/armsrc/lfops.c diff --git a/armsrc/lfops.c b/armsrc/lfops.c index c7a7a59d..2fe49a80 100644 --- a/armsrc/lfops.c +++ b/armsrc/lfops.c @@ -33,14 +33,15 @@ void ModThenAcquireRawAdcSamples125k(uint32_t delay_off, uint32_t period_0, uint // use lf config settings sample_config *sc = getSamplingConfig(); - // clear read buffer - BigBuf_Clear_keep_EM(); - /* Make sure the tag is reset */ + // Make sure the tag is reset FpgaDownloadAndGo(FPGA_BITSTREAM_LF); FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF); WaitMS(2500); + // clear read buffer (after fpga bitstream loaded...) + BigBuf_Clear_keep_EM(); + // power on LFSetupFPGAForADC(sc->divisor, 1); @@ -567,7 +568,7 @@ static void fcAll(uint8_t fc, int *n, uint8_t clock, uint16_t *modCnt) uint8_t wavesPerClock = clock/fc; uint8_t mod = clock % fc; //modifier uint8_t modAdj = fc/mod; //how often to apply modifier - bool modAdjOk = !(fc % mod); //if (fc % mod==0) modAdjOk=TRUE; + bool modAdjOk = !(fc % mod); //if (fc % mod==0) modAdjOk=true; // loop through clock - step field clock for (uint8_t idx=0; idx < wavesPerClock; idx++){ // put 1/2 FC length 1's and 1/2 0's per field clock wave (to create the wave) @@ -819,9 +820,9 @@ void CmdPSKsimTag(uint16_t arg1, uint16_t arg2, size_t size, uint8_t *BitStream) for (i=0; i