Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Lib/Rabbit4000/BIOSLIB/CPUPARAM.LIB
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ _enableClockModulation::
bool hl
#if ENABLE_SPREADER == 0 // spreader disabled
xor a
ld (MTCRShadow), a
ioi ld (MTCR), a // normal /OE0 and /OE1 timing
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Even with the spreader disabled, we should keep the "early /OE" setting on products that have enabled it.

ld (GCM0RShadow), a
ioi ld (GCM0R), a
ld (GCM1RShadow), a
Expand Down
12 changes: 10 additions & 2 deletions Lib/Rabbit4000/BIOSLIB/StdBios.c
Original file line number Diff line number Diff line change
Expand Up @@ -1874,6 +1874,13 @@ ioi ld (STACKSEG), a
#endif
//end serial flash fast RAM copy

#if _BOARD_TYPE_ == RCM4110
; RCM4110 with 55ns flash requires early output enable on MTCR when running
; with 0 wait states, so configure that before setting MB0CR.
ld a, 0x0C
ioi ld (MTCR), a
#endif

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This change enables "early /OE" on the RCM4110 before reaching code that configures MB0CR for 0 wait states, and therefore will access the RCM4110's 55ns flash at full speed.

.fastRAMCopyDone::
; Following a fast RAM copy, the current device mapped to MB0 and the device
; that is actually supposed to be mapped to MB0 contain the same code at this
Expand Down Expand Up @@ -2613,14 +2620,15 @@ _more_inits0::
// Initialize the status pin, clocks, clock doubler, debug baud rate
_more_inits02::
lcall _getDoublerSetting ; get doubler setting value into L (h always 0)
ld a, L ; zero value also disables /OEx early output
ld a, L
or a ; update the Zero flag
jr z, .notEarlyOutputEnable

ld a, 0x0C ; value to set both /OE0 and /OE1 early output
.notEarlyOutputEnable:
ioi ld (MTCR), a ; first, update /OE0, /OE1 early output enable
ld (MTCRShadow), a

.notEarlyOutputEnable:
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This change leaves MTCR unmodified when the clock doubler isn't enabled -- allowing the RCM4110 setting from line 1881 to remain in place.

ld a, L ; recover the doubler setting value
ioi ld (GCDR), a ; next, update clock doubler setting
ld (GCDRShadow), a
Expand Down