Repository navigation
Request EEPROM STOP and wait for host completion - #313
Open
lionelZhaowy wants to merge 1 commit into
Open
lionelZhaowy wants to merge 1 commit into
lionelZhaowy wants to merge 1 commit into
Conversation
AI assistance: OpenAI Codex assisted implementation and validation.
This branch has not been deployed
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.
The EEPROM HAL does not request STOP on its final payload/read command. It can return when FIFO conditions are satisfied while the host is still finishing the transaction. The write path also lacks the device write-cycle wait.
Set the final STOP flags. Poll the actual DIF host status before controller reuse and before returning. For writes, read the RTC frequency through the current official register field. Reject zero before I2C MMIO. Request
ceil(rtc_freq / 200) + 1CLINT ticks after host idle, including one tick for RTC phase. The Microchip datasheet specifies a maximum 5 ms write cycle.Keep block/device encoding and payload chunk progression separate. This branch preserves the old chunk helper. General writes larger than half the FIFO still need the independent chunk-progression fix.
Validation used official Cheshire
6c6dd5e834347f72c7be31cd6c41021ec293c5b9and its locked actual I2C DIFcd3153de2783abd3d03d0595e6c4b32413c62f14. The host test executes the real HAL and DIF with the existing instrumented MMIO interface. FIFO/RX responses are ready while host idle is deliberately delayed by four status reads.-std=gnu11 -O2 -Wall -Wextra -Werror: no warnings.Public commands and test adapters are in
sw/tests/host/EEPROM_COMPLETION.md. The RTC field maps to a typed host register object. The CLINT callback records delay requests rather than elapsed time. This checks software command/order behavior. It does not claim EEPROM/controller RTL or physical timing validation. No EEPROM model is included.AI assistance: OpenAI Codex assisted implementation, test, and validation. A separate AI review checked the actual changes and results. This was not a human review.