Revert "docs(sdcardio): clarify SD-first init rule for boards with floating CS pins"#10961
Closed
mikeysklar wants to merge 1 commit intoadafruit:mainfrom
Closed
Revert "docs(sdcardio): clarify SD-first init rule for boards with floating CS pins"#10961mikeysklar wants to merge 1 commit intoadafruit:mainfrom
mikeysklar wants to merge 1 commit intoadafruit:mainfrom
Conversation
Collaborator
|
If you're planning to make a new PR soon with better doc, just go ahead so we don't have two merge builds. |
Author
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.
Reverts #10947.
After further reproduction on the same hardware (Feather RP2040 RFM + Adalogger FeatherWing, CircuitPython 10.1.4 and 10.2.0-rc.0, SPI bauds 400 kHz through 8 MHz, with the RFM CS driven HIGH and floating), constructor order is not a factor in the forum-reported symptom. Both orderings succeed and both orderings fail depending on unrelated variables.
The real invariant — as @bablokb pointed out on the original PR thread — is that every CS pin on the shared SPI bus must be in a known HIGH state before any SPI transaction, whether that's guaranteed by a hardware pull-up or driven HIGH in software. The prior "SD card first" guidance only worked in practice because pull-ups on co-resident CS lines were silently doing that job. Init order is secondary.
The forum user's actual root cause turned out to be (a) a flaky/slow SD card (swapping to a SanDisk Extreme resolved the hangs) and (b) the separate macOS USB-MSC multi-sector-read stall tracked in #10766 / #10779. Neither is related to sdcardio constructor order.
Reverting so the docstring doesn't codify a non-causal rule. A follow-up PR will rewrite the
.. important::note to describe the actual invariant (all CS HIGH before any SPI transaction).Forum thread: https://forums.adafruit.com/viewtopic.php?t=223438