mc68336 Freescale Semiconductor, Inc, mc68336 Datasheet - Page 32

no-image

mc68336

Manufacturer Part Number
mc68336
Description
An Introduction To The Mc68331 And Mc68332
Manufacturer
Freescale Semiconductor, Inc
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
mc68336ACAB20
Manufacturer:
Freescale Semiconductor
Quantity:
10 000
Part Number:
mc68336ACAB25
Manufacturer:
FREESCAL
Quantity:
850
Part Number:
mc68336ACAB25
Manufacturer:
Freescale Semiconductor
Quantity:
10 000
Part Number:
mc68336ACFT20
Manufacturer:
Freescale Semiconductor
Quantity:
10 000
Part Number:
mc68336AMAB20
Manufacturer:
Freescale Semiconductor
Quantity:
10 000
Part Number:
mc68336CMAB20
Manufacturer:
FREESCAL
Quantity:
850
Part Number:
mc68336GCAB20
Manufacturer:
Freescale Semiconductor
Quantity:
10 000
Part Number:
mc68336GCAB25
Manufacturer:
FREESCAL
Quantity:
246
Part Number:
mc68336GCFT20
Manufacturer:
MOTOROLA/摩托罗拉
Quantity:
20 000
Part Number:
mc68336GMFT20
Manufacturer:
IR
Quantity:
100
Part Number:
mc68336GMFT20
Manufacturer:
FREESCAL
Quantity:
246
Part Number:
mc68336GMFT20
Manufacturer:
FREESCALE
Quantity:
20 000
4.1.3.1 Initializing the Reset Vector
Immediately after the release of RESET, an internal state machine fetches the word values at addresses
$000000 through $000006 and loads them into the stack pointer and program counter. These values, gen-
erally referred to collectively as the reset vector, are shown in Table 6. The values in the reset vector must
be initialized in order for program execution to begin.
Sample code to initialize the reset vector follows. This code can be assembled with the IASM32 assembler
available from P&E Microcomputer Systems. Make sure that the stack does not overlap the program code
(the stack grows downward in memory). If the assembler does not recognize “DW”, check the manual to
determine the format for defining a constant word. Another common format is “DC.W.” This example is in
the file “init_res.asm” in the archive “331_2ini.zip” on the Freeware Data System.
4.1.3.2 Initializing Exception Vectors Other than Reset
Each exception vector should point to a handler routine in case the exception is accidentally taken. In an
actual program, the vectors would point to different labels, but in the example below, all of the vectors point
to the same label (INT). This label must be included later on in the code in case an exception is taken. This
example assumes that the label INT is at an address less than $10000. In other words, the upper word of
32
Vector Number
(Decimal)
64–255
16–23
32–47
48–63
2–15
24
25
26
27
28
29
30
31
0
1
org
DW
DW
DW
DW
$0000
$0000
$4000
$0000
$0400
Address
Freescale Semiconductor, Inc.
(Hexadecimal)
$0000
$0002
$0004
$0006
Vector Offset
For More Information On This Product,
100–3FC
C0–FC
40–5C
80–BC
8–3C
6C
7C
60
64
68
70
74
78
0
4
Table 6 Reset Vector for CPU32
Table 5 Exception Vector Table
Go to: www.freescale.com
;begin at address $000000 of memory map
;initial stack pointer = $4000
;initial PC = $400
Initial Program Counter Upper Word
Initial Program Counter Lower Word
Initial Stack Pointer Upper Word
Initial Stack Pointer Lower Word
Reset Vector
Reset: Initial Program Counter
Various Errors and Exceptions
Level 1 Interrupt Autovector
Level 2 Interrupt Autovector
Level 3 Interrupt Autovector
Level 4 Interrupt Autovector
Level 5 Interrupt Autovector
Level 6 Interrupt Autovector
Level 7 Interrupt Autovector
Reset: Initial Stack Pointer
Trap Instruction Vectors
Unassigned, Reserved
Unassigned/Reserved
User Defined Vectors
Spurious Interrupt
Assignment
M68331/332TUT/D
MC68331/332

Related parts for mc68336