Commit Graph
16 Commits
Author SHA1 Message Date
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
Philippe Teuwen 09bf8fb04e doc 2026-08-29 18:33:01 +02:00
iceman1001 0fbd4aa6a7 text 2026-08-29 17:06:38 +02:00
iceman1001 24a9a686ea Update doc with lessons. Thanks Claude 2026-08-29 16:09:45 +02:00
iceman1001 6bacff9f1b text 2025-09-12 22:07:30 +02:00
douniwan5788 96d462acee add: split PacketResponseNG status to status and reason 2024-09-24 03:10:53 +08:00
douniwan5788 61e3059fd8 fix new_frame_format.md typo 2024-08-27 23:25:24 +08:00
iceman1001 0c4a1066c1 text 2024-01-05 19:27:38 +01:00
wh201906 9ff672ca8f Update docs 2023-10-26 00:01:41 +08:00
iceman1001 d5f39519a4 text 2021-12-31 11:04:05 +01:00
Philippe Teuwen e62dfa3bcd typos 2021-04-16 01:53:07 +02:00
iceman1001 fc81b41b90 text 2021-03-09 15:00:58 +01:00
Philippe Teuwen 18a6d3e92a typos 2020-10-23 01:24:58 +02:00
Philippe Teuwen 3560cf5466 bootrom: remove deprecated CMD_SETUP_WRITE 2019-10-05 19:10:40 +02:00
Philippe Teuwen 0ea7fa7784 buggy 'mem read' removed, 'mem save' renamed 'mem dump', can now display too 2019-07-15 12:57:20 +02:00
Philippe Teuwen b7016e0bed frame format doc: txt to md 2019-06-02 17:42:14 +02:00