English
Language : 

RF60 Datasheet, PDF (92/157 Pages) –
RF60 CRYSTAL-LESS SOC TRANSMITTER v1.0
24.2. XREG Registers
The chip contains another set of registers implemented in the xreg module. These registers are a regular
external memory in XDATA address space, addressable by MOVX instructions only. From CPU perspec-
tive it is a regular external memory. Make sure that all the registers are declared as volatile in C headers.
The advantage of the XREG registers is that they are viewed by the CPU as a regular memory. Therefore,
they can be declared as different data types, structures, array of bytes, and so on. With SFR we only have
special registers and it is not possible to declare them as long integers, for example. On the other hand the
SFR register access is faster and one can use arithmetic and logical operations on them.
Note registers in the XREG regions are aligned at 8, 16, and 32 bit boundaries and they are stored in big
endian fashion. This is to support Keil C compiler, which uses big endian. Note that if the register is, say
23 bits wide, the 32 bits (4 bytes) are allocated for the register and the register is aligned in big endian
fashion.
Therefore, the LSB byte of the register will be at the address <reg_addr> + 3, while the byte directly at the
<reg_addr> is the MSB byte and is empty (read as 0x0), since the register itself is only 23 bits wide.
Table 24.3 shows a memory map of the XREG registers in the external memory space.
Table 24.3. XREG Register Memory Map in External Memory
Mutiple byte variables, if they are not arrays, are stored in big endian .. MSB byte stored on lower address
Arrays are stored with byte index [0] at lower address
XDATA address
0x4002
0x4003
...
0x4007
0x4008
0x4009
0x400a
0x400b
0x400c
0x400d
0x400e
...
0x4011
0x4012
0x4013
...
0x4015
0x4016
0x4017
0x4018
...
0x4026
0x4040
...
0x404f
T ype
BYTE
LWORD
WOR D
BYTE
BYTE
BYTE
BYTE
Name
bLPOSC_TRIM
<reserved>
lFC_ CO UNT
wPA_CAP
<reserved>
bPA_TRIM
<reserved>
bXO_CTRL
bPO RT_ TS T
<reserved>
abMTP_RDATA[16]
MSB byte
LSB byte
MSB byte
LSB byte
Byte [0]
Byte [15]
Tel: +86-755-82973805
Fax: +86-755-82973550
92
E-mail: sales@hoperf.com http://www.hoperf.com