Commit graph

1 commit

Author SHA1 Message Date
Ben Agricola
5888438d82 Add LR1121 radio support for T-Beam Supreme
Add driver and board support for the Semtech LR1121 radio on the LilyGo
T-Beam Supreme V3.0 (BOARD_TBEAM_S_LR_V1 0x43).

New files:
- lr11xx.h/cpp: LR1121 driver extending Stream, matching the sx126x
  interface for duck-typed LoRa pointer compatibility. Implements 2-byte
  opcode SPI protocol with two-phase reads, inline MISO status capture,
  DIO9 interrupt handling, and carrier detection via preamble/header
  IRQ polling.

Key LR1121 differences from SX126x handled in the driver:
- SPI uses 2-byte opcodes with NSS release between command and response
  phases (vs single-phase on SX126x)
- SetPacketParams PayloadLen is enforced in explicit header mode (SX126x
  ignores it) — receive() sets PayloadLen=0 to accept any length
- ESP32S3 requires explicit SPI pin assignment via SPI.begin(sclk, miso,
  mosi, cs)
- RF switch configured via SetDioAsRfSwitch command (DIO5/DIO6) rather
  than external GPIO control
- TCXO at 3.0V via SetTcxoMode command
- High Power PA with configurable output up to +22dBm

Modified files:
- Modem.h: add LR11XX modem type
- Boards.h: add BOARD_TBEAM_S_LR_V1 with pin definitions and model
  codes (MODEL_D3/DF/D7 for 433/868/2400 MHz)
- Utilities.h: add LR11XX modem selection, LED stubs, model validation,
  and kiss_indicate_log() for KISS-framed debug output
- RNode_Firmware.ino: add LR11XX cases for setPins, symbol calculation,
  TX power clamping, and serial wait exclusion
- Display.h: add BOARD_TBEAM_S_LR_V1 alongside BOARD_TBEAM_S_V1
- Power.h: add BOARD_TBEAM_S_LR_V1 alongside BOARD_TBEAM_S_V1
- Makefile: add firmware-tbeam_supreme_lr1121 build target
2026-03-31 16:52:26 +01:00