Skip to content

Fixes SEEED Indicator when booting to BaseUI - #11125

Merged
thebentern merged 1 commit into
developfrom
baseui_fixindicator
Jul 21, 2026
Merged

Fixes SEEED Indicator when booting to BaseUI#11125
thebentern merged 1 commit into
developfrom
baseui_fixindicator

Conversation

@Xaositek

@Xaositek Xaositek commented Jul 21, 2026

Copy link
Copy Markdown
Contributor
  • Fixes SEEED Indicator which would previous get stuck at boot up splash screen.

Summary by CodeRabbit

  • Bug Fixes
    • Improved SPI bus initialization on supported SenseCAP Indicator devices.
    • Enhanced reliability for LoRa and radio communication after display startup.

@Xaositek Xaositek self-assigned this Jul 21, 2026
@Xaositek Xaositek added baseui Issues directly related to BaseUI 2.8 labels Jul 21, 2026
@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

⚡ Try this PR in the Web Flasher

Flash this PR in the Web Flasher

firmware commit boards expires

Warning

This is an automated, unreviewed CI test build. Back up your device configuration
before flashing, and only flash devices you are able to recover.

Supported boards built by this PR (30)
Device Board Platform
Crowpanel Adv 3.5 TFT elecrow-adv-35-tft esp32-s3
Heltec HT62 heltec-ht62-esp32c3-sx1262 esp32-c3
Heltec Mesh Node 096 heltec-mesh-node-t096 nrf52840
Heltec Mesh Node T1 heltec-mesh-node-t1 nrf52840
Heltec Mesh Node T114 heltec-mesh-node-t114 nrf52840
Heltec V3 heltec-v3 esp32-s3
Heltec V4 heltec-v4 esp32-s3
Meshnology W10 meshnology_w10 esp32-s3
Raspberry Pi Pico pico rp2040
Raspberry Pi Pico W picow rp2040
RAK WisMesh Pocket V3 rak_wismesh_pocket nrf52840
RAK WisMesh Pod rak_wismesh_pod nrf52840
RAK WisMesh Repeater Mini V2 rak_wismesh_repeater_mini nrf52840
RAK WisMesh Tag rak_wismeshtag nrf52840
RAK WisBlock 11200 rak11200 esp32
RAK WisBlock 11310 rak11310 rp2040
RAK3312 rak3312 esp32-s3
RAK WisBlock 4631 rak4631 nrf52840
Seeed SenseCAP Mesh-Tracker-X1 seeed_mesh_tracker_X1 nrf52840
Seeed Wio Tracker L1 seeed_wio_tracker_L1 nrf52840
Seeed Xiao NRF52840 Kit seeed_xiao_nrf52840_kit nrf52840
Seeed Xiao ESP32-S3 seeed-xiao-s3 esp32-s3
Station G2 station-g2 esp32-s3
Station G3 station-g3 esp32-s3
LILYGO T-Deck t-deck-tft esp32-s3
LILYGO T-Echo t-echo nrf52840
LILYGO T-Echo Plus t-echo-plus nrf52840
LILYGO T-Impulse Plus t-impulse-plus nrf52840
LilyGo T3-C6 tlora-c6 esp32-c6
Seeed SenseCAP T1000-E tracker-t1000-e nrf52840

Build artifacts expire on 2026-08-20. Updated for ef386af.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

setup() now conditionally restarts and configures the SPI bus for SENSECAP_INDICATOR before LoRa/radio access.

Changes

SenseCAP SPI setup

