| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
3.17.4.2 Handling of the RAMPD, RAMPX, RAMPY and RAMPZ Special Function Registers
Some AVR devices support memories larger than the 64 KiB range
that can be accessed with 16-bit pointers. To access memory locations
outside this 64 KiB range, the contentent of a RAMP
register is used as high part of the address:
The X, Y, Z address register is concatenated
with the RAMPX, RAMPY, RAMPZ special function
register, respectively, to get a wide address. Similarly,
RAMPD is used together with direct addressing.
-
The startup code initializes the
RAMPspecial function registers with zero. -
If a named address space other than
generic or
__flashis used, thenRAMPZis set as needed before the operation. -
If the device supports RAM larger than 64 KiB and the compiler
needs to change
RAMPZto accomplish an operation,RAMPZis reset to zero after the operation. -
If the device comes with a specific
RAMPregister, the ISR prologue/epilogue saves/restores that SFR and initializes it with zero in case the ISR code might (implicitly) use it. -
RAM larger than 64 KiB is not supported by GCC for AVR targets.
If you use inline assembler to read from locations outside the
16-bit address range and change one of the
RAMPregisters, you must reset it to zero after the access.
| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on October 19, 2013 using texi2html 5.0.
