![Rabbit Rabbit 4000 Скачать руководство пользователя страница 62](http://html1.mh-extra.com/html/rabbit/rabbit-4000/rabbit-4000_user-manual_3116714062.webp)
52
Rabbit 4000 Microprocessor User’s Manual
5.3.4 Separate Instruction and Data Space
To make better use of the 64KB of logical space, an option is provided to map code and
data accesses in the same address space to separate devices. This is accomplished by
enabling the inversion of A16 and the most-significant bit of the bank select bits for
accesses in the root and data segments. Careful use of these features allows both code and
data to separately use up to 64KB of logical memory.
The RAM segment register (RAMSR) provides a shortcut for updating code by accessing
it as data. It provides a “window” that uses the instruction address decoding when read or
written as data.
The
Rabbit 4000 Designer’s Handbook
provides further details on the use of the separate
instruction and data space feature.
5.3.5 Memory Protection
Memory blocks may be protected at three separate granularities, as shown in Table 5-4.
Writes can be prevented to any memory bank by writing to MBxCR. Writes can be pre-
vented and trapped at a resolution of 64KB by enabling protection for that block in the
appropriate WPxR register. For further control, two of those 64KB blocks can be further
subdivided into 4KB blocks by selecting them as the write protect segments A or B.
When a write is attempted to a block protected in WPxR, WPSxLR, or WPSxHR, a
Priority 3 write-protect interrupt occurs. This feature is automatically enabled by writing to
the block protection registers; to disable it, set all the write-protect block registers to zero.
5.3.6 Stack Protection
The Rabbit 4000 provides stack overflow and underflow protection. Low and high logical
address limits can be set in STKLLR and STKHLR; a Priority 3 stack-violation interrupt
occurs when a stack-based write occurs within the 16 bytes below the upper limit or
within the 16 bytes above the lower limit. Note that the writes will still occur even if they
are within the 16 bytes surrounding the limits, but the interrupt can serve as a warning to
the application that the stack is in danger of being over or underrun.
The stack checking can be enabled or disabled by writing to STKCR.
When stack protection is enabled and a DMA transfer is occurring, the stack protection
interrupt will occur if the lower 16 bits of a DMA transfer’s
physical
write address match
the 16 bits of the stack protection’s
logical
address limits.
Table 5-4. Memory Protection Options
Method
Block Size
Registers Used
Memory Bank
128KB – 4MB
MBxCR, MECR
Write-Protect Blocks
64KB
WPCR, WPxR
Write Protect Segment A/B
4KB
WPSxR, WPSxLR, WPSxHR
Содержание Rabbit 4000
Страница 1: ...Rabbit 4000 Microprocessor User s Manual 019 0152 070720 H...
Страница 18: ...8 Rabbit 4000 Microprocessor User s Manual...
Страница 40: ...30 Rabbit 4000 Microprocessor User s Manual...
Страница 74: ...64 Rabbit 4000 Microprocessor User s Manual...
Страница 82: ...72 Rabbit 4000 Microprocessor User s Manual...
Страница 86: ...76 Rabbit 4000 Microprocessor User s Manual...
Страница 96: ...86 Rabbit 4000 Microprocessor User s Manual...
Страница 182: ...172 Rabbit 4000 Microprocessor User s Manual...
Страница 240: ...230 Rabbit 4000 Microprocessor User s Manual...
Страница 248: ...238 Rabbit 4000 Microprocessor User s Manual...
Страница 256: ...246 Rabbit 4000 Microprocessor User s Manual...
Страница 310: ...300 Rabbit 4000 Microprocessor User s Manual...
Страница 330: ...320 Rabbit 4000 Microprocessor User s Manual...
Страница 348: ...338 Rabbit 4000 Microprocessor User s Manual...