Implement sendFrameForStart handshake for hi3516av200#48
Merged
Conversation
HiTool uses sendFrameForStart (continuous 0xAA + HEAD frame blast) as the handshake instead of waiting for 0x20 markers. This puts the bootrom in the correct state for DDR initialization on av200. - Add _send_frame_for_start(): blasts 0xAA + HEAD(64, ADDRESS0) for 30s until bootrom ACKs - Use frame-blast for both initial handshake and post-SPL rehandshake on chips with PRESTEP0 - Add 300ms DDR training delay after SPL (HiTool's getDDRTrainingOver) - Skip separate handshake() for frame-blast chips in session - Increase HEAD frame timeout to 150ms (av200 needs ~100ms after ACK) Tested on hardware: - hi3516av200: full PRESTEP0→DDRSTEP0→PRESTEP1→SPL→U-Boot transfer OK - hi3516ev300: no regression, OpenIPC prompt reached - hi3516av300: no regression (PRESTEP0 without frame-blast) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
8e17405 to
8c4103d
Compare
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.
Summary
HiTool uses
sendFrameForStart(continuous 0xAA + HEAD frame blast for 30s) as the handshake instead of waiting for 0x20 markers. This puts the av200 bootrom in the correct state for DDR initialization.Without this, the protocol transfer completes (all frames ACKed) but U-Boot crashes because the bootrom was in the wrong internal state for DDR init.
Changes
_send_frame_for_start(): blasts0xAA + HEAD(64, ADDRESS0)every 50ms for 30s until ACKgetDDRTrainingOverlogic)handshake()for frame-blast chipsTest plan
uv run pytest tests/ -x -v --ignore=tests/fuzz— 326 passed🤖 Generated with Claude Code