FIX: lf sim was broken since my little tests. Should work again.
This commit is contained in:
@@ -1863,8 +1863,7 @@ void check_challenges(bool file_given, byte_t* data) {
|
|||||||
AT91C_BASE_PIOA->PIO_PER = GPIO_SSC_DOUT;
|
AT91C_BASE_PIOA->PIO_PER = GPIO_SSC_DOUT;
|
||||||
|
|
||||||
// Set fpga in edge detect with reader field, we can modulate as reader now
|
// Set fpga in edge detect with reader field, we can modulate as reader now
|
||||||
FpgaWriteConfWord(
|
FpgaWriteConfWord(FPGA_MAJOR_MODE_LF_EDGE_DETECT | FPGA_LF_EDGE_DETECT_READER_FIELD);
|
||||||
FPGA_MAJOR_MODE_LF_EDGE_DETECT | FPGA_LF_EDGE_DETECT_READER_FIELD);
|
|
||||||
|
|
||||||
// Set Frequency divisor which will drive the FPGA and analog mux selection
|
// Set Frequency divisor which will drive the FPGA and analog mux selection
|
||||||
FpgaSendCommand(FPGA_CMD_SET_DIVISOR, 95); //125Khz
|
FpgaSendCommand(FPGA_CMD_SET_DIVISOR, 95); //125Khz
|
||||||
|
|||||||
@@ -400,10 +400,8 @@ void SimulateTagLowFrequency(int period, int gap, int ledcontrol)
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
uint8_t *buf = BigBuf_get_addr();
|
uint8_t *buf = BigBuf_get_addr();
|
||||||
|
|
||||||
FpgaWriteConfWord(FPGA_MAJOR_MODE_LF_PASSTHRU);
|
|
||||||
//FpgaWriteConfWord(FPGA_MAJOR_MODE_LF_EDGE_DETECT);
|
//FpgaWriteConfWord(FPGA_MAJOR_MODE_LF_EDGE_DETECT);
|
||||||
//FpgaWriteConfWord(FPGA_MAJOR_MODE_LF_EDGE_DETECT | FPGA_LF_EDGE_DETECT_READER_FIELD);
|
FpgaWriteConfWord(FPGA_MAJOR_MODE_LF_EDGE_DETECT | FPGA_LF_EDGE_DETECT_TOGGLE_MODE );
|
||||||
//FpgaWriteConfWord(FPGA_MAJOR_MODE_LF_EDGE_DETECT | FPGA_LF_EDGE_DETECT_TOGGLE_MODE );
|
|
||||||
|
|
||||||
// set frequency, get values from 'lf config' command
|
// set frequency, get values from 'lf config' command
|
||||||
sample_config *sc = getSamplingConfig();
|
sample_config *sc = getSamplingConfig();
|
||||||
@@ -415,16 +413,16 @@ void SimulateTagLowFrequency(int period, int gap, int ledcontrol)
|
|||||||
else
|
else
|
||||||
FpgaSendCommand(FPGA_CMD_SET_DIVISOR, sc->divisor);
|
FpgaSendCommand(FPGA_CMD_SET_DIVISOR, sc->divisor);
|
||||||
|
|
||||||
SetAdcMuxFor(GPIO_MUXSEL_LOPKD);
|
//SetAdcMuxFor(GPIO_MUXSEL_LOPKD);
|
||||||
|
|
||||||
AT91C_BASE_PIOA->PIO_PER = GPIO_SSC_DOUT | GPIO_SSC_CLK;
|
AT91C_BASE_PIOA->PIO_PER = GPIO_SSC_DOUT | GPIO_SSC_CLK;
|
||||||
AT91C_BASE_PIOA->PIO_OER = GPIO_SSC_DOUT;
|
AT91C_BASE_PIOA->PIO_OER = GPIO_SSC_DOUT;
|
||||||
AT91C_BASE_PIOA->PIO_ODR = GPIO_SSC_CLK;
|
AT91C_BASE_PIOA->PIO_ODR = GPIO_SSC_CLK;
|
||||||
|
|
||||||
// power on antenna
|
// power on antenna
|
||||||
OPEN_COIL();
|
//OPEN_COIL();
|
||||||
// charge time
|
// charge time
|
||||||
WaitMS(50);
|
//WaitMS(50);
|
||||||
|
|
||||||
for(;;) {
|
for(;;) {
|
||||||
WDT_HIT();
|
WDT_HIT();
|
||||||
|
|||||||
Reference in New Issue
Block a user