Files
Sarah Rose 55a15958ec Add P25 Phase 1 TSCC TX external app (p25_tx) (#3090)
* Add P25 TX external app (UI shell)

- Register p25_tx in external.cmake and external.ld at 0xAE010000
- UI with NAC, SYSID, WACN, RFSSID, SITEID, TG, VCH fields
- 2.4 Msps TX, 155 MHz default, no baseband (m4_app_tag={0,0,0,0})

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Add P25 TX baseband processor (M4)

- P25TxConfigure = 102 in message.hpp + P25TxConfigureMessage
- image_tag_p25_tx in spi_image.hpp
- set_p25tx_data() in baseband_api (copies dibits to bb_data, sends msg)
- proc_p25_tx registered in baseband CMakeLists (tag P25T)
- m4_app_tag updated to {'P','2','5','T'}
- TX wired: transmits P25 FSW test pattern (512 dibits) via M4 C4FM proc
- on_tx_progress handler stops TX when frame complete

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* p25_tx: implement correct P25 TSBK encoding from ccemu

- BCH(63,16) via generator matrix (not polynomial division)
- CRC-CCITT bit-by-bit init=0 over 80 bits
- 1/2-rate trellis encoder (4 states)
- DataInterleave per TIA-102
- Status symbol insertion (SS=0x02 every 35 dibits)
- TSBK rotation: IDEN_UP -> NET_STS -> RFSS_STS -> NET_STS
- tsbk_idx_ persists across buffer refills, resets on stop_tx

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* p25_tx: apply clang-format

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* p25_tx: fix HackRF lockup - zero output buffer when idle

When configured=false, execute() returned without writing to the
output buffer. The DMA would re-use stale IQ samples from the
previous cycle, sending garbage to the HackRF and causing it to
lock up mid-transmission.

Fix: explicitly zero the output buffer when the proc is idle.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* p25_tx: address PR review feedback and fix TX restart lockup

- Replace NumberField with SymField::Type::Hex for NAC, SYSID, WACN,
  RFSSID, SITEID, TG, VCH (hex values should display as hex)
- Add voice grant TSBK (OpcodeGrpVChGrant 0x00) to rotation cycle;
  rotation is now 5-step: IDEN_UP->NET_STS->RFSS_STS->GRP_V_GRANT->NET_STS
- Wire TG and VCH fields into fill_tx_buffer for voice grant encoding
- Reset txprogress_message.done=false on new P25TxConfigure in baseband
- Add #include <cstring> to baseband_api.cpp (needed for memcpy)
- Fix TX restart lockup: remove baseband::shutdown() from stop_tx() so
  the M4 stays loaded between sessions; only shut down in destructor.
  Previously, the stale ShutdownMessage in the queue would be picked up
  by the restarted M4 on second TX, causing it to exit immediately and
  leaving the HackRF stuck in TX mode.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* ifndef guard instead of pragma
2026-03-17 08:41:01 +01:00
..
2025-08-27 06:37:57 +00:00
2023-05-19 08:16:05 +12:00
2023-05-19 08:16:05 +12:00
2023-10-21 17:31:17 +02:00
2023-05-19 08:16:05 +12:00
2023-05-19 08:16:05 +12:00
2023-05-19 08:16:05 +12:00
2023-05-19 08:16:05 +12:00
2023-05-19 08:16:05 +12:00
2024-10-07 11:55:11 +02:00
2025-10-09 22:29:53 +02:00
2023-05-19 08:16:05 +12:00
2023-05-19 08:16:05 +12:00
2023-05-19 08:16:05 +12:00
2025-12-14 11:26:21 +01:00
2025-11-21 09:30:01 +01:00
2023-05-19 08:16:05 +12:00
2023-05-19 08:16:05 +12:00
2025-08-27 06:37:57 +00:00
2024-10-07 15:58:37 +02:00
2023-05-19 08:16:05 +12:00
2016-01-31 09:34:24 +01:00
2023-05-19 08:16:05 +12:00
2023-05-19 08:16:05 +12:00
2023-05-19 08:16:05 +12:00
2024-12-20 07:55:39 +01:00
2025-12-12 17:43:51 +01:00
2023-05-19 08:16:05 +12:00
2023-05-19 08:16:05 +12:00
2023-05-19 08:16:05 +12:00
2023-05-19 08:16:05 +12:00
2023-05-19 08:16:05 +12:00
2019-02-03 18:25:11 +00:00
2024-10-06 22:14:27 +02:00
2024-10-06 22:14:27 +02:00
2024-10-06 22:14:27 +02:00
2024-10-06 22:14:27 +02:00
2024-10-06 22:14:27 +02:00
2024-10-06 22:14:27 +02:00
2024-10-06 22:14:27 +02:00
2024-11-08 11:46:27 +01:00
2024-11-08 11:46:27 +01:00
2024-10-06 22:14:27 +02:00
2024-10-06 22:14:27 +02:00
2024-11-08 11:46:27 +01:00
2026-02-24 11:23:41 +01:00
2023-05-19 08:16:05 +12:00
2017-02-13 05:35:13 +00:00
2025-06-05 07:08:03 -07:00
2023-05-19 08:16:05 +12:00
2023-05-19 08:16:05 +12:00
2025-08-27 06:37:57 +00:00
2026-02-24 11:23:41 +01:00
2023-05-19 08:16:05 +12:00
2023-04-24 13:04:59 +02:00
2025-05-23 00:23:35 +08:00
2023-09-08 19:41:09 +02:00
2023-08-27 15:56:40 -07:00
2023-05-19 08:16:05 +12:00
2025-12-14 11:26:21 +01:00
2023-06-11 11:47:13 -07:00
2023-05-19 08:16:05 +12:00
2023-05-19 08:16:05 +12:00
2025-11-26 19:13:21 +01:00
2025-11-26 19:13:21 +01:00
2025-12-14 11:26:21 +01:00
2023-05-19 08:16:05 +12:00
2023-05-19 08:16:05 +12:00
2023-05-19 08:16:05 +12:00
2023-06-10 07:50:42 +12:00
2024-10-14 13:07:41 +02:00
2024-10-14 13:07:41 +02:00
2025-12-14 11:26:21 +01:00
2026-02-16 15:50:27 +01:00
2026-02-24 11:23:41 +01:00
2025-12-14 11:26:21 +01:00