English
Language : 

MAX1441 Datasheet, PDF (32/41 Pages) Maxim Integrated Products – Automotive, Two-Channel Proximity and Touch Sensor
Automotive, Two-Channel Proximity and
Touch Sensor
Utility Code
A program segment on top of the 32K program memory
space is realized by ROM, which provides system utility
functions:
• Reset vector
• Bootstrap function for system initialization
• In-circuit debug
Reset vector is located in the utility code, starting at
8000h. Following each reset, the processor automatically
starts execution from the utility code, allowing the utility
code to perform any necessary system-support functions.
Note that the default value for the instruction pointer
is effectively set to the lowest address of the program
memory; a reset forces the program address to 8000h
directly and activates the utility code for code fetch. The
most significant bit of the address bus continues to be
held high until the program flow is first progressed out-
side the utility code memory range.
The SPE bit can be used to force the processor to bypass
the utility code reset routine and start execution from the
user code after a reset. The device is always reset to
8000h after a reset. If the SPE bit is cleared to logic 0, the
processor vectors out of the utility code segment immedi-
ately and starts standard user-program execution at loca-
tion 0000h of the program memory. However, if the SPE
bit is set to logic 1, the processor starts execution from
the utility code, entering to the bootstrap loader mode.
The SPE bit is defaulted to 0. To enter the bootstrap
loader mode, the SPE bit can be set during POR using
the JTAG interface. The bootstrap loader should clear the
SPE bit to 0 after program initialization.
If the utility code is bypassed during reset, the initializa-
tion vector should be stored in the lower bytes of the
program memory.
Nonvolatile Memory Programming
The program memory is realized in the Flash memory,
which provides a storage area for critical code/data that
must be maintained in case of power-down.
Write access to the nonvolatile memory is performed by
a utility code routine that is initiated by a user call to the
subroutine. The ROM routine can perform the write to
the Flash.
Program Stack
The device supports only a software stack that is located
in the normal data memory space and its contents are
fixed as 16-bit words. The program stack supports sub-
routine calls and system interrupts. The stack can also be
used to store variables by the user software. The program
stack is addressed by the stack pointer (SP).
The SP designates the stack location at the top of the
stack, which is the location of the last word stored. The
SP register is a 16-bit register but only the lower bits are
implemented as per C_SP_LEN configuration. The SP is
defaulted to 02F0h and the content of the SP is predec-
remented for write and postincremented for read. The SP
value is automatically decreased before a write opera-
tion, and automatically increased after a read operation.
Note that the PUSH and POP instructions are provided for
the convenience of programmers who prefer to use these
traditional stack-related instructions. From the assembly
and the hardware point of view, the PUSH and POP
instructions are equivalent to the MOVE @++SP, XXX and
MOVE XXX, @SP-- instruction, respectively. These MOVE
instructions involved with indirect SP predecrement/
postincrement the SP register value accordingly.
Memory Management Unit
Memory allocation and access control for program and
data memories are managed by the MMU. Program
stack is controlled by a dedicated state machine for fast
stack operation.
The instruction pointer is fully decoded. Access to any
nonexisting physical memory returns NOP. The instruc-
tion pointer keeps increasing until it reaches 0FFFFh (top
of IP), then it wraps around to 0000h.
The data pointer is fully decoded. Access to any nonex-
isting physical memory returns a value of 0. If an instruc-
tion requests the data pointer to be increased, it keeps
increasing until it reaches 0FFFFh (top of DP), then it
wraps around to 0000h. If an instruction requests the
data pointer to be decreased, it keeps decreasing until it
reaches 0000h, then it wraps around to 0FFFFh.
The last word in sector 1 (07FFh) is used as a security
lock. When content of the security word[15:0] is equal to
FFFFh, the memory is unsecured and program and erase
operations are allowed. When security word[15:0] is any
other value, all memory write operations are blocked by
the hardware.
CAUTION: Do not write any value other than FFFFh
in memory location 07FFh (last word of the Flash
memory). Any value other than FFFFh in this location
PERMANENTLY secures the Flash memory and no fur-
ther Flash write or erase operations are allowed.
All erase/program operations are under the control of the
Flash controller and assisted by the ROM code.
32