[ << ] | [ < ] | [ 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
RAMP
special function registers with zero. -
If a named address space other than
generic or
__flash
is used, thenRAMPZ
is set as needed before the operation. -
If the device supports RAM larger than 64 KiB and the compiler
needs to change
RAMPZ
to accomplish an operation,RAMPZ
is reset to zero after the operation. -
If the device comes with a specific
RAMP
register, 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
RAMP
registers, 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.