E13 — V5F core started; SD CMD6 memory overwrite found
| ID | E13 |
| Date | 2026-12-02 |
| Status | done |
| Decisions | D90, D91 (DECISIONS.md) |
| Board | #1 (rev A, 12 MHz crystals) |
| Firmware + results | fw/tests/2026-12-02-10-adcdual-v5f-flash (sources, binaries, results.txt) |
| Scripts | v5fbench.py |
Summary: V5F runs at 384 MHz next to the V3F (shared-RAM mailbox), 106× the V3F on flash code; its mailbox exposed an SD DMA writing 448 bytes past a buffer (fixed, D91).
What
Start the second core (QingKe V5F) with ch32fun StartV5F, check its clock and speed against the V3F, and check that both cores and every existing test still work.
Results
- V5F: hart 1, 384.00 MHz (mcycle over a 100 ms SysTick gate), up 52–62 µs after start; 6 cycles per loop iteration from flash or ITCM, 28 from shared RAM.
- The cores do not slow each other (V3F timings identical with the V5F stopped, spinning or paced).
sdhswiped the mailbox:sd_cmd6re-armed a 512-byte transfer (non-zero BKNUM write, RM §33.2.5), so each CMD6 status overwrote 448 bytes of.bssand always ended with TRANERR. Fixed (D91): CMD6 now error-free; with the fix, mixed-length reads are clean even without D86’s RST_LGC pulse, so this was most likely the D86 glitch too.- After the changes: selftest 11/11, SD 2 × 100 MB streams verified and restored, ADC 5 MS/s and dual 11.4 MS/s, USB all pass.
Lesson
A second core polling a mailbox is a free memory-corruption detector; dump the neighbours of a variable that changes by itself.
Chip facts and numbers: fw/LEARNINGS.md. All experiments: index.