Layer / File(s) Summary
Restore SPI before radio access
src/main.cpp
Under SENSECAP_INDICATOR, calls SPI.end(), reinitializes SPI with LoRa pins at 4 MHz, and emits a debug log before radio initialization.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: thebentern, jp-bennett, caveman99

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is mostly just one bullet and omits the required template sections and attestations. Replace the template tips with a full PR summary, add testing/regression details, and complete the attestation checklist; include a bug number if applicable.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: fixing the SEEED Indicator boot-to-BaseUI splash-screen issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch baseui_fixindicator

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/main.cpp`:
- Around line 1115-1124: Replace the multi-paragraph comment above the SPI
restart with a concise one- or two-line summary stating that the panel
initialization can stop the shared SPI2 bus and that the bus must be restarted
before using the radio. Keep the existing implementation and ordering unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 2c6d2774-a164-4554-a1da-d1c9c1b997b7

📥 Commits

Reviewing files that changed from the base of the PR and between a58daf0 and ef386af.

📒 Files selected for processing (1)
  • src/main.cpp

Comment thread src/main.cpp
Comment on lines +1115 to +1124
// The ST7701 panel shares SCK/MOSI/MISO (41/48/47) with the SX1262, and its host is SPI2_HOST,
// which on the S3 is the same peripheral as the Arduino `SPI` object (FSPI == SPI2).
// LovyanGFX bit-bangs the ST7701 init sequence on those pins, and because this variant builds
// with USE_ARDUINO_HAL_GPIO it does so via Arduino pinMode()/digitalWrite(). pinMode() calls
// perimanSetPinBus(.., ESP32_BUS_TYPE_GPIO, ..), whose deinit callback (spiDetachBus_SCK) ends
// up in spiStopBus() and gates the SPI2 clock. RadioLib then spins forever in spiTransferByte()
// waiting on cmd.update, which never clears on a stopped peripheral, and the watchdog fires.
//
// Restart the bus here, after the panel is up and before the radio is touched. Note that
// SPIClass::begin() early-returns when _spi is already non-NULL, so end() first is required.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Shorten the multi-paragraph explanatory comment.

As per coding guidelines, keep code comments minimal—one or two lines maximum—and do not add multi-paragraph explanatory blocks. Consider moving this detailed background explanation to the pull request description or a separate documentation file.

♻️ Proposed fix to simplify the comment
-    // The ST7701 panel shares SCK/MOSI/MISO (41/48/47) with the SX1262, and its host is SPI2_HOST,
-    // which on the S3 is the same peripheral as the Arduino `SPI` object (FSPI == SPI2).
-    // LovyanGFX bit-bangs the ST7701 init sequence on those pins, and because this variant builds
-    // with USE_ARDUINO_HAL_GPIO it does so via Arduino pinMode()/digitalWrite(). pinMode() calls
-    // perimanSetPinBus(.., ESP32_BUS_TYPE_GPIO, ..), whose deinit callback (spiDetachBus_SCK) ends
-    // up in spiStopBus() and gates the SPI2 clock. RadioLib then spins forever in spiTransferByte()
-    // waiting on cmd.update, which never clears on a stopped peripheral, and the watchdog fires.
-    //
-    // Restart the bus here, after the panel is up and before the radio is touched. Note that
-    // SPIClass::begin() early-returns when _spi is already non-NULL, so end() first is required.
+    // Restart SPI to recover the bus after LovyanGFX bit-bangs the shared LoRa pins.
+    // SPI.end() is required first because begin() early-returns if already initialized.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// The ST7701 panel shares SCK/MOSI/MISO (41/48/47) with the SX1262, and its host is SPI2_HOST,
// which on the S3 is the same peripheral as the Arduino `SPI` object (FSPI == SPI2).
// LovyanGFX bit-bangs the ST7701 init sequence on those pins, and because this variant builds
// with USE_ARDUINO_HAL_GPIO it does so via Arduino pinMode()/digitalWrite(). pinMode() calls
// perimanSetPinBus(.., ESP32_BUS_TYPE_GPIO, ..), whose deinit callback (spiDetachBus_SCK) ends
// up in spiStopBus() and gates the SPI2 clock. RadioLib then spins forever in spiTransferByte()
// waiting on cmd.update, which never clears on a stopped peripheral, and the watchdog fires.
//
// Restart the bus here, after the panel is up and before the radio is touched. Note that
// SPIClass::begin() early-returns when _spi is already non-NULL, so end() first is required.
// Restart SPI to recover the bus after LovyanGFX bit-bangs the shared LoRa pins.
// SPI.end() is required first because begin() early-returns if already initialized.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/main.cpp` around lines 1115 - 1124, Replace the multi-paragraph comment
above the SPI restart with a concise one- or two-line summary stating that the
panel initialization can stop the shared SPI2 bus and that the bus must be
restarted before using the radio. Keep the existing implementation and ordering
unchanged.

Source: Coding guidelines

@vidplace7
vidplace7 requested review from caveman99 and mverch67 July 21, 2026 17:07
@Xaositek Xaositek added the bugfix Pull request that fixes bugs label Jul 21, 2026
@thebentern
thebentern merged commit 6e48fac into develop Jul 21, 2026
103 of 109 checks passed
@Xaositek
Xaositek deleted the baseui_fixindicator branch July 21, 2026 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.8 baseui Issues directly related to BaseUI bugfix Pull request that fixes bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants