mc9s12xd256 Freescale Semiconductor, Inc, mc9s12xd256 Datasheet - Page 291

no-image

mc9s12xd256

Manufacturer Part Number
mc9s12xd256
Description
Hcs12x Microcontrollers
Manufacturer
Freescale Semiconductor, Inc
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
mc9s12xd256CAA
Manufacturer:
FREESCALE
Quantity:
3 564
Part Number:
mc9s12xd256CAA
Manufacturer:
Freescale Semiconductor
Quantity:
10 000
Part Number:
mc9s12xd256CAA
Manufacturer:
FREESCALE
Quantity:
3 564
Part Number:
mc9s12xd256CAG
Manufacturer:
FREESCALE
Quantity:
1 540
Part Number:
mc9s12xd256CAG
Manufacturer:
Freescale Semiconductor
Quantity:
10 000
6.9
6.9.1
The recommended initialization of the XGATE is as follows:
The following code example implements the XGATE initialization sequence.
6.9.2
SCI_REGS
SCIBDH
SCIBDL
SCICR2
SCISR1
SCIDRL
TIE
TE
RE
SCI_VEC
INT_REGS
INT_CFADDR
INT_CFDATA
RQST
XGATE_REGS
XGMCTL
XGMCTL_CLEAR
XGMCTL_ENABLE
XGCHID
XGVBR
XGIF
Freescale Semiconductor
1. Clear the XGE bit to suppress any incoming service requests.
2. Make sure that no thread is running on the XGATE. This can be done in several ways:
3. Set the XGVBR register to the lowest address of the XGATE vector space.
4. Clear all Channel ID flags.
5. Copy XGATE vectors and code into the RAM.
6. Initialize the S12X_INT module.
7. Enable the XGATE by setting the XGE bit.
a) Poll the XGCHID register until it reads $00. Also poll XGDBG and XGSWEIF to make sure
b) Enter Debug Mode by setting the XGDBG bit. Clear the XGCHID register. Clear the XGDBG
The recommended method is a).
Initialization and Application Information
that the XGATE has not been stopped.
bit.
Initialization
Code Example (Transmit "Hello World!" on SCI)
CPU
;###########################################
;#
;###########################################
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
S12X
$00C8
SCI_REGS+$00
SCI_REGS+$00
SCI_REGS+$03
SCI_REGS+$04
SCI_REGS+$07
$80
$08
$04
$D6
EQU
INT_REGS+$07
INT_REGS+$08
$80
$0380
XGATE_REGS+$00
$FA02
$8282
XGATE_REGS+$02
XGATE_REGS+$06
XGATE_REGS+$08
MC9S12XDP512 Data Sheet, Rev. 2.17
SYMBOLS
;SCI register space
;SCI Baud Rate Register
;SCI Baud Rate Register
;SCI Control Register 2
;SCI Status
;SCI Control Register 2
;TIE bit mask
;TE bit mask
;RE bit mask
;SCI vector number
$0120
;Interrupt Configuration Address Register
;Interrupt Configuration Data Registers
;RQST bit mask
;XGATE register space
;XGATE Module Control Register
;Clear all XGMCTL bits
;Enable XGATE
;XGATE Channel ID Register
;XGATE ISP Select Register
;XGATE Interrupt Flag Vector
Register 1
;S12X_INT register space
#
Chapter 6 XGATE (S12XGATEV2)
291

Related parts for mc9s12xd256