Fix SDRAM timing setup during initialization#457
Open
pat-rogers wants to merge 1 commit intoAdaCore:masterfrom
Open
Fix SDRAM timing setup during initialization#457pat-rogers wants to merge 1 commit intoAdaCore:masterfrom
pat-rogers wants to merge 1 commit intoAdaCore:masterfrom
Conversation
We now compute them from the datasheet constants. Specifically, in procedure Initialize: * ExitSelfRefreshDelay, SelfRefreshTime, and RowCycleDelay were all derived from a single SDRAM_Min_Delay_In_ns constant, collapsing three distinct timing constraints (TXSR, TRAS, TRC) into one value. SelfRefreshTime was also hardcoded to 4 cycles, valid only at 90 MHz SDCLK. * Replace with per-parameter ceiling division over named board constants (SDRAM_TXSR_In_Ns, SDRAM_TRAS_In_Ns, SDRAM_TRC_In_Ns) so each constraint is satisfied independently at any clock frequency. STM32.Board spec: * add new SDRAM constants for the sake of the SDRAM initialization
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.
We now compute them from the datasheet constants.
Specifically, in procedure Initialize:
ExitSelfRefreshDelay, SelfRefreshTime, and RowCycleDelay were all derived from a single SDRAM_Min_Delay_In_ns constant, collapsing three distinct timing constraints (TXSR, TRAS, TRC) into one value.
SelfRefreshTime was also hardcoded to 4 cycles, valid only at 90 MHz SDCLK.
Replace with per-parameter ceiling division over named board constants (SDRAM_TXSR_In_Ns, SDRAM_TRAS_In_Ns, SDRAM_TRC_In_Ns) so each constraint is satisfied independently at any clock frequency.
STM32.Board spec: