Skip to content

feat(debug): expand non-blocking SPI field logging - #25

Merged
anapeksha merged 36 commits into
mainfrom
development
Aug 2, 2026
Merged

feat(debug): expand non-blocking SPI field logging#25
anapeksha merged 36 commits into
mainfrom
development

Conversation

@anapeksha

Copy link
Copy Markdown
Owner

Summary

  • Add categorized SPI field logs for boot, storage, Wi-Fi, USB, HTTP mutations, Armory, keyboard configuration, and payload execution.
  • Make log enqueueing non-blocking so diagnostics cannot delay firmware work.
  • Document SPI ownership, wiring, capture settings, and logging constraints.

Why

The existing SPI logger had limited coverage and could wait when its queue was full. This change makes field diagnostics useful without requiring RTT while ensuring USB, HID, networking, HTTP, and LittleFS work remain independent.

Scope

  • Firmware
  • HTTP / API internals
  • USB HID / NCM
  • Wi-Fi / AP
  • Docs
  • Frontend

Contract Changes

  • No HTTP, JSON, storage-path, or frontend contract changes

Hardware Impact

  • SPI0 remains TX-only at 31.25 MHz
  • GP2: SCK
  • GP3: MOSI
  • DMA channel 2
  • Fixed 16 × 96-byte log queue
  • Physical Saleae capture verification pending

Verification

  • cargo fmt --all -- --check
  • cargo check --target thumbv8m.main-none-eabihf
  • cargo clippy --target thumbv8m.main-none-eabihf --no-deps -- -D warnings -A clippy::new_without_default
  • cargo test --lib --no-default-features --target aarch64-apple-darwin
  • cargo build --release --target thumbv8m.main-none-eabihf

Risk Review

  • Logging uses try_send; records are dropped instead of blocking when the queue is full.
  • Queue payload storage increases by 512 bytes.
  • AP passwords, payload contents, binary contents, and run previews are not logged.
  • Status LED initialization order remains unchanged.
  • Physical SPI signal quality still needs verification with the intended receiver.

Release Notes

  • Added bounded, non-blocking SPI field diagnostics and documented the capture workflow.

Anapeksha Mukherjee added 30 commits July 9, 2026 03:10
@anapeksha anapeksha self-assigned this Aug 2, 2026
@anapeksha anapeksha added the enhancement New feature or request label Aug 2, 2026
@anapeksha anapeksha changed the title Development feat(debug): expand non-blocking SPI field logging Aug 2, 2026
@anapeksha
anapeksha merged commit 94dce52 into main Aug 2, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant