Skip to content

fix(kdrv): Mount the microSD on four lines and prove it takes a write - #110

Merged
jbenedictocenteno merged 2 commits into
developfrom
fix/sd-four-lines
Nov 13, 2026
Merged

jbenedictocenteno merged 2 commits into
developfrom
fix/sd-four-lines

Conversation

@jbenedictocenteno

Copy link
Copy Markdown
Contributor

Description of Change

Counterfeit cards read on four data lines and fail the first write there, so everyday mounts used one line for every card.

  • A mount that comes up on four lines reads the card's last sector and writes the same bytes back. A card that fails this is unmounted, has its supply cycled and is mounted on one line, with no restart.
  • The driver remembers the last card it judged, in RAM for the boot, and mounts it as it was judged, so the check runs once per card and not on every mount.
  • The production row mounts its four lines with the check off (check_req): it judges the slot, not the card. The mount that follows it is the checked one.

Test Scenarios

  • tools/host_tests.sh and tools/check_layers.sh, green at this branch.
  • DVT board with a counterfeit card (it reads on four lines and fails writes there): 25 of 25 boots end on one line, writing and reading.
  • DVT board with a good card: 23 of 23 boots stay on four lines.
  • The file checks of the bench (FAT and card, payloads, a full volume) pass on both: 68 of 68.

Related links

Closes #86

Counterfeit cards read on four lines and fail the first write there, so
everyday mounts used one line. A mount that comes up on four lines now reads
the card's last sector and writes the same bytes back. A card that fails
this is unmounted, has its supply cycled and is mounted on one line.

Closes #86
The write check ran on every mount: a failed write and a supply cycle each
time for a card that refuses four lines, a rewrite of the last sector for one
that takes them. The driver now remembers the last card it judged, in RAM
for the boot, and mounts it as it was judged. The production row mounts its
four lines with the new check_req knob off, so it judges the slot and not the
card, and the mount that follows it is the checked one.
@jbenedictocenteno
jbenedictocenteno merged commit 3df4e3e into develop Nov 13, 2026
1 of 7 checks passed
@jbenedictocenteno
jbenedictocenteno deleted the fix/sd-four-lines branch November 13, 2026 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

kdrv_sd: Mount the microSD on four data lines again

1 participant