Skip to content

SX1276

Semtech SX1276 LoRa transceiver over SPI — the LoRa register page, RSSI/SNR from stimulus, TxDone. No RF air link.

Live catalog

Prefer labwired_describe with the catalog id over guessing pins or addresses.

Status at a glance

Aspect Status
Catalog id sx1276
Bus SPI (mode 0)
Address — (NSS via cs_pin)
Datasheet Semtech SX1276/77/78/79 Rev. 4 (March 2015): §4.3 SPI, §4.1.6 state machine, §5.5.5 RSSI/SNR, §6.1 Table 41, §6.4 LoRa register map
Source configs/devices/sx1276.yaml (declarative, no Rust model)
Tier smoke-proven (register-level tests: crates/core/tests/parts_batch5.rs)

Pins / attachment

Pin / net Role
SCK / MOSI / MISO SPI
NSS cs_pin
DIO0..DIO5, RESET Not modelled
3.3V/GND Power (digital twin)

Support matrix

Behavior Status Notes
RegVersion 0x42 = 0x12 (read-only) ✅
LoRa page 0x0D..0x3F with §6.4 reset values ✅ RegModemConfig1 0x72, RegModemConfig2 0x70, RegSyncWord 0x12, RegFifoTxBaseAddr 0x80 …
RegRssiValue / RegPktRssiValue / RegPktSnrValue ✅ −157 (HF) / −164 (LF) offset from RegOpMode.LowFrequencyModeOn; read 0 outside LoRa mode
RegIrqFlags write-1-to-clear ✅
TX: TxDone + return to STDBY ⚠️ Immediate, no time-on-air
FIFO data buffer, RX, FSK page, burst access, DIO pins ❌

Stimulus

Host inputs: rssi_dbm, packet_rssi_dbm (dBm), snr_db (dB).

How to run

  1. Place the part and an MCU in Playground, or add it to a system YAML:
    external_devices:
      - id: "sx1276"
        type: "sx1276"
        connection: "spi1"
        config:
          cs_pin: "PA4"
    
  2. Agent: labwired_list → labwired_describe id=sx1276 → wire → labwired_validate → labwired_run / labwired_verify.
  3. Register-level smoke: cargo test -p labwired-core --test parts_batch5 — RegVersion, the LoRa-page reset values and the RSSI word in LoRa mode; sx1276_tx_raises_txdone_and_irq_flags_clear_on_one covers the LF offset, SNR, write-1-to-clear and TX. The same file's negative control proves the check fails against a stand-in that answers only 0x00 or only 0xFF.

Limitations

  • Nothing is ever received: RX never sets RxDone and the 256-byte FIFO is not modelled.
  • The FSK/OOK register page is not presented — use rfm95 for an FSK driver.
  • DIO0 is not driven, so an interrupt-driven TX-done wait does not complete; a polling one does.

See the YAML header for the full datasheet trace and every named approximation.