
PEB 20542
PEF 20542
Programming
Data Sheet
258
2000-09-14
6
Programming
6.1
Initialization
After Reset the CPU has to write a minimum set of registers and an optional set
depending on the required features and operating modes.
First, the following initialization steps must be taken:
Select serial protocol mode (refer to
Table 12 "Protocol Mode Overview" on
Page 86
),
Select encoding of the serial data (refer to
Chapter 3.2.13
“
Data Encoding
”
on
Page 75
),
Program the output characteristics of
- pin TxD (selected with bit
’
ODS
’
in
“
Channel Configuration Register 1 (Low
Byte)
”
on Page 159
) and
- interrupt pin INT/INT (selected with bit field
’
IPC(1:0)
’
in
“
Global Mode Register
”
on
Page 127
),
Choose a clock mode (refer to
Table 7 "Overview of Clock Modes" on Page 48
).
Power-up the oscillator unit (with or without shaper) by re-setting bit
GMODE
:OSCPD
to
’
0
’
, if appropriate (
GMODE
:DSHP=
’
0
’
enables the shaper).
The clock mode must be set before power-up (
CCR0H
.PU). The CPU may switch the
SEROCCO-D between power-up and power-down mode. This has no influence upon the
contents of the registers, i.e. the internal state remains stored. In power-down mode
however, all internal clocks are disabled, no interrupts from the corresponding channel
are forwarded to the CPU. This state can be used as a standby mode, when the channel
is (temporarily) not used, thus substantially reducing power consumption.
The SEROCCO-D should usually be initialized in Power-Down mode.
The need for programming further registers depends on the selected features (serial
mode, clock mode specific features, operating mode, address mode, user demands).
6.2
Interrupt Mode
6.2.1
In transmit direction 2
channel. After checking the XFIFO status by polling the Transmit FIFO Write Enable bit
(bit
’
XFW
’
in
STARL
register) or after a Transmit Pool Ready (
’
XPR
’
) interrupt, up to 32
bytes may be entered by the CPU into the XFIFO.
Data Transmission (Interrupt Driven)
32 byte FIFO buffers (transmit pools) are provided for each