# Ticket: Report protocol-based SD card detection and status



Status: completed
Type: ticket
Updated: 2026-09-23
Next Action: none; retained as history; any new execution requires a new explicit owner instruction
Parent: work/wp/active/wp-triple-mirrored-circular-hpt-log-store.md
Canonical Truth: docs/sd-card-operation-and-recovery.md


## Problem



Hardware card detect is disabled, and the existing Home warning equates the
FileX/raw-HPT usable state with physical card presence. A readable card with a
non-current format can therefore be reported as "not installed." Service 467
reports CID identity but does not tell the operator whether the card responded
to protocol initialization, whether representative sectors were readable, or
whether current HPT media 2.0 validation passed.


## Expected Behavior



Use the existing SD protocol operations as the authoritative detection path.
CID proves that the controller received card identity; successful FileX mount
or a non-I/O HPT probe result proves representative media reads; current HPT
media 2.0 validation alone proves ready-for-logging status.

Report one of: checking, no readable response, installed with read error,
installed requiring HPT 2.0 initialization, or installed and HPT 2.0 ready.
Expose the same classification on operator service 467 and use it to prevent
the Home warning from calling readable wrong-format media "not installed."
This ticket is read-only and must not broaden service 468 formatting authority.


## Acceptance Criteria



- [x] Public SD status distinguishes unchecked/checking, no response, read
      error, readable media requiring initialization, and current HPT 2.0 ready.
- [x] A valid CID is preserved and reported even when readable sectors are not
      a valid current HPT 2.0 store.
- [x] Successful FileX or non-I/O raw probe results count as representative
      readable-media evidence.
- [x] Retry attempts run the complete FileX/raw-HPT classifier rather than
      retrying only FileX.
- [x] Operator service 467 reports card status, CID evidence, representative
      sector-read evidence, and the decoded/raw CID.
- [x] Home warnings distinguish no response, read error, and readable media
      requiring initialization.
- [x] No automatic write, format, or service-468 eligibility change is added.
- [x] Static/regression gates and a clean Debug build pass.
- [x] Controller A is programmed and its post-load SD/CID status is healthy.
- [x] The owner visually rechecks operator service 467.

## Implementation Result

- Initial owner review confirmed the upper content but found the lower CID
  fields clipped by the shared 36-pixel message font. Service 467 now selects
  the existing 24-pixel bold font while other message screens retain 36 pixels;
  removing two decorative blank rows reduces the valid report to ten lines.
- On 2026-07-24 the owner reran service 467 and confirmed that its final
  `Raw CID` field is visible, completing the operator visual gate.
- Debug/versioned S-record SHA-256:
  `24BFA31E189F5504EE5602F2326012E9ADC02341FF501E9879D334AC60F5C66E`.
- Stable/versioned ELF SHA-256:
  `1ED9058F98511A0C701A7E8E30A6DA480B4364E306FE0B3C6C0477C771070122`.
- Qualified GCC 10.3 Debug build and link passed. The linked image is
  2,869,924 bytes text and 28,462,852 bytes BSS, including external SDRAM.
- Static/regression gates passed: service 467/CID/detection `25/25`, HPT
  commissioning `82/82`, and SD safety `20/20`.
- Controller A / J-Link `69664082` programmed through
  `jong@srv-rpi00.local`; J-Link V9.58 reported `VTref=3.283 V`, Program &
  Verify `O.K.`, reset, and run.
- Post-load RAM reported hardware variant `0`, no main-system error, SD driver
  status `0`, raw-HPT owner state `6`, protocol detection state `5` (`READY`),
  CID-valid `1`, sector-read-valid `1`, HPT-ready state `5`, HPT status `0`,
  SSP status `0`, and active lane mask `0x7`.
- The installed-card CID still decodes as MID `0x03`, OEM `SD`, product
  `SS08G`, revision `8.0`, serial `0x976F0084`, manufactured `2024-05`.


## Verification



- Run `script/check-sd-card-cid.ps1`.
- Run the established SD safety and HPT commissioning fixtures.
- Build the Debug image with the qualified e2 studio/Renesas toolchain.
- Program Controller A through the hostname-only J-Link hub and read back the
  SD detection, CID, HPT, and main-system-error state.
- Owner enters operator service 467 and reviews the status and identity screen.

## Owner-directed reconciliation — 2026-09-23

Reconcile stale active lifecycle to the previously documented completed disposition; no new test or broader acceptance claim.

Authorization: Owner instruction in this conversation on 2026-09-23 to close/abandon the named work and mitigate older active records.

Previous header retained for evidence interpretation:

> Status: complete; owner verified the complete compact service-467 display on Controller A
> Next Action: none

Earlier observations, unchecked historical criteria, and procedures below/above remain history. This administrative disposition does not qualify a new firmware candidate, physical card, thermal system, ECO, or release. Current 00.05.01 obligations in IDEA-0006, IDEA-0007, MAP-0009, and CAMP-0028 remain unchanged.
