71M6521FEIM-DB Maxim Integrated Products, 71M6521FEIM-DB Datasheet - Page 40

no-image

71M6521FEIM-DB

Manufacturer Part Number
71M6521FEIM-DB
Description
Power Management Modules & Development Tools 71M6521FE DEMO BOARD M6521FE DEMO BOARD
Manufacturer
Maxim Integrated Products
Datasheet

Specifications of 71M6521FEIM-DB

Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Note: Throughout the Demo Code, an attempt has been made to put the most frequently used variables in the
fastest memory space.
The 8051 has 128 bytes of stack, and this motivates Keil C's unusual compiler design. By default, the Keil C compiler
does not generate reentrant code. The linker manages local variables of each type of memory as a series of overlays,
and uses a call-tree of the subroutines to arrange that the local variables of active subroutines do not overlap.
The overlay scheme can use memory very efficiently. This is useful because the 71M652X chips only have 2k of RAM,
and 256 bytes of internal memory.
The compiler treats uncalled subroutines as possible interrupt routines, and starts new hierarchies, which can rapidly
fragment each type of memory and interfere with its reuse.
To combat this, the following measures were taken when generating the Demo Code:
With these measures applied, the Demo Code uses memory efficiently, and normally no memory issues are en-
countered. The Demo Code does not have deep call trees from the interrupts, so "small reentrant" definitions can be
used, which keep the stack of reentrant variables in the fast (small) internal RAM.
The register sets are also in internal memory. The C compiler has special interrupt declaration syntax to use them. The
"noaregs" pragma around reentrant routines stops the compiler from accessing registers via the shorter absolute
memory references. This is because the Demo Code uses all four sets of registers for different high-speed interrupts.
Using "noaregs" lets any interrupt routine call any reentrant routine without overwriting a different interrupt's registers.
Revision 1.7
5.1.2 Compiler-Specific Information
The code is organized as a control loop, keeping most code in a single hierarchy of subroutines,
The programmers eliminated unused subroutines by commenting them out when the linker complained
about them. Also, the Demo Code explicitly defines interrupt code and routines called from interrupt code
as "reentrant" so that the compiler keeps their variables on a stack.
When data has a stable existence, the Demo Code keeps a single copy in a shared static structure.
Data Type
Bit
Sbit
SFR
SFR16
signed/unsigned char
enum
unsigned short
signed short
signed/unsigned int
signed int
unsigned long
Float
© Copyright 2005-2007 TERIDIAN Semiconductor Corporation
Notation
Bbool
U08
S16
enum
U16
U16
S16
U32
F32
Table 5-2: Internal Data Types
TERIDIAN Proprietary
Bits
1
1
8
16
8
8 or 16
16
16
16
16
32
32
Bytes
1
2
1
2
2
2
4
4
1 or 2
2
71M652X Software User’s Guide
Comments
Unique to 8051
Unique to 8051
Unique to 8051
Unique to 8051
ANSI C
ANSI C
ANSI C
ANSI C
ANSI C
ANSI C
ANSI C
ANSI C
40 of 138

Related parts for 71M6521FEIM-DB