]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
fix FpgaSetupSsc() (#807)
authorpwpiwi <pwpiwi@users.noreply.github.com>
Tue, 26 Mar 2019 20:50:41 +0000 (21:50 +0100)
committerGitHub <noreply@github.com>
Tue, 26 Mar 2019 20:50:41 +0000 (21:50 +0100)
* ouch! Be aware that same major modes are used in LF and HF!

armsrc/fpgaloader.c

index 214f484366ae05f82d8ce18ae3031c13a7c130a0..5ca0cce157e75167eb2926b6885497879b5b9ca3 100644 (file)
@@ -136,7 +136,7 @@ void FpgaSetupSsc(uint8_t FPGA_mode)
 
        // 8, 16 or 32 bits per transfer, no loopback, MSB first, 1 transfer per sync
        // pulse, no output sync
-       if ((FPGA_mode & 0xe0) == FPGA_MAJOR_MODE_HF_READER) {
+       if ((FPGA_mode & 0xe0) == FPGA_MAJOR_MODE_HF_READER && FpgaGetCurrent() == FPGA_BITSTREAM_HF) {
                AT91C_BASE_SSC->SSC_RFMR = SSC_FRAME_MODE_BITS_IN_WORD(16) | AT91C_SSC_MSBF | SSC_FRAME_MODE_WORDS_PER_TRANSFER(0);
        } else {
                AT91C_BASE_SSC->SSC_RFMR = SSC_FRAME_MODE_BITS_IN_WORD(8) | AT91C_SSC_MSBF | SSC_FRAME_MODE_WORDS_PER_TRANSFER(0);
Impressum, Datenschutz