Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable early /OE in more configurations #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tomlogic
Copy link
Contributor

@tomlogic tomlogic commented Apr 6, 2021

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.

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.
ld (MTCRShadow), a
; ioi ld (MTCR), a // normal /OE0 and /OE1 timing
IOWRITE_A(MTCR)
#if _CPU_ID_ < R2000_R3 || ENABLE_SPREADER == 0
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant