Files
proxmark3/doc
iceman1001 6d67465d7d hf plot: convert CMD_FPGAMEM_DOWNLOADED to NG
The FPGA trace loop was the last OLD reply on the device outside the two
the bootrom also serves. It stayed OLD because the DMA double-buffer was
sized to the frame payload and an NG header did not obviously fit in
front of it.

DMA straight into chunk->data of a download_chunk_t instead, so a filled
buffer is already a complete NG payload and needs no copy. Chunking now
follows DOWNLOAD_CHUNK_MAX and scales with PM3_CMD_DATA_SIZE. The
terminator carries download_done_t like the other bulk downloads. No
client change needed, dl_it already had the NG branch.

Two fixes fall out of it:

FPGA_TRACE_SIZE is 3072, an exact multiple of 512 but not of
DOWNLOAD_CHUNK_MAX. Each transfer is now armed for exactly the bytes
still expected - arming a full chunk for the short last one would spin in
FPGA_SSC_DMA_RX_Done() forever. This also drops the stray extra DMA the
old loop left armed.

get_tosend() moved after FpgaDownloadAndGo(). The loader calls
BigBuf_free(), which nulls s_toSend.buf, then reuses that same region for
its decompression ring buffer - the old code captured the pointer before
the free and only worked because the loader was done with it in time.

3072 bytes goes from 6 OLD frames to 7 NG frames at PM3_CMD_DATA_SIZE
512, and would be 5 at 688.
2026-08-30 14:02:18 +02:00
..
2026-08-25 17:04:52 +02:00
2026-08-25 17:04:52 +02:00
2019-05-05 00:18:18 +02:00
2021-07-13 00:35:43 -04:00
2026-08-28 01:16:30 +02:00
doc
2022-02-08 01:26:06 +02:00
2024-02-23 01:25:54 +02:00
2024-01-05 19:27:38 +01:00
2026-08-29 17:42:29 +02:00
2026-08-29 17:42:29 +02:00
2023-07-10 16:44:14 +02:00
2025-09-25 21:29:50 +02:00
2023-12-10 22:47:06 -05:00
2025-04-29 11:34:50 -04:00
2021-12-31 10:58:25 +01:00
2021-12-31 11:04:05 +01:00
2023-11-21 22:00:59 +02:00
2021-12-31 11:04:05 +01:00
2025-01-05 14:27:14 +01:00
2026-08-19 19:28:17 +02:00
2020-11-24 17:25:46 +11:00
2020-11-24 17:25:46 +11:00
2020-11-24 17:25:46 +11:00
2021-12-31 11:11:29 +01:00
2024-01-05 19:27:38 +01:00