mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-14 02:26:59 -07:00
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:
parent
1dae9811f2
commit
8c8317a5e9
4 changed files with 16 additions and 8 deletions
|
@ -410,14 +410,13 @@ int CmdLFSim(const char *Cmd)
|
|||
|
||||
sscanf(Cmd, "%i", &gap);
|
||||
|
||||
// convert to bitstream if necessary
|
||||
|
||||
// convert to bitstream if necessary
|
||||
ChkBitstream(Cmd);
|
||||
|
||||
//can send only 512 bits at a time (1 byte sent per bit...)
|
||||
printf("Sending [%d bytes]", GraphTraceLen);
|
||||
for (i = 0; i < GraphTraceLen; i += USB_CMD_DATA_SIZE) {
|
||||
UsbCommand c={CMD_DOWNLOADED_SIM_SAMPLES_125K, {i, 0, 0}};
|
||||
UsbCommand c = {CMD_DOWNLOADED_SIM_SAMPLES_125K, {i, 0, 0}};
|
||||
|
||||
for (j = 0; j < USB_CMD_DATA_SIZE; j++) {
|
||||
c.d.asBytes[j] = GraphBuffer[i+j];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue