Open
Conversation
There may be instances where we want a non-zero MTCR even if the spectrum spreader is disabled. By leaving it unmodified, it might still be zero from the default startup value, or set non-zero elsewhere.
This increases the /OE timing margin for 29MHz products with 55ns flash memory for the brief moment before _enableClockModulation() enables it, and ensures it's still enabled if the spectrum spreader is disabled.
tomlogic
commented
Apr 6, 2021
| ld (MTCRShadow), a | ||
| ; ioi ld (MTCR), a // normal /OE0 and /OE1 timing | ||
| IOWRITE_A(MTCR) | ||
| #if _CPU_ID_ < R2000_R3 || ENABLE_SPREADER == 0 |
Contributor
Author
There was a problem hiding this comment.
This change ensures that we don't disable "early /OE" if it was previously enabled. Startup default is disabled (0x00), but the StdBios.c change around line 2455 will automatically enable it on all products with a doubled clock, and later code in this function enables it before turning on the spectrum spreader.
|
|
||
| ld a, 0x0C ; value to set both /OE0 and /OE1 early output | ||
| ioi ld (MTCR), a ; first, update /OE0, /OE1 early output enable | ||
| ld (MTCRShadow), a |
Contributor
Author
There was a problem hiding this comment.
This change, backported from Dynamic C PR 30, enables "early /OE" before enabling the clock doubler.
Note that Dynamic C 9 could use the existing code from that sets MTCR and its shadow to 0 if the clock doubler is disabled, since there isn't any code earlier in the BIOS attempting to set it (as the Dynamic C 10 patch does for the RCM4110).
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.
This branch addresses issue #7 affecting updated 29MHz products using 55ns flash memory, and will become part of the master branch once approved for release.