fix lf sim fpga download overwrites sim buffer (#391)

* adjust LFSim to download lf fpga prior to setting emulation buffer to prevent buffer overwrite condition if you are coming from HF fpga.
* fix lf sim big buff overwrite with fpga download. Move fix to the buffer download cmd.
This commit is contained in:
marshmellow42 2017-09-11 13:18:32 -04:00 committed by pwpiwi
commit 8c8317a5e9
4 changed files with 16 additions and 8 deletions

View file

@ -387,8 +387,8 @@ void SimulateTagLowFrequency(int period, int gap, int ledcontrol)
int i;
uint8_t *tab = BigBuf_get_addr();
//note this may destroy the bigbuf so be sure this is called before now...
FpgaDownloadAndGo(FPGA_BITSTREAM_LF);
//note FpgaDownloadAndGo destroys the bigbuf so be sure this is called before now...
//FpgaDownloadAndGo(FPGA_BITSTREAM_LF);
FpgaWriteConfWord(FPGA_MAJOR_MODE_LF_EDGE_DETECT);
AT91C_BASE_PIOA->PIO_PER = GPIO_SSC_DOUT | GPIO_SSC_CLK;