fix(tlora-pager): Remove SDCARD_USE_SPI1 so SX1262 and SD can share bus#9870
Merged
Merged
Conversation
Contributor
Author
thebentern
approved these changes
Mar 9, 2026
mverch67
reviewed
Mar 10, 2026
mverch67
left a comment
Collaborator
There was a problem hiding this comment.
I just tried it with my T-Lora Pager and SD card. It didn't find the SD card whether SDCARD_USE_SP1 was defined or not. It seems there are further adaptations necessary.
Contributor
Author
|
Weird. Works for me.
…On Tue, Mar 10, 2026 at 21:58 Manuel ***@***.***> wrote:
***@***.**** commented on this pull request.
I just tried it with my T-Lora Pager and SD card. It didn't find the SD
card whether SDCARD_USE_SP1 was defined or not. It seems there are further
adaptations necessary.
—
Reply to this email directly, view it on GitHub
<#9870 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACAFAGATNURUPJK2CSLQTT4QANQVAVCNFSM6AAAAACWMCIZT2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTSMRSGYYTIOBRG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Contributor
Author
|
Samsung 256GB, the green one from Amazon
…On Tue, Mar 10, 2026 at 21:58 Andrew Yong ***@***.***> wrote:
Weird. Works for me.
On Tue, Mar 10, 2026 at 21:58 Manuel ***@***.***> wrote:
> ***@***.**** commented on this pull request.
>
> I just tried it with my T-Lora Pager and SD card. It didn't find the SD
> card whether SDCARD_USE_SP1 was defined or not. It seems there are further
> adaptations necessary.
>
> —
> Reply to this email directly, view it on GitHub
> <#9870 (review)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AACAFAGATNURUPJK2CSLQTT4QANQVAVCNFSM6AAAAACWMCIZT2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTSMRSGYYTIOBRG4>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
mverch67
approved these changes
Mar 10, 2026
mverch67
left a comment
Collaborator
There was a problem hiding this comment.
Looking at the SPI GPIO definitions SD card and radio are using the same GPIO, so they supposed to share indeed the same SPI.
…are SPI bus Problem: - Inserting a µSD card causes RadioLib to hit a critical error and reboot - Device enters a boot loop as the SD card remains inserted Reproduction: - Insert a µSD card and power on - RadioLib reports a critical error on boot - Device reboots, repeating indefinitely Root cause: - On T-Lora Pager, SX1262 and the µSD slot share the same physical SPI bus (same SCK/MOSI/MISO pins, differentiated only by CS) - SDCARD_USE_SPI1 is intended for boards where SD is on a separate SPI bus; it initializes a second ESP32 SPI peripheral (SPI3) for SD - SPI2 is already driving those same pins for LoRa, so both controllers simultaneously drive the same GPIO lines, causing bus contention Fix: - Remove SDCARD_USE_SPI1 so both devices share a single SPI peripheral (SPI2), with CS pins providing device selection as intended - Tested on a custom fork of device-ui; LoRa and SD card map tiles both work correctly with an SD card inserted Signed-off-by: Andrew Yong <me@ndoo.sg>
68b4667 to
9b71b58
Compare
Contributor
Author
|
Sorry, accidentally pushed some testing commits, resetting and force push… |
thebentern
pushed a commit
that referenced
this pull request
Mar 19, 2026
…are SPI bus (#9870) Problem: - Inserting a µSD card causes RadioLib to hit a critical error and reboot - Device enters a boot loop as the SD card remains inserted Reproduction: - Insert a µSD card and power on - RadioLib reports a critical error on boot - Device reboots, repeating indefinitely Root cause: - On T-Lora Pager, SX1262 and the µSD slot share the same physical SPI bus (same SCK/MOSI/MISO pins, differentiated only by CS) - SDCARD_USE_SPI1 is intended for boards where SD is on a separate SPI bus; it initializes a second ESP32 SPI peripheral (SPI3) for SD - SPI2 is already driving those same pins for LoRa, so both controllers simultaneously drive the same GPIO lines, causing bus contention Fix: - Remove SDCARD_USE_SPI1 so both devices share a single SPI peripheral (SPI2), with CS pins providing device selection as intended - Tested on a custom fork of device-ui; LoRa and SD card map tiles both work correctly with an SD card inserted Signed-off-by: Andrew Yong <me@ndoo.sg>
jeek
pushed a commit
to jeek/Meshtastic-Exploiteers-Hacker-Pager
that referenced
this pull request
Jun 30, 2026
…are SPI bus (meshtastic#9870) Problem: - Inserting a µSD card causes RadioLib to hit a critical error and reboot - Device enters a boot loop as the SD card remains inserted Reproduction: - Insert a µSD card and power on - RadioLib reports a critical error on boot - Device reboots, repeating indefinitely Root cause: - On T-Lora Pager, SX1262 and the µSD slot share the same physical SPI bus (same SCK/MOSI/MISO pins, differentiated only by CS) - SDCARD_USE_SPI1 is intended for boards where SD is on a separate SPI bus; it initializes a second ESP32 SPI peripheral (SPI3) for SD - SPI2 is already driving those same pins for LoRa, so both controllers simultaneously drive the same GPIO lines, causing bus contention Fix: - Remove SDCARD_USE_SPI1 so both devices share a single SPI peripheral (SPI2), with CS pins providing device selection as intended - Tested on a custom fork of device-ui; LoRa and SD card map tiles both work correctly with an SD card inserted Signed-off-by: Andrew Yong <me@ndoo.sg>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Problem:
Reproduction:
Root cause:
Fix:
Testing:
tlora-pager-tft is currently broken due to no mainline device-ui support. If you replace the device-ui in lib_deps with
https://github.com/Meshtastic-Malaysia/device-ui/archive/refs/heads/tlora-pager-tft-pluginbased.zipyou should be able to build a working Device UI and test with a µSD with maps on it.🤝 Attestations