Professional Documents
Culture Documents
0 , J u l y 2 0 0 7
TC1796
3 2 - B i t S i n g l e - C h i p M i c ro c o n t r o ll e r
V o l u m e 1 ( o f 2 ) : S y s t e m U n i ts
V o l u m e 2 ( o f 2 ): P e r i p h e r a l U n i t s
M i c r o c o n t r o l l e rs
Edition 2007-07
Published by
Infineon Technologies AG
81726 Munich, Germany
© 2007 Infineon Technologies AG
All Rights Reserved.
Legal Disclaimer
The information given in this document shall in no event be regarded as a guarantee of conditions or
characteristics. With respect to any examples or hints given herein, any typical values stated herein and/or any
information regarding the application of the device, Infineon Technologies hereby disclaims any and all warranties
and liabilities of any kind, including without limitation, warranties of non-infringement of intellectual property rights
of any third party.
Information
For further information on technology, delivery terms and conditions and prices please contact your nearest
Infineon Technologies Office (www.infineon.com).
Warnings
Due to technical requirements components may contain dangerous substances. For information on the types in
question please contact your nearest Infineon Technologies Office.
Infineon Technologies Components may only be used in life-support devices or systems with the express written
approval of Infineon Technologies, if a failure of such components can reasonably be expected to cause the failure
of that life-support device or system, or to affect the safety or effectiveness of that device or system. Life support
devices or systems are intended to be implanted in the human body, or to support and/or maintain and sustain
and/or protect human life. If they fail, it is reasonable to assume that the health of the user or other persons may
be endangered.
U s e r ’ s M a nu a l , V2 . 0 , J u l y 2 0 0 7
TC1796
3 2 - B i t S i n g l e - C h i p M i c ro c o n t r o ll e r
V o l u m e 1 ( o f 2 ) : S y s t e m U n i ts
V o l u m e 2 ( o f 2 ): P e r i p h e r a l U n i t s
M i c r o c o n t r o l l e rs
TC1796
System and Peripheral Units (Vol. 1 and 2)
Trademarks
TriCore® is a trademark of Infineon Technologies AG.
Table of Contents
This “Table of Contents” section refers to page numbers in both parts of the TC1796
User’s Manual, the “System Units” (volume 1 with marking “[1]”) and the “Peripheral
Units” (volume 2 with marking “[2]”) parts.
1 Introduction
This User’s Manual describes the Infineon TC1796, a 32-bit microcontroller DSP based
on the Infineon TriCore Architecture.
• Functional units of the TC1796 are given in plain UPPER CASE. For example: “The
EBU provides an interface to external peripherals”.
• Pins using negative logic are indicated by an overline. For example: “The external
reset pin, HDRST, has a dual function.”.
• Bit fields and bits in registers are in general referenced as “Register name.Bit field”
or “Register name.Bit”. For example: “The Current CPU Priority Number bit field
ICR.CCPN is cleared”. Most of the register names contain a module name prefix,
separated by a underscore character “_” from the real register name (for example,
“ASC0_CON”, where “ASC0” is the module name prefix, and “CON” is the kernel
register name). In chapters describing the kernels of the peripheral modules, the
registers are mainly referenced with their kernel register names. The peripheral
module implementation sections mainly refer to the real register names with module
prefixes.
• Variables used to describe sets of processing units or registers appear in mixed
upper-and-lower-case font. For example, register name “MSGCFGn” refers to
multiple “MSGCFG” registers with variable n. The bounds of the variables are always
given where the register expression is first used (for example, “n = 31-0”), and are
repeated as needed in the rest of the text.
• The default radix is decimal. Hexadecimal constants are suffixed with a subscript
letter “H”, as in 100H. Binary constants are suffixed with a subscript letter “B”, as in
111B.
• When the extent of register fields, groups of signals, or groups of pins are collectively
named in the body of the document, they are given as “NAME[A:B]“, which defines a
range for the named group from B to A. Individual bits, signals, or pins are given as
“NAME[C]” where the range of the variable C is given in the text. For example:
CFG[2:0], and SRPN[0].
• Units are abbreviated as follows:
– MHz = Megahertz
– µs = Microseconds
– kBaud, kbit = 1000 characters/bits per second
– MBaud, Mbit = 1,000,000 characters/bits per second
– Kbyte = 1024 bytes of memory
– Mbyte = 1048576 bytes of memory
In general, the k prefix scales a unit by 1000 whereas the K prefix scales a unit by
1024. Hence, the Kbyte unit scales the expression preceding it by 1024. The
kBaud unit scales the expression preceding it by 1000. The M prefix scales by
1,000,000 or 1048576, and µ scales by .000001. For example, 1 Kbyte is
1024 bytes, 1 Mbyte is 1024 x 1024 bytes, 1 kBaud/kbit are 1000 characters/bits
per second, 1 MBaud/Mbit are 1000000 characters/bits per second, and 1 MHz is
1,000,000 Hz.
• Data format quantities are defined as follows:
– Byte = 8-bit quantity
– Half-word = 16-bit quantity
FPU DMI
PMI
SPRAM: Scratch-Pad RAM
TriCore 56 KB LDRAM
48 KB SPRAM ICACHE: Instruction cache
16 KB ICACHE (TC1M) LDRAM Local data RAM
8 KB DPRAM
DPRAM: Dual-port RAM
CPS BROM: Boot ROM
Program Local Memory Bus Data Local Memory Bus PFLASH: Program Flash Memory
PBCU P LMB DLMB DBCU DFLASH: Data Flash Memory
SBRAM: Stand-by Data Memory
SRAM: Data Memory
PRAM: PCP Parameter Memory
PMU CMEM: PCP Code Memory
DMU
PLMB: Program Local Memory Bus
16 KB BROM
DLMB: Data Local Memory Bus
LMI
EBU 2 MB PFLASH
128 KB DFLASH 64 KB SRAM RPB: Remote Peripheral Bus
16 KB SBRAM SPB: System Peripheral Bus
Emulation Memory shaded: only available in TC1796ED
Interface LFI Bridge Remote Peripheral Bus
OCDS Debug
Interface
/JTAG 16 KB PRAM
SSC0
F PI-Bus Interface
ASC0
Interrupts
PCP2
Core STM SSC1
ASC1
System Peripheral Bus
fCPU
SCU PLL Ports ADC1
GPTA1 fFPI
BI0
BI1
SMIF
RBCU
MultiCAN
(with 4 MSC MSC
CAN 0 1 MLI MLI MEM
Nodes) 0 1 CHK
MCB05573_mod
1.2.2 Features
The TC1796 has the following features:
Interrupt System
• Total of 181 Service Request Nodes (SRNs)
• Flexible interrupt-prioritizing scheme with 255 interrupt priority levels
• Fast interrupt response
• Service requests are serviced by CPU or PCP
DMA Controller
• 16 independent DMA channels
• Programmable priority of the DMA sub-blocks on the bus interfaces
• Buffer capability for move actions on the buses (minimum of 1 move per bus is
buffered).
• Individually programmable operation modes for each DMA channel
• Full 32-bit addressing capability of each DMA channel
• Programmable data width of DMA transfer/transaction: 8-bit, 16-bit, or 32-bit
• Micro Link bus interface support
• One register set for each DMA channel
• Flexible interrupt generation
• DMA Controller operates as bus bridge between System Peripheral Bus and Remote
Peripheral Bus
Package
• P-BGA-416 package, 1 mm pitch
Temperature Ranges
• Ambient temperature: -40 ° to +125 °C
• Maximum junction temperature: +150 °C
Clock Frequencies
• Maximum CPU clock frequency: 150 MHz
• Maximum system clock frequency: 75 MHz
Clock fASC
Control
RXD
Address RXD
ASC
Decoder Port
Module
TXD Control
(Kernel) TXD
EIR
TBIR
Interrupt
TIR
Control
RIR
To DMA MCB05574
Features
• Full-duplex asynchronous operating modes
– 8-bit or 9-bit data frames, LSB first
– Parity-bit generation/checking
– One or two stop bits
– Baud rate from 4.69 MBaud to 1.12 Baud (@ 75 MHz clock)
– Multiprocessor mode for automatic address/data byte detection
– Loop-back capability
• Half-duplex 8-bit synchronous operating mode
– Baud rate from 9.38 Mbit/s to 763 Bit/s (@ 75 MHz clock)
• Double-buffered transmitter/receiver
• Interrupt generation
– On a transmit buffer empty condition
– On a transmit last bit of a frame condition
– On a receive buffer full condition
– On an error condition (frame, parity, overrun error)
MRSTA
Master MRSTB
fSSC
MTSR MTSR
Clock
Control fCLC MTSRA
MTSRB
Slave
MRST MRST
Address SSC
Decoder SCLKA Port
Module
Slave SCLKB Control
(Kernel)
SCLK SCLK
EIR Master
SLSI[7:1]
Interrupt TIR Slave
Control SLSO[7:0] SLSI
RIR Master
SSC Enabled SLSO[7:0]
M/S Selected
To DMA
MCB05575
Features
• Master and Slave Mode operation
– Full-duplex or half-duplex operation
– Automatic pad control possible
• Flexible data format
– Programmable number of data bits: 2 to 16 bits
– Programmable shift direction: LSB or MSB shift first
– Programmable clock polarity: Idle low or idle high state for the shift clock
– Programmable clock/data phase: Data shift with leading or trailing edge of the shift
clock
• Baud rate generation from 37.5 MBaud to 572.2 Baud (@ 75 MHz module clock)
• Interrupt generation
– On a transmitter empty condition
– On a receiver full condition
– On an error condition (receive, phase, baud rate, transmit error)
• Flexible SSC pin configuration
• Seven slave select inputs SLSI[7:1] in Slave Mode
• Eight programmable slave select outputs SLSO[7:0] in Master Mode
– Automatic SLSO generation with programmable timing
– Programmable active level and enable control
• SSC0 only: 8-stage Receive FIFO (RXFIFO) and 8-stage Transmit FIFO (TXFIFO)
– Independent control of RXFIFO and TXFIFO
– 2- to 16-bit FIFO data width
– Programmable receive/transmit interrupt trigger level
– Receive and Transmit FIFO filling level indication
– Overrun error generation
– Underflow error generation
fMSC
Clock
Control fCLC
FCLP
FCLN
Address SOP
Downstream
Decoder
Channel SON
EN0
MSC
Interrupt SR[3:0] Module EN1
Control 4 (Kernel)
EN2
To DMA EN3
16
Upstream
Channel
ALTINL[15:0]
8
16 SDI[7:0]
ALTINH[15:0]
EMGSTOPMSC
MCB05576
Features
• Fast synchronous serial interface to connect power switches in particular, or other
peripheral devices via serial buses
• High-speed synchronous serial transmission on downstream channel
– Serial output clock frequency: fFCL = fMSC/2
– Fractional clock divider for precise frequency control of serial clock fMSC
– Command, data, and passive frame types
– Start of serial frame: Software-controlled, timer-controlled, or free-running
– Programmable upstream data frame length (16 or 12 bits)
– Transmission with or without SEL bit
– Flexible chip select generation indicates status during serial frame transmission
– Emergency stop without CPU intervention
• Low-speed asynchronous serial reception on upstream channel
– Baud rate: fMSC divided by 4, 8, 16, 32, 64, 128, or 256
– Standard asynchronous serial frames
– Parity error checker
– 8-to-1 input multiplexer for SDI lines
– Built-in spike filter on SDI lines
TXDC0
CAN
Node 0 RXDC0
INT_O
Interrupt [15:0]
Control CAN Control
Scheduler
ECTT[7:1]
ScheduleTiming DataMemory
The message objects are organized in double-chained linked lists, where each CAN
node has its own list of message objects. A CAN node stores frames only into message
objects that are allocated to the message object list of the CAN node, and it transmits
only messages belonging to this message object list. A powerful, command-driven list
controller performs all message object list operations.
The bit timings for the CAN nodes are derived from the module timer clock (fCAN), and
are programmable up to a data rate of 1 Mbit/s. External bus transceivers are connected
to a CAN node via a pair of receive and transmit pins.
CAN Features
• Compliant with ISO 11898
• CAN functionality according to CAN specification V2.0 B active
• Dedicated control registers for each CAN node
• Data transfer rates up to 1 Mbit/s
• Flexible and powerful message transfer control and error handling capabilities
• Advanced CAN bus bit timing analysis and baud rate detection for each CAN node
via a frame counter
• Full-CAN functionality: A set of 128 message objects can be individually
– Allocated (assigned) to any CAN node
– Configured as transmit or receive object
– Set up to handle frames with 11-bit or 29-bit identifier
– Identified by a timestamp via a frame counter
– Configured to remote monitoring mode
• Advanced acceptance filtering
– Each message object provides an individual acceptance mask to filter incoming
frames.
– A message object can be configured to accept standard or extended frames or to
accept both standard and extended frames.
– Message objects can be grouped into four priority classes for transmission and
reception.
– The selection of the message to be transmitted first can be based on frame
identifier, IDE bit and RTR bit according to CAN arbitration rules, or on its order in
the list.
• Advanced message object functionality
– Message objects can be combined to build FIFO message buffers of arbitrary size,
limited only by the total number of message objects.
– Message objects can be linked to form a gateway that automatically transfers
frames between 2 different CAN buses. A single gateway can link any two CAN
nodes. An arbitrary number of gateways can be defined.
• Advanced data management
– The message objects are organized in double-chained lists.
– List reorganizations can be performed at any time, even during full operation of the
CAN nodes.
– A powerful, command-driven list controller manages the organization of the list
structure and ensures consistency of the list.
– Message FIFOs are based on the list structure and can easily be scaled in size
during CAN operation.
– Static allocation commands offer compatibility with TwinCAN applications that are
not list-based.
• Advanced interrupt handling
– Up to 16 interrupt output lines are available. Interrupt requests can be routed
individually to one of the 16 interrupt output lines.
– Message post-processing notifications can be combined flexibly into a dedicated
register field of 256 notification bits.
TTCAN Features
• Full support of basic cycle and system matrix functionality
• Support of reference messages level 1 and level 2
• Usable as time master
• Arbitration windows supported in time-triggered mode
• Global time information available
• CAN node 0 can be configured either for event-driven or time-triggered mode
• Built-in scheduler mechanism and a timing synchronization unit
• Write protection for scheduler timing data memory
• Timing-related interrupt functionality
Controller 1 Controller 2
CPU CPU
MCA05578
Features
• Synchronous serial communication between MLI transmitters and MLI receivers
located on the same or on different microcontroller devices
• Automatic data transfer/request transactions between local/remote controller
• Fully transparent read/write access supported (= remote programming)
• Complete address range of remote controller available
• Specific frame protocol to transfer commands, addresses and data
• Error control by parity bit
• 32-bit, 16-bit, and 8-bit data transfers
• Programmable baud rate: max. fMLI/2 (= 37.5 Mbit/s @ 75 MHz module clock)
• Multiple remote (slave) controllers supported
TREADY[D:A] 4
TVALID[D:A] 4
Fract . MLI I/O
Divider Transmitter Control TDATA
fSYS
TCLK
fML I Port
BRKOUT MLI Module
Control
RCLK[D:A] 4
SR[7:0] RREADY[D:A] 4
Move MLI I/O
Engine Receiver Control RVALID[D:A] 4
RDATA[D:A] 4
MCB05870_mod
GPTA0 GPTA1
Clock Generation Unit Clock Generation Unit
FPC0 DCM0 FPC0 DCM0
FPC1 PDL0 FPC1 PDL0
FPC2 DCM1 FPC2 DCM1
DIGITAL DIGITAL
FPC3 PLL FPC3 PLL
DCM2 DCM2
FPC4 PDL1 FPC4 PDL1
FPC5 DCM3 FPC5 DCM3
fGPTA
fGPTA Clock Distribution Unit Clock Distribution Unit
Clock
Conn.
Signal Signal
Clock Bus
Clock Bus
I/O Line
I/O Line Sharing Unit I/O Line Sharing Unit Sharing Unit
Interrupt
Interrupt Control Unit Interrupt Control Unit Control Unit
MCB05580
Features
• 8-bit, 10-bit, 12-bit A/D conversion
• Conversion time below 2.5 µs @ 10-bit resolution
• Extended channel status information on request source
• Successive approximation conversion method
• Total Unadjusted Error (TUE) of ±2 LSB @ 10-bit resolution
• Integrated sample & hold functionality
• Direct control of up to 16(32) analog input channels per ADC
• Dedicated control and status registers for each analog channel
• Powerful conversion request sources
• Selectable reference voltages for each channel
• Programmable sample and conversion timing schemes
• Limit checking
• Flexible ADC module service request control unit
• Synchronization of the two on-chip A/D Converters
• Automatic control of external analog multiplexers
• Equidistant samples initiated by timer
• External trigger and gating inputs for conversion requests
• Power reduction and clock control feature
VDD VDDM
VAGND VSS VSSM VAREF
EMUX0
EMUX0
EMUX1 Port
EMUX1
GRPS Control
GRPS
fADC
Clock
16 Analog Input Channels
fCLC
Address AIN15
Decoder ADC AIN16
Module
Kernel Group 1
AIN31
SR[7:0]
Interrupt
Control ASGT
SW0TR, SW0GT
ETR, EGT External
Request
To DMA QTR, QGT Unit
TTR, TGT
Features
• Extreme fast conversion, 21 cycles of fFADC (280 ns @ fFADC = 75 MHz)
• 10-bit A/D conversion
– Higher resolution by averaging of consecutive conversions is supported
• Successive approximation conversion method
• Four differential input channels
• Offset and gain calibration support for each channel
• Differential input amplifier with programmable gain of 1, 2, 4 and 8 for each channel
• Free-running (Channel Timers) or triggered conversion modes
• Trigger and gating control for external signals
• Built-in Channel Timers for internal triggering
• Channel timer request periods independently selectable for each channel
• Selectable, programmable antialiasing and data reduction filter block
fFADC
Clock Data
Control fCLC Reduction
Unit FAIN0P
FAIN0N
Address FAIN1P
A/D
Input Stage
Decoder
Control FAIN1N
A/D
Converter FAIN2P
SR[3:0] FAIN2N
Interrupt
Control FAIN3P
FAIN3N
To DMA
TS[7:0] Channel
Channel
Trigger
Timers
GS[7:0] Control
MCB05582
TSTRES
D[31:0]
TESTMODE
General HDRST A[23:0]
Control 5 Chip
PORST External Bus
Select Unit Interface
NMI 13
Control
BYPASS
BFCLKI
XTAL1
BFLCKO
XTAL2
Oscillator VD D OSC 16
Port 0 Alternate
VD D OSC3 Functions :
16
VSSOSC Port 1 MLI0 / SCU
14 SSC0 / SSC1 /
TRST Port 2
GPTA
TCK 16
Port 3
TDI 16 GPTA
TDO Port 4
JTAG / 8
TMS ASC0 / ASC1 /
OCDS Port 5 MSC0 / MSC1 /MLI0
BRKIN
TC1796 12 ASC0 / ASC1 /
BRKOUT Port 6
SSC1 / CAN
8
TR[15:0] Port 7 ADC0 / ADC1
TRCLK 8
Port 8 MLI 1 /
9 GPTA
VD DEBU 9 MSC0 / MSC1 /
11 Port 9
VD D P GPTA
13 4
Digital Circuitry VD D Port 10 HWCFG
Power Supply 2
VD DFL3
6 Dedicated
VDD SBR AM
62 SSC0 I/O Lines
VSS 8
LVDS MSC Outputs
V FAR EF
VFAGN D ADC
AN[43:0] Analog Inputs
FADC Analog VDD MF
2
Power Supply VSSMF VAR EFx
2 ADC0 /ADC1
VDD AF VAGN Dx
Analog
VSSAF VD D M Power Supply
10 VSSM
N.C.
MCA05583_mod
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
A SO FCL V HD BY A
N.C. P2.9 P2.13 P2.15 P0.14 P0.5 P0.2 P0.1 P0.0 P3.14 P3.5 P3.1 P5.1 P5.2 P5.7 DDFL3 P9.0 P9.3 P10.0 NMI VDDP VSS
N1 P1A RST PASS
D SO BRK D
P2.4 P2.3 P2.2 P0.15 P0.13 P0.11 VDDP VSS VDD P3.8 P3.12 P3.13 P3.11 VDDP VSS VDD P9.4 P9.5 P9.7 P10.3 VDDP VSS VDD TDO
N0 OUT
E
VDD E
P6.12 P6.11 P6.6 P6.9 VDD TCK TDI
OSC3
VSS VDD
F P6.14 P6.10 P6.4 P6.8 TRST TMS F
OSC OSC
K P8.7 P8.5 P8.6 VDDP TR12 TR13 TR15 VSS VSS VSS VSS VSS A9 A6 A3 A4 K
L P1.15 P1.14 P1.13 P1.11 TR11 TR10 TR14 VSS VSS VSS VSS VSS VSS A13 A7 A8 L
M P1.10 P1.9 P1.8 P1.5 TR9 TR8 VSS VSS VSS VSS VSS VSS VDDEBU A12 A11 A10 M
N P1.3 P1.7 P1.6 P1.4 VSS VSS VSS VSS VSS VSS VSS VSS A15 A16 A17 A14 N
P P1.2 P1.1 P1.0 P1.12 VSS VSS VSS VSS VSS VSS VSS VSS VDD A19 A20 A18 P
R
VDD R
P7.1 P7.0 VDD TR6 TR7 TR5 VSS VSS VSS VSS VSS VSS A21 A23 A22
SBRAM
U AN23 P7.7 P7.3 P7.2 TR4 TR2 TR0 VSS VSS VSS VSS VSS D6 D9 D5 D2 U
SLSO
AC AN8 AN4 AN32 AN38 AN42 VAGND1 AN26 AN24 VDDAF VSS VDD P4.4 P4.8 P4.12 VDDP VSS VDDEBU VSS VDD N.C. VDDEBU VSS D28 D25 D23 AC
1
AD AN6 AN1 AN34 AN40 AN35 VAREF1 AN27 AN25 VSSAF P4.0 P4.2 P4.5 P4.11 P4.15 SLSI0 VDDP BC1 HLDA CS3 CS2 CS1 BREQ N.C. D31 D27 D24 AD
SLSO MRST CS
AE AN0 AN33 AN36 AN41 VAREF0 AN28 AN30 VFAGND VDDMF P4.1 P4.3 P4.7 P4.13 VDDP BC0 BC3 WAIT CS0 N.C. N.C. D30 D29 D26 AE
0 0 COMB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
MCA05584
1) In order to minimize noise coupling to the on-chip A/D converters, it is recommended to use these pins as less
as possible in strong driver mode.
2) In case of a power-fail condition (one or more power supply voltages drop below the specified voltage range),
an undefined output driving level may occur at these pins.
3) In case of a power-fail condition (one or more power supply voltages drop below the specified voltage range),
an undefined output driving level may occur at these pins even if they are input-only pins.
4) Input pad with input spike-filter.
5) Open drain pad with input spike-filter.
6) Input pad, test function only, without input spike-filter.
2 CPU Subsystem
The TC1796 processor contains a TriCore 1 V1.3 CPU. This chapter describes the
implementation-specific options of the CPU, and should be read in conjunction with the
TriCore 1 Architecture Manual, which describes the complete TriCore Architecture
including the register and instruction set description.
RPB
Program Memory Data Memory
Unit Unit
LMI
16 KB BROM 16 KB SBRAM
Local Memory -to-
2 MB PFLASH FPI Bus Interface 64 KB SRAM
128 KB DFLASH
LFI-Bridge
Emulation Memory
Interface System
Peripheral Bus
Architecture
• 32-bit load/store architecture
• 4 Gbyte address range (232)
• 16-bit and 32-bit instructions for reduced code size
• Data types:
– Boolean, integer with saturation, bit array, signed fraction, character, double-word
integers, signed integer, unsigned integer, IEEE-754 single-precision floating point
• Data formats:
– Bit, byte (8-bit), half-word (16-bit), word (32-bit), double-word (64-bit)
• Byte and bit addressing
• Little-endian byte ordering for data, memory and CPU registers
• Multiply and Accumulate (MAC) instructions:
– Dual 16 x 16, 16 x 32, 32 x 32
• Saturation integer arithmetic
• Packed data
• Addressing modes:
– Absolute, circular, bit reverse, long + short, base + offset with pre and post-update
• Instruction types:
– Arithmetic, address arithmetic, comparison, address comparison, logical, MAC,
shift, coprocessor, bit logical, branch, bit field, load/store, packed data, system
• General Purpose Register Set (GPRS):
– Sixteen 32-bit data registers
– Sixteen 32-bit address registers
– Three 32-bit status and program counter registers (PSW, PC, PCXI)
• Core Debug support (OCDS):
– Level 1 and 2, supported in conjunction with the CPS block
– Level 3, supported
Implementation
• Most instructions executed in 1 cycle
• Branch instructions in 1, 2 or 3 cycles (using branch prediction)
• Shadow registers for fast context switch
• Automatic context save-on-entry and restore-on-exit for: subroutine, interrupt, trap
• Two memory protection register sets
• Dual instruction issuing (in parallel into Integer Pipeline and Load/Store Pipeline)
• Third pipeline for loop instruction only (zero overhead loop)
• Optional floating point instruction set implemented
64
Coprocessor Interface
64 64
64
Instruction
Prefetch
Protection
PC Unit Align
Injection Debug
Issue Unit
Load/Store Loop
Decode IP Decode
Decode Decode
MAC
Execute Bit Processor Address ALU
ALU EA Loop Exec.
To Register File
IP Decode = Instruction Prefetch and Decode
MAC = Multiply-Accumulate Unit
ALU = Arithmetic/Logic Unit
Loop Exec. = Loop Execution Unit
EA = Effective Address MCA05588
To Pipelines
General Purpose
Register File
64 64
Data Alignment
128
The complete and detailed address map of the CPU and processor subsystem registers
shown in Table 2-1 above is located in Chapter 18. The entries in column “Address
Map” of Table 2-1 directly point to the corresponding pages.
PC FCX ISP
PSW LCX
Interrupt & Trap
PCXI Control
Registers
System Control
Registers
Identification ICR
Register
SYSCON BIV
CPU_ID MMUCON BTV
MCA05590_mod
PSW
Program Status Word (F7E1FE04H) Reset Value: 0000 0B80H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
C V SV AV SAV
or or or or or FX RM 0
FS FI FV FZ FU
rwh rwh rwh rwh rwh rwh rw r
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
In the TC1796, the MMU_CON register indicates the non-availability of the TriCore 1’s
memory management unit (bit MXT is always set).
MMU_CON
MMU Configuration Register (F7E18000H) Reset Value: 0000 8000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
NO
0 TSZ SZB SZA V
MMU
r r r rw rw rw
CPU_SRCn (n = 0-3)
CPU Service Request Control Register n
(F7E0FFFCH-n*4H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SET CLR
SRR SRE 0 TOS 0 SRPN
R R
w w rh rw r rw r rw
Core Debug
Registers
DBGSR
EXEVT
CREVT
SWEVT
TR0EVT
TR1EVT
DMS
DCX
CPU_SBSRC0
MCA05593
This section describes the implementation-specific Core Debug Registers which differ
from the description in the TriCore 1 Architecture Manual. These are:
• Trigger Event 0 Specifier Register
• Trigger Event 1 Specifier Register
• Software Breakpoint Service Request Control Register 0
The non-shaded areas in the register description define the implementation-specific
bits/bit fields.
TR0EVT
Trigger Event 0 Specifier Register (F7E1 FD20H) Reset Value: 0000 0000H
TR1EVT
Trigger Event 1 Specifier Register (F7E1 FD20H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0 0
r r
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DU DU DLR DLR SU
0 0 0 0 BBM EVTA
_U _LR _U _LR SP
r r rw rw rw rw r rw r rw rw
CPU_SBSRC0
CPU Software Breakpoint Service Request Control Register 0
(F7E0 FFBCH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SET CLR
SRR SRE 0 TOS 0 SRPN
R R
w w rh rw r rw r rw
Range 1 Range 1
DPR0_1L DPR0_1U DPM0[15:8] CPR0_1L CPR0_1U CPM0[15:8]
Range 2
DPR0_2L DPR0_2U DPM0[23:16] Data and Code Memory
Protection Sets 0
Range 3 are selected with
PSW.PRS = 00B
DPR0_3L DPR0_3U DPM0[31:24]
Range 1 Range 1
DPR1_1L DPR1_1U DPM1[15:8] CPR1_1L CPR1_1U CPM1[15:8]
Range 2
DPR1_2L DPR1_2U DPM1[23:16] Data and Code Memory
Protection Sets 1
Range 3 are selected with
PSW.PRS = 01B
DPR1_3L DPR1_3U DPM1[31:24]
MCA05594
CPMx (x = 0, 1)
Code Protection Mode Register Set x Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
XE XS BL BU XE XS BL BU
0 0 0 0 0 0 0 0
1 1 1 1 0 0 0 0
rw rr rw rr rw rr rr rw rw rr rw r rw rr rr rw
Program Memory
Interface (PMI)
Interface
64
CPU
PMEM
Tag 16 KB To/From
Data Switch
RAM ICACHE CPU
&
Data Alignment
128 &
Interface Control
48 KB
SPRAM
PMI
Control
Registers
128
Parity
Control/Check
Slave Master
PLMB Interface
PMEM = Program Memory in PMI
64
ICACHE = Instruction Cache
To SCU To/From Program SPRAM = Scratch-Pad RAM
(PMI Memory Parity Errors) Local Memory Bus PLMB = Program Local Memory Bus
MCB05595
PMI_ID PMI_CON0
PMI_CON1
PMI_CON2
MCA05596_mod
PMI_ID
PMI Module Identification Register
(F87FFD08H) Reset Value: 000B C0XXH
31 16 15 8 7 0
r r r
PMI_CON0
PMI Control Register 0 (F87FFD10H) Reset Value: 0000 0002H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CC CC2
0
BYP SPR
r rw rw
PMI_CON1
PMI Control Register 1 (F87FFD14H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CC
0
INV
r rw
PMI_CON2
PMI Control Register 2 (F87FFD18H) Reset Value: 0000 0073H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 PMEMSZ 0 PCSZ
r r r r
Data Memory
Interface (DMI)
Interface
8 KB
Data Switch DPRAM
Interface
&
32 32
BPI
Data Alignment
& 128
Interface Control To/From
56 KB
Remote
LDRAM
Periphera
DMI Interface
Control Bus
Registers (RPB)
128 Parity
Control/Check
Slave Master
DLMB Interface
DMEM = Data Memory in DMI
64
LDRAM = Local Data RAM
DPRAM = Dual-Port RAM To/From Data To SCU (DMI Memory
DLMB = Data Local Memory Bus Local Memory Bus Parity Errors)
MCB05597
Note: There is no support for locked read-modify-write operations in the dual ported
memory.
Access to DMI control registers must only be made with double-word aligned word
accesses. An access not conforming to this rule, or an access that does not follow the
specified privilege mode (Supervisor mode, Endinit-protection), or a write access to a
read-only register, will lead to a bus error if the access was from the LMB Bus, or to a
trap, flagged in DMI_STR/DMI_ATR register in case of a CPU load/store access.
DMI_ID
DMI Module Identification Register
(F87FFC08H) Reset Value: 0008 C0XXH
31 16 15 8 7 0
r r r
The DMI control register indicates the DMI data memory size and data cache availability.
DMI_CON
DMI Control Register (F87FFC10H) Reset Value: 0000 0070H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 DMEMSZ 0 DCSZ
r rh r rh
The DMI control register 1 is required for data cache test purposes. It is noted here for
the sake of completeness.
DMI_CON1
DMI Control Register 1 (F87FFC28H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DC2
0
SPR
r rw
The DMI Synchronous Trap Flag Register, DMI_STR, holds the flags that identify the
root cause of a Data-access Synchronous Bus Error (DSE). Reading DMI_STR in
supervisor mode returns the register contents and then clears its contents. Reading
DMI_STR in user mode returns the contents of the register but does not clear its
contents.
DMI_STR
DMI Synchronous Trap Flag Register
(F87FFC18H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LBE LRE
0 0
STF STF
r rh r rh
The DMI Asynchronous Trap Flag Register, DMI_ATR, holds the flags that inform about
the root cause of a Data Access Asynchronous Bus Error (ASE). Reading DMI_ATR in
supervisor mode returns the register contents and then clears its contents. Reading
DMI_ATR in user mode returns the contents of the register but does not clear its
contents.
DMI_ATR
DMI Asynchronous Trap Flag Register
(F87FFC20H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SBE SRE
0 0 0
ATF ATF
r rh r rh r
Definition of Terms:
• Repeat Rate
Assuming the same instruction is being issued sequentially, repeat is the minimum
number of clock cycles between two consecutive issues. There may be additional
delays described elsewhere due to internal pipeline effects when issuing a different
subsequent instruction.
• Result Latency
The number of clock cycles from the cycle when the instruction is issued to the cycle
when the result value is available to be used as an operand to a subsequent
instruction or written into a GPR. Result latency is not meaningful for instructions that
do not write a value into a GPR.
• Address Latency
The number of clocks cycles from the cycle when the instruction is issued to the cycle
when the addressing mode updated value is available as an operand to a subsequent
instruction or written into an Address Register.
• Flow Latency
The number of clock cycles from the cycle when the instruction is issued to the cycle
when the next instruction (located at the target location or the next sequential
instruction if the control change is conditional) is issued.
3.1 Overview
This chapter describes the TC1796 clock system. Topics covered include clock gating,
clock domains, clock generation, the operation of clock circuitry, boot-time operation,
fail-safe operation, and clock control registers.
The TC1796 clock system performs the following functions:
• Acquires and buffers incoming clock signals to create a master clock frequency
• Distributes in-phase synchronized clock signals throughout the TC1796’s entire clock
tree
• Divides a system master clock frequency into lower frequencies required by the
different modules for operation
• Dynamically reduces power consumption during operation of functional units
• Statically reduces power consumption through programmable power-saving modes
• Reduces electromagnetic interference (EMI) by switching off unused modules
The clock system must be operational before the TC1796 can function, so it contains
special logic to handle power-up and reset operations. Its services are fundamental to
the operation of the entire system, so it contains special fail-safe logic.
Figure 3-1 shows the structure of the TC1796 clock system. The system clock fSYS is
generated by the oscillator circuit and the PLL (phase-locked loop) unit. Each peripheral
module operates with its module clocks fCLC and fMOD. Suffix “MOD” is a place holder for
the module name, e.g. fASC0.
The functionality of the control blocks shown in Figure 3-1 varies depending on the
functional unit being controlled. Some functional units such as the watchdog timer, are
directly driven by the system clock. The implemented clock control register options are
described for each unit on Table 3-9 on Page 3-39.
All clock control registers CLC and the fractional divider registers FDR are Endinit-
protected.
fEBU fASC
EBU EBU_CLC ASC0_CLC ASC0
PBCU ASC1
DBCU
fCL C0
SSC0_CLC fSSC0
PMI / PMU LFI SSC0
SSC0_FDR
fCL C1
SSC1_CLC
TriCore fSSC1 SSC1
SSC1_FDR
CPU
fCL C0
MSC0_CLC fMSC 0 MSC0
DMI / DMU MSC0_FDR
fCL C1
MSC1_CLC fMSC 1
MSC1_FDR MSC1
XTAL1 fC PU
Main Oscillator fCL C
& PLL CPU Clock CAN_CLC fCAN MultiCAN
CAN_FDR
PLL_CLC fSYS fCL C
Register System CLK
XTAL2 fGPTA 0 GPTA0
GPTA_CLC
GPTA_FDR fGPTA 1
GPTA_EDCTR fL TCA2
ICU GPTA1
SBCU LTCA2
fCL C
ADC0_CLC fADC
RBCU ADC0_FDR ADC0
SCU ADC1
fCL C
FADC_CLC fFADC
WDT FADC
FADC_FDR
fSTM SCU_ fSYSC L K P1.12 /
STM STM_CLC
SCLKFDR SYSCLK
fPC P
PCP PCP_CLC MLI0_FDR fML I0 MLI 0
fDMA
DMA DMA_CLC MLI1_FDR fML I1 MLI 1
The module clock for these modules is For these modules fMOD = fSYS. Its module clock
switched off after reset (module is disabled ). can only be switched on or off (no clock divider ).
MCA05599_mod
XTAL1
N-
Divider
PLL
Osc. PLL
Run Lock
Detect. Detect.
OSCDSIC
ORDRES
VCOBYP
VCOSEL
BYPPIN
SYSFS
MOSC
OSCR
LOCK
NDIV
PDIV
KDIV
OGC
BYPASS
Oscillator Control Register PLL Clock Control and Status Register
OSC_CON PLL_CLC
Fundamental
Mode Crystal VSSOSC VSSOSC
1) in case of PLL bypass 0 MHz
1) 1)
Crystal Frequency CX1, CX2 RX2
4 MHz 33 pF 0
8 MHz 18 pF 0
12 MHz 12 pF 0
16 - 25 MHz 10 pF 0
1) Note that these are evaluation start values! MCS05601
OSC_CON
Main ≥1
Oscillator
fOSC Q D Q OSCR
Counter A
(3-Bit)
(4 - 25 MHz) R
OSC_CON
ORDRES ≥1
PLL fN
Counter B Q
(4 - 8 MHz) (5-Bit)
R
MCA05602
OSC_CON
Oscillator Control Register (F0000018H) Reset Value: see Table 3-1
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ORD OSC MOS
0 OGC 0
RES R C
r rw r rwh rh rwh
1
f CPU = -------------- × f OSC
P×K
(3.1)
fSYS = fCPU or fCPU/2
PLL Mode
In PLL Mode, the PLL is running. The VCO clock fVCO is derived from fOSC, divided by the
P factor, multiplied by the PLL (N-Divider). This mode is selected by setting
PLL_CLC.VCOBYP = 0. Further, fCPU and fSYS are derived from fVCO by the K-Divider.
The system clock fSYS can be equal to fCPU (PLL_CLC.SYSFS = 1) or equal to fCPU/2
(PLL_CLC.SYSFS = 0).
N
f CPU = -------------- × f OSC
P×K (3.2)
fSYS = fCPU or fCPU/2
1
f CPU = ---- × f VCObase
K (3.3)
fSYS = fCPU or fCPU/2
P-Divider
The P-Divider divides the oscillator clock fOSC by factor P for the PLL input clock fP.
Table 3-2 shows the P factor values of the P-Divider which are selected by programming
the PLL_CLC.PDIV bit field. It also lists the resulting fP frequency for some dedicated
values of fOSC but the complete range of 4 to 40 MHz can be applied and used for fOSC.
Note that the P-Divider factor is always PLL_CLC.PDIV+1.
N-Divider
The N-Divider in the feedback path of the PLL divides the VCO clock fVCO by factor N for
the N-divider output clock fN. This feedback clock is used as input clock for the PLL
phase detection unit, which compares it with the PLL input clock fP. The phase detector
determines the difference between its two input clocks fP and fN and accordingly
regulates the frequency of the VCO output clock fVCO.
Table 3-3 shows the N factor values of the N-Divider which are selected by
programming the PLL_CLC.NDIV bit field. It also lists the resulting N-divider output clock
fN depending on N and dedicated VCO frequencies. Note that the N-Divider factor is
always PLL_CLC.NDIV+1. For proper operation of the PLL, only N-Divider values of 20
to 100 are allowed.
K-Divider
The K-Divider divides the VCO clock fVCO by factor K for the CGU output clocks fCPU (and
fSYS). Table 3-4 shows the K factor values of the K-Divider that are selected by
programming the PLL_CLC.KDIV bit field. It also lists the resulting output clock fCPU
depending on K and dedicated VCO frequencies. Note that the K-Divider factor is always
PLL_CLC.KDIV+1. For odd K-Divider factors some restrictions for fCPUmax must be
regarded.
Note: The shaded selections cannot be used because the maximum TC1796 fCPU
frequency of 150 MHz is exceeded.
PLL_CLC
PLL Clock Control Register (F0000040H) Reset Values: see Table 3-6
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
BYP OSC
0 0 0 NDIV
PIN DISC
r rh r rwh r rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
VCO SYS RES LO
PDIV 0 KDIV VCOSEL 0
BYP FS LD CK
rw r rw rw rw r rw rwh rh
After this procedure, the device is operating on the PLL target frequency. The note in
Section 3.2.2.4 is also valid for this procedure.
Kernel Disable
Debug
Acknowledge
Suspend
Request MCA05603
MOD_CLC
Clock Control Register (00H) Reset Value: Module-specific
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FS SB E SP DIS DIS
RMC 0
OE WE DIS EN S R
rw r rw w rw rw rh rw
of the peripheral module is stopped when the suspend signal is asserted. If SPEN is set
to 0, the module does not react to the suspend request signal but continues its normal
operation. This feature allows each peripheral module to be adapted to the unique
requirements of the application being debugged. Setting SPEN bits is usually performed
by a debugger.
This feature is necessary because application requirements typically determine whether
on-chip modules should be stopped or left running when an application is suspended for
debugging. For example, a peripheral unit that is controlling the motion of an external
device through motors in most cases must not be stopped so as to prevent damage of
the external device due to the loss of control through the peripheral. On the other hand,
it makes sense to stop the system timer while the debugger is actively controlling the chip
because it should only count the time when the user’s application is running.
Note that it is never appropriate for application software to set the SPEN bit. The debug
suspend mode should only be set by a debug software. To guard against application
software accidently setting SPEN, bit SPEN is specially protected by the mask bit
SBWE. The SPEN bit can only be written if, during the same write operation, SBWE is
set, too. Application software should never set SBWE to 1. In this way, user software can
not accidentally alter the value of the SPEN bit that has been set by a debugger.
Note: The operation of the Watchdog Timer is always automatically stopped in debug
suspend mode.
breakpoint is reached. In such cases, it may not be desired that the kernel of a module
finish whatever transaction is in progress before stopping, because that might cause
important states in this module to be lost. Fast Shut-off Mode, controlled by bit FSOE, is
available for this situation.
If FSOE = 0, modules are stopped as described above. This is called Secure Shut-off
Mode. The module kernel is allowed to finish whatever operation is in progress. The
clock to the unit is then shut off if both the bus interface and the module kernel have
finished their current activity. If Fast Shut-off Mode is selected (FSOE = 1), clock
generation to the unit is stopped as soon as any outstanding bus interface operation is
finished. The clock control unit does not wait until the kernel has finished its transaction.
This option stops the unit’s clock as fast as possible, and the state of the unit will be the
closest possible to the time of the occurrence of the software breakpoint.
Note: In all TC1796 modules except MultiCAN and DMA, the only shut down operating
mode that is available is the Fast Shut-off ModeTC1796, regardless of the state of
the FSOE bit.
Whether Secure Shut-off Mode or Fast Shut-off Mode is required depends on the
application, the needs of the debugger, and the type of unit. For example, the analog-to-
digital converter might allow the converter to finish a running analog conversion before
it can be suspended. Otherwise the conversion might be corrupted and a wrong value
could be produced when Debug Suspend Mode is exited and the unit is enabled again.
This would affect further emulation and debugging of the application’s program.
On the other hand, if a problem is observed to relate to the operation of the external
analog-to-digital converter itself, it might be necessary to stop the unit as fast as possible
in order to monitor its current instantaneous state. To do this, the Fast Shut-off Mode
option would be selected. Although proper continuation of the application’s program
might not be possible after such a step, this would most likely not matter in such a case.
Note that it is never appropriate for application software to set the FSOE bit. Fast Shut-
off Mode should only be set by debug software. To guard against application software
accidently setting FSOE, bit FSOE is specially protected by the mask bit SBWE. The
SPEN bit can only be written if, during the same write operation, SBWE is set, too.
Application software should never set SBWE to 1. In this way, user software can not
accidentally alter the value of the FSOE bit. Note that this is the same guard mechanism
used for the SPEN bit.
A value of 00H in RMC disables the clock signals to these modules (CLC clock is
switched off). If RMC is not equal to 00H, the CLC clock for a unit is generated as
where RMC is the content of its CLC register RMC field with a range of 1 to 255. If RMC
is not available in a CLC register, the CLC clock frequency fCLC is always equal to the
frequency of fSYS.
Note: The number of module clock cycles (wait states) that are required for a
“destructive read” access (means: flags/bits are set/cleared by a read access) to
a module register of a peripheral unit depends on the selected CLC clock
frequency.
Therefore, a slower CLC clock (selected via bit field RMC in the CLC register) may
result in a longer read cycle access time on the FPI Buses for peripheral units with
“destructive read” access (e.g. the ASC).
3.3.3.1 Overview
The fractional divider makes it possible to generate a module clock from an input clock
using a programmable divider. The fractional divider divides the input clock fIN either by
the factor 1/n or by a fraction of n/1024 for any value of n from 0 to 1023, and outputs the
clock signal, fOUT. The fractional divider is controlled by the FDR register. Figure 3-6
shows the fractional divider block diagram.
The adder logic of the fractional divider can be configured for two operating modes:
• Reload counter (addition of +1), generating an output clock pulse on counter overflow
• Adder that adds a STEP value to the RESULT value and generates an output clock
pulse on counter overflow
STEP (10-bit)
Mux Fractional
Divider
Adder
Mux
&
RESULT (10-bit) fOUT
fIN fOUT
Enable
Debug Suspend Request Reset External
Debug Suspend Acknowledge Divider
Control
External Clock Enable Kernel Disable
Request
Module Disable Request
MCB05604
Note: In the TC1796, the fractional divider input clock fIN is also referred to as fCLC and
the fractional divider input clock fOUT is also referred to as fMOD (see Figure 3-5).
1 (3.5)
fOUT = fIN × --- , with n = 1024 - STEP
n
In order to get fOUT = fIN STEP must be programmed with 3FFH. Figure 3-7 shows the
operation of the normal divider mode with a reload value of FDR.STEP = 3FDH. The
clock signal fOUT is the AND combination of the fOUT Enable signal with fIN.
RESULT 3FF 3FD 3FE 3FF 3FD 3FE 3FF 3FD 3FE
fIN
fOUT
Enable
fOUT
MCT05605
n
f OUT = f IN × ------------- , with n = 0-1023 (3.6)
1024
Figure 3-8 shows the operation of the fractional divider mode with a reload value of
FDR.STEP = 234H (= factor 564/1024 = 0.55). The clock signal fOUT is the AND
combination of the fOUT Enable signal with fIN.
fIN
RESULT 150 384 1B8 3EC 220 054 288 0BC 2F0 124 358 18C 3C0
+234 +234 +234 +234 +234 +234 +234 +234 +234 +234 +234 +234 +234
fOUT
Enable
fOUT
MCT05606
Debug Suspend
Acknowledge Fractional Divider
Debug Suspend
Request Register FDR
SUS SUS
REQ ACK SC SM
≥1
switch
& fOUT off
SC not
equal 00B &
≥1 Kernel Disable
Module Disable Request
Request
MCA05607
FDR
Fractional Divider Register Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
DIS EN SUS SUS
0 RESULT
CLK HW REQ ACK
rwh rw rh rh r rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DM SC SM 0 STEP
rw rw rw r rw
Note: See also Table 3-8 for further functional behavior of FDR bit fields and module
operation.
Note: The Fractional Divider Registers are Endinit-protected.
Implementation
FDR registers are implemented for several modules of the TC1796. The name of these
FDR registers is always preceded by the module name (e.g. SSC0_FDR is the FDR
register for the SSC0 module). Table 3-9 defines which module is equipped with a FDR
register.
In the implementation parts of the modules using a fractional divider (see Table 3-9), the
signal fOUT is described as a clock signal and not as clock enable signal.
Note: The ports of the TC1796, SCU, and WDT do not provide CLC registers.
SYSCLK Generation
fIN
fSYS Fractional fSYSCLK
P1.12 /
Divider fOUT 2
SYSCLK
Register
Enable
MultiCAN CAN_INT_O15 ECEN Reset Ext.
SCU_SCLKFDR
Module Divider
MCA05608
f
fSYSCLK = fOUT ⁄ 2 = SYS
------------------- , with n = 1024 - STEP (3.7)
2×n
In fractional divider mode, fOUT is derived from the input clock fIN by division of a fraction
of n/1024 for any value of n from 0 to 1023. In general, the fractional divider mode makes
it possible to program the average output clock frequency with a higher accuracy than in
normal divider mode. Note that in fractional divider mode, the clock fOUT can have a
maximum period jitter of one fIN clock period (fSYSCLK has a maximum period jitter of one
half fIN clock period).
The output frequency of fSYSCLK in fractional divider mode is defined according to the
following formula:
n -
fSYSCLK = fOUT ⁄ 2 = fSYS × --------------------------------- , with n = 0-1023 (3.8)
2 × 1024
SCU_SCLKFDR
SCU System Clock Fractional Divider Register
(F000000CH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
DIS EN SUS SUS
0 RESULT
CLK HW REQ ACK
rwh rw rh rh r rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DM SC SM 0 STEP
rw rw rw r rw
Note: This is only a short summary of the fractional divider behavior. The details on the
fractional divider register functionality are described on Page 3-29.
RST_SR
Reset Status Register (F0000014H) Reset Values: see Table 4-1
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
HW
WDT SFT HD PWO TMP
0 0 BRK 0 HWCFG
RST RST RST RST LS
IN
r rh rh rh rh r rh rh r rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RS RS
0 0
EXT STM
r rh r rh
Table 4-1 defines the reset values of the RST_SR register depending on the reset
source.
RST_REQ
Reset Request Register (F0000010H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
SW SW
0 BO 0 BRK 0 SWCFG
OT IN
r rw r rw r rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RR RR
0 0
EXT STM
r rw r rw
Note: Please refer to the Table 4-3 in this chapter for detailed value configuration for the
SWCFG bit field as well as for SWBRKIN and SWBOOT bits.
The HDRST (output) pin is held low for 1024 fSYS clock cycles by the reset circuitry until
its internal reset sequence is terminated.
When the sequence is terminated, the reset circuitry then releases HDRST (that is, it
does not actively drive HDRST anymore, so that the weak pull-up can try to drive the pin
high). It then begins monitoring the level of the pin. If HDRST is still low (indicating that
it is still being driven low externally), the reset circuitry holds the chip in hardware reset
until a high level is detected. The hardware reset sequence is then terminated and flag
RST_SR.HDRST is set.
The PLL is not affected by an external hardware reset and continues to operate.
In order to safely recognize a valid hardware reset, HDRST must be active for at least
four fCPU clock cycles.
HDRST is equipped with a noise-suppression filter which suppresses glitches below
10 ns pulse width. HDRST pulses with a width above 100 ns are safely recognized as a
valid signal. The noise-suppression filter is switched-off when pin BYPASS = 1.
NMI invokes the trap service routine and can save critical states of the microcontroller
for later examination to determine the cause of the Watchdog Timer failure. However, it
is not possible to stop or terminate the Watchdog Timer’s time-out mode or prevent the
pending watchdog reset.
However, software can prevent the Watchdog Timer by issuing a software reset on its
own. Since the cause of the system failure is presumably unknown at that time, and it is
presumably uncertain which functions of the TC1796 are operating properly, it is
recommended that the software reset is configured to reset all system functions
including the System Timer and external reset output HDRST, and to use the hardware
boot configuration bit field as boot configuration source indicator.
If the NMI trap handler does not perform a software reset, or if the system is so
compromised that the trap handler cannot be executed, the Watchdog Timer will cause
a Watchdog Timer reset to occur at the end of its time-out mode period. The actions
performed on a Watchdog Timer reset sequence are the same as are performed for an
external hardware reset. At the end of the Watchdog Timer reset sequence, bits
WDTRST, RSSTM, and RSEXT are set in register RST_SR. All other reset flags are
cleared.
reset sequence, the TC1796 will again attempt to execute the initialization code. If still
the code cannot be executed because of connection problems, the WDTOE bit will not
have been cleared by software. Again, the Watchdog Timer will time out and generate a
Watchdog Timer reset. However, this time the reset circuitry detects that WDTOE is still
set while a Watchdog Timer error has occurred, indicating danger of cyclic resets. The
reset circuitry then puts the TC1796 in Reset Lock. This state can only be deactivated
again through a power-on reset.
Boot Options
Inputs HWCFG[3:0] (Port P10.[3:0]) and input BRKIN determine the boot mode and boot
location. Table 4-3 shows the boot options/selections which are available in the TC1796.
The source for BRKIN and HWCFG[3:0] can be either the corresponding bits HWBRKIN
and HWCFG[3:0] from register RST_SR (sampled from configuration pins) or the
software configuration bits SWBRKIN and SWCFG[3:0] from register RST_REQ.
The target boot address (program counter start address DFFF FFFCH) is located at the
end of the Boot ROM space. The Boot ROM code then decides how to proceed for the
selected boot modes. When Boot ROM code is left, jump instructions to different
dedicated addresses are executed. Note that pin TESTMODE must be at high level for
all normal boot selection shown in Table 4-3.
External Boot
In external boot modes, code execution is started in external memory via the EBU at a
fixed address (A100 0000H). In Alternate Boot Modes, the code start address is defined
by one of the two ABM headers (see Page 4-30).
In order to access external memory after reset, the EBU must have information about the
type and access mechanism of the external memory. For this purpose, a special external
bus access is executed by the EBU in order to retrieve information about the external
code memory. This access is performed to address offset 0000 0004H of the memory
connected to CS0, using access parameters such that regardless of the type and
characteristics of the external memory, configuration information can be read from the
memory into the EBU. By examining this information, the EBU determines the exact
requirements for accesses to the external memory. It then configures the control
registers accordingly, and performs the first instruction fetch from address A100 0000H.
All further accesses to external memory during external boot will activate CS0 (until the
EBU becomes reprogrammed for example by a user program).
Tri-state Chip
If HWCFG[3:0] = 0000B, all pins of the TC1796 are put into tri-state mode. In this mode,
all pins are deactivated, including the oscillator, and internal circuitry is held in a low-
power mode. This mode allows e.g. board level test equipment or emulator probes to
actively drive lines which are connected to TC1796 pins.
4.3.1 Addressing
As the original architectural position of the BROM is on the FPI Bus and the boot vector
to the Boot ROM is hardwired in the CPU to this location. The internal BROM in the
TC1796 is visible from the PMI side at three different locations, as can be seen in the
memory map:
• In segment 8 (cached) starting at location 8FFF C000H
• In segment 10 (non-cached) starting at location AFFF C000H
• In segment 13 (FPI space) starting at location DFFF C000H.
From DMI side, the internal ROM is not visible in segment 13. Accesses to these
addresses will be routed to the FPI Bus and will cause a bus error.
The hardware-controlled start address after reset is address DFFF FFFCH. At this
location (within the BROM), a jump to start address AFFF F180H is programmed to
guarantee continuation of start program execution after reset.
Because the reset start address is fixed, the Boot ROM is mapped to the upper part of
the internal BROM, at locations ..E000 - ..FFFFH, and the TestROM is mapped to the
lower part of internal BROM (..C000 - ..DFFFH).
Startup Procedure
The startup procedure is the main control program in the Boot ROM which is always
started after every reset operation. It initializes the chip, checks the hardware or software
configuration selections, and branches to the corresponding boot routines. From a user
point of view, the startup procedure lengthens the reset time of the TC1796.
The startup procedure is responsible for the correct initialization of the on-chip
resources. For example, the startup procedure monitors the Flash ramp-up phase and
waits until the Flash memories are ready to be used. The startup procedure further
controls the Flash read protection, initializes SRAM redundancy settings, and copies the
unique chip identifier from Flash into the LDRAM memory.
During the startup procedure, the NMI interrupt, the watchdog timer, and the debug
interfaces are disabled. The NMI interrupt has to be enabled by the user software
(SCU_CON.NMIEN bit set) after proper setup of the interrupt vector table.
The reset configuration indicated in register RST_SR is evaluated by the startup
procedure for selection of the configured operation and of program start memory.
Bootstrap Loader
The Bootstrap loader (BSL) is a software part of the Boot ROM which provides a
mechanism to load a program code into the Scratchpad RAM (SPRAM) of the PMI. The
program code to be loaded is received serially either via the ASC0 or CAN interfaces.
After loading of the code, the bootstrap loader jumps directly to address D400 0000H
(start address of SPRAM) and begins executing the program code that has been loaded.
Further details about the BSL are described in Section 4.4.
Tuning Protection
Tuning protection is supported to protect user software in external Flash memory from
being manipulated and to safely detect changes of this user software.
Emulation Support
If the device currently used is an emulation device (TC1796ED), a boot capability from
emulation memory is supported. For the standard TC1796 this boot option cannot be
activated.
Startup Procedure
Checking boot configuration selections: BRKIN pin,
HWCFG[3:0] pins, SWOPT[2:0], TESTMODE pin
yes
0000B? Execute bootstrap loader
Jump to D4000000H
mode 1 (ASC0)
no
yes
0001B? Execute bootstrap loader
mode 2 (CAN)
no
yes
1111B? Execute bootstrap loader
mode 3 (ASC0)
no
yes TC1796ED Boot from
1000B? Jump to AFF00000H
emulation memory
no
yes Boot from internal
0010B?
PFLASH Jump to A0000000H
no
With the low-to-high signal transition of the hardware reset signal HDRST or the power-
on reset signal PORST, the input pins BRKIN and HWCFG[3:0] of the TC1796 are
latched. If one of the latched BRKIN/HWCFG[3:0] signal combination of Table 4-5 is
detected, the bootstrap loader is started and the selected bootstrap loader mode is
entered.
The bootstrap loader can also be started by a software reset. For this purpose, bit
RST_REQ.SWBRKIN and bit field RST_REQ.SWCFG must be loaded with the
corresponding BRKIN/HWCFG[3:0] code, and bit RST_REQ.SWBOOT must be set (see
also RST_REQ register description at Page 4-5).
When a boot option for a bootstrap loader mode is detected, the TC1796 jumps to
address DFFF FFFCH which is the last word address of the Boot ROM. During execution
of the bootstrap loader, the Watchdog Timer interrupts and NMI interrupts are disabled.
1
PORST or
HDRST
BRKIN
HWCFG[3:0]
2 3 5
Byte Byte Byte Byte
RXD0A 1 2 127 128 6
4
TXD0A D5H
Program Exec. Boot ROM ASC Bootstrap Loader Routine User Code
Location
identification byte has been transmitted, the ASC0 receive pin is enabled again. The
bootstrap loader software now enters two receive loops. The inner loop waits until it has
received four bytes. The outer loop writes one word (four bytes) to the scratchpad RAM
(SPRAM) program memory of the PMI. These loops are running until 128 bytes have
been received.
After the reception of the 128 bytes, the bootstrap loader software is finished and a jump
to address D400 0000H is executed. This address is the 32-bit word location in the
SPRAM at which the first four bytes of the transmitted 128 bytes have been written.
Initialization of ASC0
Bootstrap Loader Mode 1
no
RXD0A pin = 1?
Ident. byte no
yes transmitted?
yes
no Enable receiver
RXD0A pin = 0?
Initialize data pointer
Byte counter = 4
yes
Word counter = 32
Read System Timer
Data byte no
Baud rate no
RXD0A pin = 1? received?
detection
yes
yes
Byte no Data
Unlock WDT
counter = 0? receive
Enable ASC0 clock
loop
Lock WDT yes
Initialize ASC0 port pins
Baud rate Write word to SPRAM
calculation Increment data pointer
and ASC0 Calculate baud rate Byte counter = 4
setup (search for best values for Decrement word counter
FDV and BG registers)
Execute jump to
address D4000000H
MCA05611
Initialization Phase
As in the ASC boot mode, as first task the CAN bootstrap loader has to determine the
CAN baud rate at which the external host is communicating. This task requires the
external host to send initialization frames continuously to the TC1796. The first two data
bytes of the initialization frame include a 2-byte 5555H baud rate detection pattern, an
11-bit (2-byte) identifier ACKID1) for the acknowledge frame, a 16-bit data message
count value DMSGC, and an 11-bit (2-byte) identifier DMSGID1) to be used by the data
frame.
When CAN boot mode is entered, the CAN bootstrap loader program starts measuring
signal pulses at the RXDCAN0 input. After reception and pulse measurements of a
5555H bit pattern (data bytes 0 and 1 of the initialization frame), the CAN bootstrap loader
program calculates the CAN baud rate and programs the baud rate registers of the
MultiCAN module. The TC1796 is now ready to receive CAN frames with the baud rate
of the external host.
Acknowledge Phase
In the acknowledge phase, the bootstrap loader waits until it receives the next correctly
recognized initialization frame from the external host, and acknowledges this frame by
generating a dominant bit in its ACK slot. Afterwards, the bootstrap loader transmits an
acknowledge frame back to the external host indicating that it is now ready to receive
1) The CAN bootstrap loader copies the two identifier bytes received in the initialization frame directly to register
MOAR. Therefore, the respective fields in the initialization frame must contain the intended identifier padded
with two dummy bits at the lower end and extended with bitfields IDE (=0B) and PRI (=01B) at the upper end.
data frames. The acknowledge frame uses the message identifier ACKID that has been
received with the initialization frame. The eight data bytes of the acknowledge frame are
a copy of the data bytes of the recognized initialization frame.
Timing Parameters
There are no general restrictions for CAN timings of the external host. After a reset of
external host and TC1796, the external host can start transmitting initialization frames.
If no acknowledge frame is sent back within a certain time as defined in the external host
(e.g. after a dedicated number of initialization frame transmissions), the external host
can decide that the TC1796 is not able to establish the CAN boot communication link.
yes yes
Programming of CAN
registers for detected
baud rate
Ack. yes
Phase Ack.
Setting dominant bit in Acknow. frame no
Phase
the ACK slot received?
yes
Sending acknow. frame
to the external host
Transmitting CAN
Waiting for reception of
message with eight
the next CAN message
data bytes
Execute jump to
End of data transfers
address D4000000H
MCA05612
1) This value is default after reset without connecting P0.[2:0] to a low or high level. Port 0 pins are inputs after
reset with a pull-up device connected.
Note: For CRC generation and error checking, the Boot ROM software uses the TC1796
on-chip memory checker module with an initial value of FFFF FFFFH for the
memory checker result register before the checksum is generated. Further details
about this module are described in Section 12.4 on Page 12-110.
The time needed for CRC generation depends on the length of the memory range to be
checked. In case of internal PFLASH check, the duration can be roughly calculated as
follows:
• CRC of header: To be defined
• CRC of a Flash space of 400 bytes: To be defined
The operation of each system component in each of these states can be configured by
software. The power-management modes provide flexible reduction of power
consumption through a combination of techniques, including:
• Stopping the CPU clock
• Stopping the clocks of other system components individually
• Clock-speed reduction of some peripheral components individually
The Power Management State Machine (PMSM) controls the power management mode
of all system components during Run Mode, Idle Mode, and Sleep Mode. The PMSM
continues to operate in Idle Mode and Sleep Mode, even if all other system components
have been disabled, so that it can reawaken the system as needed. This flexibility in
power management provides minimum power consumption for any application.
Besides these explicit software-controlled power-saving modes, in the TC1796 special
attention has been paid to automatic power-saving in those operating units which are
currently not required or idle. In that case they are shut off automatically until their
operation is required again.
In typical operation, Idle Mode and Sleep Mode may be entered and exited frequently
during the run time of an application. For example, system software will typically cause
the CPU to enter Idle Mode each time it has to wait for an interrupt before continuing its
tasks. In Sleep Mode and Idle Mode, wake-up is performed automatically when any
enabled interrupt signal is detected, or if the Watchdog Timer signals the CPU an NMI
trap.
PMG_CSR
Power Management Control and Status Register
(F0000034H) Reset Value: 0000 0100H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 PMST 0 REQSLP
r rh r rwh
Features
• Edge-detection of an input signal (rising, falling, or both edges)
• Event generation with combined conditions of input signals
• Pattern detection of input pins (e.g gating functionality)
• Flexible input signal selection
• Generation of multiple output trigger events possible
The block diagram of the ERU is shown in Figure 5-1.
MCB05613
EICRn INTx0
EICRn INTx1
LDENx RENx FENx
INTx2
EXISx
INTx3
The ETL of the input channel analyzes the synchronized output signal INx of the ERS by
an edge-detection logic. This edge-detection block generates a pulse (one clock cycle
long) when a signal transition is detected. The selection which signal transition (edge)
should generate a pulse (event) is done by two control bits, one for the rising edge
(EICRn.RENx) and one for the falling edge (EICRn.FENx). Therefore, only a rising or
falling edge, or both edges of the input signal can be detected. When a selected signal
transition is detected, the external interrupt flag EIFRn.INTFx becomes always set by
hardware, even it is has been set previously. The interrupt flag EIFRn.INTFx is available
as output signal INTFx of the ETL.
The hardware reset condition for EIFRn.INTFx can be controlled in two different ways.
These two modes are selected by bit EIFRn.LDENx.
• EIFRn.LDENx = 0:
Flag EIFRn.INTFx is used as a sticky bit, indicating that the selected signal transition
has been detected by the edge-detection logic at least once. In this mode, bit
EIFRn.INTFx can be cleared only by software.
• EIFRn.LDENx = 1:
In this mode, flag EIFRn.INTFx becomes cleared by hardware if an edge is detected
at the INx signal, that has not been selected. This means, EIFRn.INTFx is cleared by
hardware at a INx rising edge when EICRn.FENx = 1 and EIFRn.INTFx is cleared by
hardware at a INx falling edge when EICRn.RENx = 1. If both bits, EICRn.FENx and
EICRn.RENx, are set, flag EIFRn.INTFx becomes never cleared by hardware. In this
case, flag EIFRn.INTFx can be only cleared by software.
Flag EIFRn.INTFx can be set or cleared by software using the bits FSx or FCx in the flag
modification register FMR. Writing to FMR with bit FMR.FSx set sets flag EIFRn.INTFx.
Writing to FMR with bit FMR.FCx set clears flag EIFRn.INTFx. If both bits are set for one
input channel x, a set operation of the flag will be executed.
Each output pulse of the edge-detection block that sets the EIFRn.INTFx flag by
hardware can be routed also to one of the INTx[3:0] outputs of the ETL unit. The external
interrupt enable bit EICRn.EIENx = 1 enables the interrupt output pulse at the INTx[3:0]
outputs. Bit field EICRn.INPx controls which of the INTx[3:0] outputs is selected for the
output pulse.
IGCRn PDRR
IPENy3 IPENy2 IPENy1 IPENy0 GEENy IGPy PDRy
Interrupt Flags
from Input 2
Channels
INTF0
PDOUTy
INTF1 Pattern
Detection
INTF2 1 00
Logic
INTF3 0 01
GOUTy
10
11
Input Channel Output Channel y
Outputs Enable
INT0y
≥1 Edge
INT1y Detection
INT2y &
IOUTy
INT3y
≥1
TOUTy
INT0[3:0]
INT1[3:0]
INT2[3:0]
INT3[3:0]
becomes active (high) when the selected input channel interrupt flags are at active (high)
level. The state of flag PDRR.PDRy indicates the actual state of the PDOUTy signal.
INT10
P1.1 / REQ1 IN10
INT11
IN11 Input Output
P7.1 / REQ5 INT12 Channel
IN12 Channel
1 INT13 1
IN13
FCLP INTF1 INTF[3:0]
MSC1
INT20
IN20
P1.2 / REQ2 INT21
IN21 Input Output
INT22 Channel
P7.4 / REQ6 IN22 Channel
2 INT23 2
IN23
P1.3 / REQ3 INTF2 INTF[3:0]
P7.5 / REQ7
INT30
IN30
INT31
OUT0 IN31 Input Output
INT32 Channel
OUT8 IN32 Channel
3 INT33 3
OUT16 IN33
GPTA0 OUT17 INTF3 INTF[3:0]
OUT24
OUT25
MCA05616
ERU TGADCx.SW0GTSEL
SW0GT
0
Gating Inputs
PDOUT0 EGT
GOUT0 ASGT
Output N.C.
Channel 0 IOUT0 1
TOUT0 QGT
1
TGADCx.EGTSEL TGT
1
PDOUT1 0
GOUT1 TGADCx.
Output N.C.
Channel 1 IOUT1 ETRSEL
TOUT1
0
ETR
PDOUT2
GOUT2
Output N.C.
Channel 2 IOUT2
TOUT2 TGADCx.
SW0TRSEL
0
PDOUT3 SW0 ADCx
GOUT3 TR (x = 0, 1)
Output N.C.
Channel 3 IOUT3
TOUT3
0123
PDOUT TGADCx.
TTRSEL
SCU_REQ0
DMA SCU_REQ1 0
Controller SCU_REQ2
SCU_REQ3 TTR
DMA_
SYSSRC2
DMA_
SYSSRC3 TGADCx.
QTRSEL
GPTA_INT1 0
GPTA_INT2
GPTA_INT3 QTR
GPTA GPTA0_OUT3
GPTA0_OUT11
GPTA0_OUT28
rising edge detection
CAN
ECTT4
TTCAN ECTT5
0123 0123 012
IOUT TOUT ROUT MCA05617
The External Input Channel Register EICR0 and EICR1 for the external input channels
0 to 3 contain bits to configure the input gating logic IGL and the event trigger logic ETL.
A maximum of 12 input channels are supported by one input unit (defined by the
maximum number of IGCRy.IPENx bits).
EICR0
External Input Channel Register 0
(F0000080H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
EI LD R F
0 INP1 0 EXIS1 0
EN1 EN1 EN1 EN1
r rw rw rw rw rw r rw r
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EI LD R F
0 INP0 0 EXIS0 0
EN0 EN0 EN0 EN0
r rw rw rw rw rw r rw r
EICR1
External Input Channel Register 1
(F0000084H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
EI LD R F
0 INP3 0 EXIS3 0
EN3 EN3 EN3 EN3
r rw rw rw rw rw r rw r
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EI LD R F
0 INP2 0 EXIS2 0
EN2 EN2 EN2 EN2
r rw rw rw rw rw r rw r
The External Input Flag Register EIFR contains all interrupt flags for the external input
channels. The bits in this register can be cleared by software by setting FMR.FCx, and
set by setting FMR.FSx.
EIFR
External Input Flag Register (F0000088H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
INT INT INT INT
0
F3 F2 F1 F0
r rh rh rh rh
The Flag Modification Register is a write-only register that is used to set and to clear the
bits INTFx in register EIFR. If a set event and a clear event (hardware or software) for bit
INTFx occur at the same time, the set event is taken into account.
FMR
Flag Modification Register (F000008CH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
FC FC FC FC
0
3 2 1 0
r w w w w
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FS FS FS FS
0
3 2 1 0
r w w w w
Note: This register is virtual and does not contain any flip-flop.
The Pattern Detection Result Register monitors the combinatorial output status of the
pattern detection units.
PDRR
Pattern Detection Result Register (F0000090H) Reset Value: 0000 000FH
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PDR PDR PDR PDR
0
3 2 1 0
r rh rh rh rh
The Interrupt Gating Control Registers IGCR0 and IGCR1 contain bits to enable the
pattern detection and to control the gating for output channel 0 to 3 (e.g. for interrupt
nodes or peripherals).
IGCR0
Interrupt Gating Register 0 (F0000094H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
GE IPEN IPEN IPEN IPEN
IGP1 0
EN1 13 12 11 10
rw rw r rw rw rw rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GE IPEN IPEN IPEN IPEN
IGP0 0
EN0 03 02 01 00
rw rw r rw rw rw rw
IGCR1
Interrupt Gating Register 1 (F0000098H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
GE IPEN IPEN IPEN IPEN
IGP3 0
EN3 33 32 31 30
rw rw r rw rw rw rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GE IPEN IPEN IPEN IPEN
IGP2 0
EN2 23 22 21 20
rw rw r rw rw rw rw
The Trigger Gating ADC0 Register TGADC0 contains bit fields that determine the
assignment of the output signals of the external request unit to the trigger and gating
inputs of ADC0. The Trigger Gating ADC1 Register TGADC1 contains bit fields that
determine the assignment of the output signals of the external request unit to the trigger
and gating inputs of ADC1. Suffix “x” (x = 0,1) in the bit descriptions refers to the
corresponding A/D converter, ADC0 or ADC1.
TGADC0
Trigger Gating ADC0 Register (F000009CH) Reset Value: 0000 0000H
TGADC1
Trigger Gating ADC1 Register (F00000A0H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0 SW0GTSEL 0 EGTSEL
r rw r rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
r rw r rw r rw r rw
FPU_Exception_PSW
To PSW
30 29 28 27 26
SCU_STAT
Latch
FII FVI FZI FUI FXI
4 3 2 1 0
SCU_CON
FPU
FIEN
0
&
FPU_Exception1
To interrupt
≥1 node
FPU_Exception2 in the DMA
Controller
MCA05618
The FPU interrupt uses the system interrupt node DMA_SYSSRC0 located in the DMA
controller. A description of this register can be found on Page 12-108. Note that
DMA_SYSSRC0.TOS should be written with 00B because FPU interrupt should only be
serviced by the CPU (and not by the PCP).
After a Boot ROM exit, the parity logic is generally enabled (initial value of
SCU_STAT.PARAV = 1), but all specific parity enable control bits PENx are cleared
(parity disabled). During normal operation of the TC1796, the SRAM parity error logic
can be generally disabled only once (PARAV clear) when the SCU_CON.RPARAV bit is
written with 1. Note that if PARAV = 0, the SRAM parity error logic cannot be enabled
anymore except by a power-on reset operation.
Before the parity logic of an SRAM memory block can be used the first time after a
power-on reset operation (before setting its SCU_PETCR.PENx enable bit), the
corresponding memories must be completely initialized by writing every memory location
of it once (exceptions: MultiCAN module memories, Program Cache Tag RAM, and
ICACHE). Otherwise, unpredictable parity errors may occur after setting its
SCU_PETCR.PENx enable bit.
Furthermore, before setting any SCU_PETCR.PENx enable bit after a power-on reset,
register SCU_PETSR should be read once to clear parity error flags, that could have
been set by parity logic tests during the Boot ROM code execution.
Figure 5-7 shows the functionality of the SRAM parity error control in the SCU.
SCU_PETSR SCU_PETCR
PFL0 PEN0
Set
Data Memory ≥1
Parity Error
. .
. .
. .
. .
Non-Maskable
Interrupt
SCU_PETSR SCU_PETCR
PFL6 PEN6
Set
CAN Module
Memory
Parity Error
MCA06448
SCU_PETCR
SCU Parity Error Trap Control Register
(F00000D0H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PEN PEN PEN PEN PEN PEN PEN
0
6 5 4 3 2 1 0
r rw rw rw rw rw rw rw
SCU_PETSR
SCU Parity Error Trap Status Register
(F00000D4H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PFL PFL PFL PFL PFL PFL PFL
0
6 5 4 3 2 1 0
r rh rh rh rh rh rh rh
The resulting divide factor is TCDIV + 1 and leads to an update of the temperature
compensation approximately every 41 ms.
Example: for fSYS = 75 MHz, TCDIV = RoundDown (2.5 × 75) - 1 = 186D (= BAH).
System
Control TCE1 TCS1
Unit THMIN1
2
THMED1 To Pad
M
THMAX1 2 Logic of
11B M U
U EBU
X
8 X Outputs
fSYS 100 KHz Control
4:1 1/TCDIV POSCEN
fREF TCV1 TCC1
THCOUNT
8 TCV0 TCC0
THMAX0
2 M To Pad
THMED0 U M Logic of
Pad 2
THMIN0 11B X U Class A2
fPOSC X GPIO
OSC Temperature Outputs
Enable
Compensation
TCE0 TCS0
Control
MCB05619
The switching thresholds are evaluated hierarchically (see Table 5-6). For proper
operation the relationship THMIN > THMED > THMAX must be true. With increasing
temperature, the compensation value SCU_TCLRx.THCOUNT decreases.
Note: The reset value FFH for the thresholds ensures that the drivers operate on
maximum level if the threshold values have not been initialized.
Note: Reprogramming of the threshold levels in registers SCU_TCLR0 and
SCU_TCLR1 should only be executed while the temperature compensation is
disabled.
Driver THCOUNT
Level
TCV = 11B
Max
THMIN
TCV = 10B
High
THMED
THMAX
TCV = 01B
Low
Count
= function of Temp.
TCV = 00B
Min Thresholds
Temp.
-40 °C 0 °C 40 °C 80 °C 125 °C
MCD05620
Note: Control/status bits with index 0 are assigned for output control of class A2 GPIO
output lines. Control/status bits with index 1 are assigned for EBU output control.
SCU_TCCON
SCU Temperature Compensation Control Register
(F0000048H) Reset Value: 0003 0003H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
TCS TCC TCE TCV
0 0 0
1 1 1 1
r rw r rw rw r rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TCS TCC TCE TCV
TCDIV 0 0
0 0 0 0
rw rw r rw rw r rh
SCU_TCLR0
SCU Temperature Compensation 0 Level Register
(F0000058H) Reset Value: 02FF FFFFH
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
THCOUNT THMAX0
rh rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
THMED0 THMIN0
rw rw
SCU_TCLR1
SCU Temperature Compensation 1 Level Register
(F000005CH) Reset Value: 02FF FFFFH
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
THCOUNT THMAX1
rh rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
THMED1 THMIN1
rw rw
SCU_CON ADC1_CHCON15
DTSON EMUX
=1 = X1B &
Analog
channel 31
requested for
conversion
Enable VSSM 0 M
U AIN31
VDTS X
1
ADC1
Die VAREF1 0 M
Temp. U VAREF
Sensor VAREF_DTS X
DTS 1
VAGND1 0 M
VAGND_DTS
U VAGND
1
X
MCA05621
SCU_CON
GIN1S
GPTA0
2
IN1
P2.9 / IN1
MCA05622_mod
SCU
Control
1
M
RDSSn PTMEN U
PTMLC 0
X
ENOUTn
0
M
U
X
FPI Bus
1
1
M
Read U
X
PTDATn 1 Bit in 0
Pad
Register
PTDATn Logic for Pad Driver
Regular
Write Operation
PTDATn of
I/O Pad
MCA05623
read back. The ENOUTn bits determine whether or not the logic level state as defined
by the bits in the SCU_PTDATn register is output to the pad/pin.
SCU_PTCON
SCU Pad Test Control Register (F00000B0H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
PTM
0 0 0 0
EN
rh r rw rw rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EN EN EN EN
RD RD RD RD
OUT OUT OUT OUT PTMLC
SS3 SS2 SS1 SS0
3 2 1 0
rw rw rw rw rw rw rw rw w
SCU_PTDAT0
SCU Pad Test Data Register 0 (F00000B4H) Reset Value: XXXX XXXXH
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
MR RD
ADV RD BC3 BC2 BC1 BC0 A23 A22 A21 A20 A19 A18 A17 A16
W WR
rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh
Note: In pad test mode, the bits in SCU_PTDAT0 are output to the pad/pin in inverted
state: a 0 generates a high level and a 1 generates a low level at the pad/pin.
SCU_PTDAT1
SCU Pad Test Data Register 1 (F00000B8H) Reset Value: XXXX XXXXH
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
CS
WAI B HL HO HD TR BRK BRK
0 BAA COM CS3 CS2 CS1 CS0 NMI
T REQ DA LD RST CLK OUT IN
B
r rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rh rwh rwh rwh rwh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TR TR TR TR TR TR TR TR TR TR TR TR TR TR TR TR
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh
Note: In pad test mode, the bits in SCU_PTDAT1 are output to the pad/pin in inverted
state: a 0 generates a high level and a 1 generates a low level at the pad/pin.
SCU_PTDAT2
SCU Pad Test Data Register 2 (F00000BCH) Reset Value: XXXX 0XXXH
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
SLS SCL MR MT SLS SLS
0
I0 K0 ST0 SR0 O1 O0
rwh rwh rwh rwh rwh rwh rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TES BF BF
TST T BYP
0 TMO TMS TDO TDI TCK CLK CLK
RES RST ASS
DE O I
r rh rh rwh rwh rwh rwh rwh rwh rwh rwh
Note: In pad test mode, the bits in SCU_PTDAT2 are output to the pad/pin in inverted
state: a 0 generates a high level and a 1 generates a low level at the pad/pin.
SCU_PTDAT3
SCU Pad Test Data Register 3 (F00000C0H) Reset Value: XXXX XXXXH
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
D31 D30 D29 D28 D27 D26 D25 D24 D23 D22 D21 D20 D19 D18 D17 D16
rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh
Note: In pad test mode, the bits in SCU_PDAT3 are output to the pad/pin in inverted
state: a 0 generates a high level and a 1 generates a low level at the pad/pin.
Port4
0
P10.1 /
0
HWCFG1 1
1
1
Port8
Asynchronous Control
Port9
EMGSTOP
Signal
MSC1 MSC0
MCA05624
In synchronous mode (selected by MODE = 0), the HWCFG1 signal is sampled for a
inactive-to-active level transition, and an emergency stop flag EMSF is set if the
transition is detected. The setting of EMSF activates the EMGSTOP signal. An
emergency case can only be terminated by clearing EMSF via software. The
synchronous control logic is clocked by the system clock fSYS. This results in a small
delay between the HWCFG1 signal and EMGSTOP signal generation. If the system
clock is switched off (not applicable in TC1796), the synchronous mode control logic is
frozen and not able to react to transitions at input HWCFG1. In this case, the
asynchronous mode can be used to put GPTA outputs to dedicated logic levels.
In asynchronous mode (selected by MODE = 1), the occurrence of an active level at
input HWCFG1 immediately activates the EMGSTOP signal to the GPTA outputs and
the MSC modules even if the synchronous control part is inactive and not clocked by the
system clock fSYS. Of course, a valid-to-invalid transition of HWCFG1 (emergency case
is released) also immediately deactivates the EMGSTOP signal.
The POL bit determines the active level of the emergency stop input signal HWCFG1.
The MODE bit selects synchronous or asynchronous mode for emergency stop signal
generation. The EMSF flag can be enabled/disabled for setting (control bit ENON) and
it can be set or cleared by software, too (bit field EMSFM).
SCU_EMSR
SCU Emergency Stop Register (F0000044H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
EMS
0 EMSFM 0
F
r w r rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EN MO
0 POL
ON DE
r rw rw rw
SCU_CON
SCU Control Register (F0000050H) Reset Value: FF00 0002H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
SSC
SLS
ONE ZERO GIN1S 0
PDR
PDR
rw rw rw rw rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RPA LD DTS AN7 NMI EPU CS CS CS
0 0 FIEN
RAV EN ON TM EN D GEN OEN EEN
r rw rw rw r rw rws rw rw rw rw rw
SCU_STAT
SCU Status Register (F0000054H) Reset Value: 0000 E000H1)
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PAR
0 0 EEA 0 FII FVI FZI FUI FXI
AV
r rh r rh r rh rh rh rh rh
1) The initial value of SCU_STAT after Boot ROM exit is 0000 2000B.
SCU_ID
SCU Module Identification Register
(F0000008H) Reset Value: 002C C0XXH
31 16 15 8 7 0
r r r
MANID
Manufacturer Identification Register
(F0000070H) Reset Value: 0000 1820H
31 16 15 5 4 0
0 MANUF DEPT
r r r
CHIPID
Chip Identification Register
(F0000074H) Reset Value: 0000 8AXXH
31 16 15 8 7 0
0 CHID CHREV
r r r
The Redesign Tracing Register RTID provides a means of signalling minor redesigns
that are not reflected in the CHIPID.CHREV bit field.
RTID
Redesign Tracing Identification Register
(F0000078H) Reset Value: 0000 XXXXH
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RT RT RT RT RT RT RT RT RT RT RT RT RT RT RT RT
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
r r r r r r r r r r r r r r r r
Note: The RTID reset value for a major design step (without modifications) is 0000H.
RPB
Program Memory Data Memory
Unit Unit
LMI
6.1.1 Overview
The LMB is a synchronous and pipelined bus with variable block size transfer support.
The protocol supports 8-, 16-, 32-, and 64-bit single transactions and 2/4 wide 64-bit
block transfers.
The LMB has the following features:
• Optimized for high speed and high performance data transfers
• 32-bit address bus, 64-bit data bus
• Simple central arbitration per cycle
• Slave-controlled wait state insertion
• Address pipelining (max depth - 2)
• Support of atomic operations LDMST, ST.T and SWAP.W
• Block transfers with variable block length (two or four 64-bit data transactions)
Note: For the LMB default master, the one cycle gap does not result in a performance
loss because it is granted the LMB in this cycle as default master if no other master
requests the LMB for some other reasons.
Bus Cycle 1 2 3 4 5
Bus Cycle 1 2 3 4 5 6 7
For all the masters requesting an LMB (PLMB or DLMB) during any one cycle, the
master that is granted the LMB is the one with the highest priority.
DBCU_ID
DBCU Module Identification Register (08H) Reset Value: 000F C0XXH
PBCU_ID
PBCU Module Identification Register (08H) Reset Value: 000F C0XXH
31 16 15 8 7 0
r r r
DBCU_LEATT
DBCU LMB Error Attribute Register (20H) Reset Value: XXXX XXX0H
PBCU_LEATT
PBCU LMB Error Attribute Register (20H) Reset Value: XXXX XXX0H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
rh r rh rh rh rh r rh rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rh r rh r rwh
LEATT[31:4] contains valid read data only if its bit LEC bit is set.
DBCU_LEADDR
DBCU LMB Error Address Register (24H) Reset Value: XXXX XXXXH
PBCU_LEADDR
PBCU LMB Error Address Register (24H) Reset Value: XXXX XXXXH
31 0
LEADDR
rh
DBCU_LEDATL
DBCU LMB Error Data Low Register (28H) Reset Value: XXXX XXXXH
PBCU_LEDATL
PLMB LMB Error Data Low Register (28H) Reset Value: XXXX XXXXH
31 0
LEDAT[31:0]
rh
DBCU_LEDATH
DBCU LMB Error Data High Register (2CH) Reset Value: XXXX XXXXH
PBCU_LEDATH
PBCU LMB Error Data High Register (2CH) Reset Value: XXXX XXXXH
31 0
LEDAT[63:32]
rh
DBCU_SRC
DLMB Service Request Control Register(FCH) Reset Value: 0000 0000H
PBCU_SRC
PBCU Service Request Control Register(FCH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SET CLR
SRR SRE TOS 0 SRPN
R R
w w rh rw r r rw
Note: Further details on interrupt handling and processing are described in Chapter 14
of this TC1796 System Units (Vol. 1 of 2) User’s Manual.
Address Translation
Addresses of SPB transfers (initiated either by the PCP, DMA controller, or Cerberus)
via the LFI Bridge that address a DLMB or PLMB slave device are translated into a
DLMB address according Table 6-6.
The equivalent behavior occurs when an LMB master initiates a write to a SPB slave
device. In this case, SPB bus errors are detected by the SBCU but not at the LMB side.
Note that this behavior occurs only at write operations via the LFI Bridge. It also can be
triggered by an erroneous write cycle of a read-modify-write bus transaction.
LFI Register
LFI_ID
LFI Module Identification Register (08H) Reset Value: 000C C0XXH
31 16 15 8 7 0
r r r
LFI_CON
LFI Configuration Register (10H) Reset Value: 0000 0B02H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 FTAG 0 LTAG 0 1 0
r rh r rh r r rw
6.4.1 Overview
The FPI buses interconnect the on-chip peripheral units with the TC1796 processor
subsystem. Figure 6-6 gives an overview of the FPI Buses and the modules connected
to them.
The FPI Bus is designed to be quick to acquire by on-chip functional units, and quick to
transfer data. The low setup overhead of the FPI Bus access protocol guarantees fast
FPI Bus acquisition, which is required for time-critical applications.
The FPI Bus is designed to sustain high transfer rates. For example, a peak transfer rate
of up to 160 Mbyte/s can be achieved with the 32-bit data bus at 40 MHz bus clock.
Multiple data transfers per bus arbitration cycle allow the FPI Bus to operate at close to
its peak bandwidth.
Additional features of the FPI Bus include:
• Optimized for high speed and high performance
• Support of multiple bus masters
• 32-bit wide address and data buses
• 8-, 16-, and 32-bit data transfers
• 64-, 128-, and 256-bit block transfers
• Central simple per-cycle arbitration
• Slave-controlled wait state insertion
• Support of atomic operations LDMST, ST.T and SWAP.W
• Designed to minimize EMI and power consumption
The functional units of the TC1796 are connected to the FPI bus via FPI bus interfaces.
An FPI Bus interface act as bus agent, requesting bus transactions on behalf of their
functional unit, or responding to bus transaction requests.
There are two types of bus agents:
• FPI Bus master agents can initiate FPI Bus transactions and can also act as slaves.
• Slave agents can only react and respond to FPI Bus transaction requests in order to
read or write internal registers of slave modules as for example memories.
When an FPI Bus master attempts to initiate a transfer on the FPI Bus, it first signals a
request for bus ownership to the bus control unit. When bus ownership is granted by the
bus control unit, an FPI Bus read or write transaction is initiated. The unit targeted by the
transaction becomes the FPI Bus slave, and responds with the requested action.
Some functional units operate only as slaves, while others can operate as either masters
or slaves. In the TC1796, DMI and PMI (via the LFI Bridge), PCP, DMA, and Cerberus
operate as FPI Bus masters. On-chip peripheral units are typically FPI Bus slaves.
Figure 6-6 shows the two FPI Buses and the interface types of the various modules.
FPI Bus arbitration is performed by the Bus Control Unit (BCU) of the FPI Bus. In case
of bus errors, the BCU generates an interrupt request to the CPU and provides
debugging information about the actual bus error to the CPU.
In the TC1796, device external memory/peripheral accesses are handled via the EBU as
part of the PMU. Therefore, the FPI Buses are not required for such type of device
external transactions.
Data Local
Memory Bus TriCore CPU DMI
Slave
Slave
GPTA0 SBCU RBCU
Master/Slave
M/S
Slave
Slave
Slave
Slave
Slave
FPI Bus Interface
Slave
Slave
M/S
DMA Controller
Slave
Slave
Slave
Slave
Slave
Slave
M/S
M/S
M/S
ASC0 PCP2
Slave
ASC1 MEM
MLI0 MLI1
CHK
MCB05632_mod
The Bus Switch in the DMA controller operates as a bus bridge between the SPB and
RPB.
Single Transfers
Single transfers are byte, half-word, and word transactions that target any slave
connected either to SPB or RPB. Note that the LFI Bridge operates as an SPB master.
Block Transfers
Block transfers operate in principle in the same way as single transfers do, but one
address phase is followed by multiple data phases. Block transfers can be composed of
2 word, 4 word, or 8 word transfers.
Note: In general, block transfers (2 word, 4 word, or 8 word) cannot be executed in the
TC1796 with peripheral units that operate as FPI Bus slaves during an FPI Bus
transaction.
Block transfers are initiated by the following CPU instructions: LD.D, LD.DA, MOV.D,
ST.D and ST.DA. The BCOPY instruction of the PCP also initiates a block transfer
transaction on the FPI Bus.
Atomic Transfers
Atomic transfers are generated by LDMST, ST.T and SWAP.W instructions that require
two single transfers. The read and write transfer of an atomic transfer are always locked
and cannot be interrupted by another bus masters. Atomic transfers are also referenced
as read-modify-write transfers.
Note: See also Table 6-12 for available FPI Bus transfer types.
Bus Cycle 1 2 3 4 5
Bus Cycle 1 2 3 4 5 6 7
If there is no request from a SPB bus master, the SPB is granted to a default master
(PCP or LFI Bridge) which has been at last the default master.
• The Error Data Capture Registers (xBCU_EDAT) stores the 32-bit FPI Bus data bus
information that has been captured during the erroneous FPI Bus transaction.
• The Error Control Capture Register (xBCU_ECON) stores status information of the
bus error event.
If more than one FPI Bus transaction generates a bus error, only the first bus error is
captured. After a bus error has been captured, the capture mechanism must be released
again by software.
If a write transaction from TriCore causes an error on the SPB, the originating master is
not informed about this error as it is not an SPB master agent. With each bus error-
capture event, a service request is generated, and an interrupt can be generated if
enabled and configured in the corresponding service request register.
Each master on the FPI Bus is assigned a 4-bit identification number, the master TAG
number (see Table 6-11). This makes it possible to distinguish which master has
performed the current transaction.
Transactions on the FPI Bus are classified via a 4-bit operation code (see Table 6-12).
Note that split transactions (OPC = 1000B to 1110B) are not used in the TC1796.
xBCU_DBBOS xBCU_DBCNTL
ON ON ON ON x = “S“ for SBCU
RD WR SVM OPC x = “R“ for RBCU
BOS3 BOS2 BOS1 BOS0
4
=
1
RD ≥1
0 0
FPI Bus Signals
=
1
WR
0 0 Signal
=
Status
1 Trigger
SVM
0 0
Equal 1
4 Compare
OPC
0 0
MCA05637
SBCU_DBGRNT SBCU_DBCNTL
DMA DMA
CBL LFI PCP CBH ONG
L H
Cerberus is granted as
& ≥1
bus master, low priority
&
DMA is granted as bus
master, low priority
&
LFI Bridge is granted as
& Grant
bus master
Trigger
&
DMA is granted as bus
master, high priority
&
PCP is granted as bus
master
&
Cerberus is granted as
bus master, high priority
MCA05638
xBCU_DBCNTL
x = “S“ for SBCU
CONCOM2 CONCOM1 CONCOM0 x = “R“ for RBCU
MCA05639_mod
4. Writing SBCU_DBGRNT = FFFFFFD7H means that the grant trigger for the SPB
masters PCP and LFI Bridge is enabled.
5. Writing SBCU_DBBOS = 00001000H means that the signal status trigger is
generated on a write transfer and not on a read transfer.
SBCU_ID
SBCU Module Identification Register (08H) Reset Value: 0000 6AXXH
RBCU_ID
RBCU Module Identification Register (08H) Reset Value: 0000 6AXXH
31 16 15 8 7 0
0 MODNUM MODREV
r r r
The BCU Control Registers for SPB and RPB control the overall operation of the SBCU
and PBCU, including setting the starvation sample period, the bus time-out period,
enabling starvation-protection mode, and error handling.
SBCU_CON
SBCU Control Register (10H) Reset Value: 4009 FFFFH
RBCU_CON
RBCU Control Register (10H) Reset Value: 4009 FFFFH
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
rw r rw rw rw rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TOUT
rw
Note: The BCU error capture registers store only the parameters of the first error. In case
of multiple bus errors, an error counter BCU_ECON.ERRCNT shows the number
of bus errors since the first error occurred. A hardware reset clears this bit field to
zero, but the counter can be set to any value through software. This counter is
prevented from overflowing, so a value of 216 - 1 indicates that at least this many
errors have occurred, but there may have been more. After BCU_ECON has been
read, the BCU_ECON, BCU_EADD and BCU_EDAT registers are re-enabled to
trace FPI Bus error conditions.
SBCU_ECON
SBCU Error Control Capture Register (20H) Reset Value: 0000 0000H
RBCU_ECON
RBCU Error Control Capture Register (20H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
T
OPC TAG RDN WRN SVM ACK ABT RDY
OUT
rwh rwh rwh rwh rwh rwh rwh rwh rwh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ERRCNT
rwh
SBCU_EADD
SBCU Error Address Capture Register (24H) Reset Value: 0000 0000H
RBCU_EADD
RBCU Error Address Capture Register (24H) Reset Value: 0000 0000H
31 0
FPIADR
rwh
SBCU_EDAT
SBCU Error Data Capture Register (28H) Reset Value: 0000 0000H
RBCU_EDAT
RBCU Error Data Capture Register (28H) Reset Value: 0000 0000H
31 0
FPIDAT
rwh
SBCU_DBCNTL
SBCU Debug Control Register (30H) Reset Value: 0000 7003H
RBCU_DBCNTL
RBCU Debug Control Register (30H) Reset Value: 0000 7003H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
ON ON ON ON
BOS BOS BOS BOS 0 ONA2 0 ONA1 0 ONG
3 2 1 0
rw rw rw rw r rw r rw r rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CON CON CON
0 COM COM COM 0 RA 0 OA EO
2 1 0
r rw rw rw r w r r r
SBCU_DBGRNT
SBCU Debug Grant Mask Register (34H) Reset Value: 0000 FFFFH
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DMA DMA
1 CBL LFI PCP 1 CBH
L H
rw rw rw rw rw rw rw rw
RBCU_DBGRNT
RBCU Debug Grant Mask Register (34H) Reset Value: 0000 FFFFH
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DMA DMA
1 1 1
L H
rw rw rw rw rw
SBCU_DBADR1
SBCU Debug Address 1 Register (38H) Reset Value: 0000 0000H
RBCU_DBADR1
RBCU Debug Address 1 Register (38H) Reset Value: 0000 0000H
31 0
ADR1
rw
SBCU_DBADR2
SBCU Debug Address 2 Register (3CH) Reset Value: 0000 0000H
RBCU_DBADR2
RBCU Debug Address 2 Register (3CH) Reset Value: 0000 0000H
31 0
ADR2
rw
SBCU_DBBOS
SBCU Debug Bus Operation Signals Register
(40H) Reset Value: 0000 0000H
RBCU_DBBOS
RBCU Debug Bus Operation Signals Register
(40H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 RD 0 WR 0 SVM OPC
r rw r rw r rw rw
SBCU_DBGNTT
SBCU Debug Trapped Master Register
(44H) Reset Value: FFFF FFFFH
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
CH CH CH CH CH CH CH CH CH CH CH CH CH CH CH CH
NR NR NR NR NR NR NR NR NR NR NR NR NR NR NR NR
17 16 15 14 13 12 11 10 07 06 05 04 03 02 01 00
rh rh rh rh rh rh rh rh rh rh rh rh rh rh rh rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DMA DMA
1 CBL LFI PCP 1 CBH
L H
r rh rh rh rh rh r rh
RBCU_DBGNTT
RBCU Debug Trapped Master Register
(44H) Reset Value: FFFF FFFFH
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
CH CH CH CH CH CH CH CH CH CH CH CH CH CH CH CH
NR NR NR NR NR NR NR NR NR NR NR NR NR NR NR NR
17 16 15 14 13 12 11 10 07 06 05 04 03 02 01 00
rh rh rh rh rh rh rh rh rh rh rh rh rh rh rh rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DMA DMA
1 1 1
L H
r rh r rh r
SBCU_DBADRT
SBCU Debug Trapped Address Register
(48H) Reset Value: 0000 0000H
RBCU_DBADRT
RBCU Debug Trapped Address Register
(48H) Reset Value: 0000 0000H
31 0
FPIADR
SBCU_DBBOST
SBCU Debug Trapped Bus Operation Signals Register
(4CH) Reset Value: 0000 3180H
RBCU_DBBOST
RBCU Debug Trapped Bus Operation Signals Register
(4CH) Reset Value: 0000 3180H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
FPI
0
TAG
r rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FPI FPI
FPI FPI FPI FPI FPI FPI FPI FPI
0 T ABO
RD OPS RST WR RDY ACK SVM OPC
OUT RT
r rh rh rh rh rh rh rh rh rh rh
SBCU_SRC
SBCU Service Request Control Register
(FCH) Reset Value: 0000 0000H
RBCU_SRC
RBCU Service Request Control Register
(FCH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SET CLR
SRR SRE TOS 0 SRPN
R R
w w rh rw r r rw
Note: Further details on interrupt handling and processing are described in Chapter 14
of this TC1796 System Units (Vol. 1 of 2) User’s Manual.
To/From Program
Local Memory Bus
64
PLMB Interface
Slave
64
Flash Command
State Machine 2 Mbyte
Flash Interface (PLMB)
MCB05642
PFLASH
256 byte Page PP8191
…. Sector PS12 512 Kbyte
256 byte Page PP6144
The PFLASH array delivers 256-bit wide read data with one read access. In the TC1796,
these 256 bits are transferred to the CPU and PMI via the 64-bit wide Program Local
Memory Bus (PLMB) using single-cycle burst transfers with four 64-bit transfers. During
such a burst transfer, the next sequential 256-bit read data is prefetched from the
PFLASH. Therefore, except a delay of the first initial read data access, sequential burst
transfers are provided, supporting the highest possible instruction throughput from
PFLASH to the CPU with execution of two 32-bit instructions in one cycle. Also non-
cached instruction accesses are burst accesses with up to four double-word transfers.
Each PFLASH sector can be separately locked against erasing and reprogramming.
Write operations to a locked and protected sector are only possible only if the sector is
temporarily unlocked using a dedicated password check sequence. Additionally, also an
OTP (One Time Programmable) function can be selected for each sector. An OTP sector
is locked forever, and erasing and reprogramming is no longer possible.
Table 7-1 defines the sectors with their sector numbers, sector sizes, and address
ranges. The PFLASH contains thirteen sectors PS[12:0] with different sizes. Two
64 Kbyte physical sectors PPS[1:0] are defined for the PFLASH.
Note: The sectors PS[7:0] are also called “logical sectors”. These logical sectors have a
reduced endurance (50) compared to the physical sectors (1000). In order to
increase the endurance of a logical sector, its corresponding physical sector can
be erased and reprogrammed after every 50 erase/program cycles of the logical
sector.
DFLASH
For verify operations, the standard read can be combined with a margin check to find
problematic bits (a 0 is read instead of a programmed 1) in advance. The change of
margins is controlled via the margin registers (see Page 7-35).
When Page Mode is entered, the pointer to the page assembly buffer is set to its first
word location. Its base address has to point to the addressed Flash bank.
An active Page Mode is indicated when bit FSR.PFPAGE (for PFLASH) or
FSR.DFPAGE (for DFLASH) is set.
The Page Mode and the Read Mode are allowed in parallel at the same time and in the
same Flash memory bank. A new Enter Page Mode command during Page Mode aborts
the actual Page Mode, indicated by sequence error flag FSR.SQER set, and restarts a
new page operation. The selected assembly register remains unchanged (not cleared)
with a new Enter Page Mode command.
The Load Page Buffer command loads 32-bit words or 64-bit double-words into the
assembly buffer, starting from the lowest to the highest assembly buffer entry. Only one
type of the Load Page Buffer commands (either with 32-bit or 64-bit data width) is
allowed during one assembly buffer loading sequence. Mixing 64-bit and 32-bit write
data width within one assembly buffer filling sequence is not allowed.
The data width for the assembly buffer filling sequence is selected by using instruction(s)
with the corresponding data format. A single Load Page Buffer command consists of a
store instruction to a specific address. In case of 64-bit data width, the same address
A000 55F0H always has to be used. In case of 32-bit data width, alternating addresses
A000 55F0H and A000 55F4H must be used.
For loading of the 256-byte wide assembly buffer for PFLASH programming, thirty-two
Load Page commands with 64-bit data or sixty-four Load Page Buffer commands with
32-bit data must be issued. For loading of the 128-byte wide assembly buffer for
DFLASH programming, sixteen Load Page commands with 64-bit data or thirty-two Load
Page Buffer commands with 32-bit data must be issued.
The following example shows a Load Page Buffer command sequence for the DFLASH
bank 0 assembly buffer (128 bytes) with 32-bit data width:
Address bits [31:16] used in the command cycles of the Write Page command must be
the same as those used by the previous Enter Page Mode command. Otherwise, a
command sequence error is generated (bit FSR.SQER set) and the execution of the
command is aborted.
The Write Page command programs a specific Flash page with the complete content of
the assembly buffer. It also programs invalid data of assembler buffer locations that have
not been loaded by previous Load Page Buffer commands.
With the last cycle of the Write Page command, Page Mode is terminated and the
following status flags are updated:
• FSR.PFPAGE or FSR.DFPAGE is cleared, indicating that the related Flash is no
more in Page Mode.
• FSR.PROG is set, indicating that a programming operation is running.
• Either FSR.PBUSY or FSR.D0BUSY or FSR.D1BUSY is set, indicating that the
programming operation is running in PFLASH or in DFLASH bank 0 or in DFLASH
bank 1.
The page programming algorithm includes a programming quality check that identifies
and reprograms weak bits of a Flash page. If the reprogramming of weak bits is
unsuccessful, the verify error flag FSR.VER is set.
If read protection is activated or if write protection is enabled for the sector that contains
the page to be programmed, Page Mode is terminated, programming operation is not
started, and the protection error flag FSR.PROER is set. Write protection must be
disabled previously to a programming operation for a write-protected sector by issuing a
Disable Read Protection or/and Disable Write Protection command.
Only if protection is not installed (e.g. for the very first installation of protection),
read/write protection need not be disabled. After writing the correct protection
confirmation code in the respective user configuration page, the protection is installed
and becomes active after the next reset.
If a user configuration page needs to be reprogrammed (not possible for pages within
UCB2) and protection is installed (FSR.PROIN = 1), the protection must be temporarily
disabled, and afterwards the UCB must be erased by the Erase User Configuration Block
command. When no protection is installed (FSR.PROIN = 0), the user configuration
page can be programmed without any restriction.
If a Write User Configuration Page command is issued and the start address of the UCP
(cycle 4) belongs to a UCB that is read- or write-protected, the protection error flag
FSR.PROER is set and programming operation is not started.
With the last cycle of the Erase Sector command, Command Mode is entered and the
following status flags are updated:
• FSR.ERASE is set, indicating that a erase operation is running.
• Either FSR.PBUSY or FSR.D0BUSY or FSR.D1BUSY is set, indicating that an erase
operation is running in PFLASH or in DFLASH bank 0 or in DFLASH bank 1.
The start of sector erase operation is delayed if the Erase Sector command was issued
to one DFLASH bank while the other DFLASH bank is busy with a program operation.
Read accesses to a DFLASH bank that is currently not erased or programmed are
possible while the other DFLASH bank is erased or programmed. A read access to a
busy (erasing or programming) Flash bank is allowed but delayed until the
corresponding Flash bank is no longer busy. Note that in this case the read path (PLMB)
is completely locked. Therefore, reading from a Flash bank in erase or program state
should be avoided by first polling the busy flags in the FSR register.
If the Erase Sector operation is used to erase a physical sector of the program Flash
(PPS0 or PPS1), this operation is executed only if none of the four sectors within the
related physical sector is write-protected, and if no read protection is installed, or if Flash
protection is disabled.
If read protection and/or write protection for the sector to be erased is enabled, or if one
or more of the sectors within the physical sector to be erased is OTP-protected, the
protection error flag FSR.PROER is set, Command Mode is not entered, and the erase
operation is not started.
With the last cycle of the Erase User Configuration command, Command Mode is
entered and the following status flags are updated:
• FSR.ERASE is set, indicating that a erase operation is running.
• FSR.PBUSY is set, indicating that the erase operation is running in the UCB.
This command can only be executed after read protection and/or sector write protection
has been disabled. If protection is not disabled when the Erase User Configuration Block
command is received, the protection error flag FSR.PROER is set, the Command Mode
is not entered, and the erase operation is not started.
After a Erase User Configuration Block command, a new protection configuration
(including keywords and protection confirmation code) can be written to the pages of the
user configuration block. But note that the user configuration blocks UCB0 and UCB1
can only be modified up to 4 times during the lifetime of a TC1796 device. UCB2 can be
programmed only once.
Note: UCB2 is OneTime-Programmable (OTP). If sector write protection is installed and
confirmed in UCB2, this block can never be erased again. UCB2 can only be
erased before the confirmation of OTP write protection.
The protection configuration bits that are located in the first two bytes of the UCBs
determine the requested protection configuration as it is defined for bits [15:0] of the
Flash Protection Configuration registers PROCON0, PROCON1, and PROCON2. When
a read/write protection has been installed for an user configuration block, the content of
its first two bytes is copied into the corresponding Flash Protection Configuration
register.
the UCB is still not valid but it is already configured. After issuing a Disable Read
Protection or Disable Write Protection command (depending on the configured
protection type) with the expected passwords, the status flag FSR.PROER indicates,
whether password checking was ok or not.
If PROER = 0 after the Disable Read Protection or Disable Write Protection
command, the password check was ok, meaning that the keywords in the UCB are
identical with the passwords that have been transmitted with the command. Now the
32-bit confirmation code word must be still programmed into the third page of the
UCB by the Write User Configuration Page command. Unused bytes of the third page
of the UCB should be programmed with 00H. After that operation, the selected
protection is defined to be “installed”.
If PROER = 1 after the Disable Read Protection or Disable Write Protection
command, the password check was negative. In this case (and if the correct
passwords are not known), the related UCB has to be erased again and the UCB
setup must be repeated as described under point 1.
3. Activation of an Installed Protection
When a read or write protection has been installed, it can only be activated by
executing any reset operation. After this reset operation, an installed protection
becomes “active”.
With a reset operation, the FCON register bits DCF and DDF are set. When starting code
execution from internal PFLASH, these flags become cleared by the Boot ROM program
before Boot ROM exit. This means that code execution from PFLASH and data read
accesses from PFLASH or DFLASH is generally allowed. The program code, which
executes the data read accesses from Flash, can be located in any program memory.
When starting from internal or external program RAM (case 2 and 3), flags DCF and DDF
remain set at Boot ROM exit. This means, that code execution from PFLASH and data
read access from PFLASH or DFLASH is disabled. In this case, code or data accesses
from PFLASH or DFLASH are only possible while read protection is temporarily disabled
by the password protected Disable Read Protection command (FCON.RPA is cleared).
In this disable state, it is also possible to clear the DCF/DDF flags of register FCON.
Flash data accesses from dedicated bus masters others than the CPU/DMI can be
disabled separately with FCON register bits DDFDBG, DDFDMA, and DDFPCP of
register FCON. When such a bit is set, the corresponding bus master (Debug system,
DMA controller, or PCP) is not allowed to access PFLASH or DFLASH memory. When
these bits are set once, they can only be cleared again when read protection is not
selected at all (inactive), or temporarily disabled.
Note: The debug interface is disabled after Boot ROM exit with read protection.
FSR FCON
End-of-Busy
PBUSY Conditions EOBM
FSR
Edge
D0BUSY
Detection
FSR
D1BUSY FSR FCON
SQER PROER SQERM PROERM
Set Set
Command Sequence
Error
Protection
Error ≥1
FSR FCON
DFSBER PFSBER DFSBERM PFSBERM
Set Set
DFLASH Single Bit FLASH
Error Interrupt
PFLASH Single Bit
Error
FSR FCON
DFDBER PFDBER DFDBERM PFDBERM
Set Set
DFLASH Double Bit
Error
PFLASH Double Bit
Error
MCA05646
program but controlled by the Boot ROM startup procedure that is executed after each
reset operation.
1) The Flash register short names are also referenced in other parts of this chapter without the module prefix
name “FLASH_”.
2) This register is located in the address range for the DMA controller.
FLASH_ID
FLASH Module Identification Register(1008H) Reset Value: 0031 C0XXH
31 16 15 8 7 0
r r r
The PMU Module Identification Register ID contains read-only information about the
PMU module version.
PMU_ID
PMU Module Identification Register
(08H) Reset Value: 002E C0XXH
31 16 15 8 7 0
r r r
FLASH_FSR
Flash Status Register (1010H) Reset Value: 0XXX X0X0H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
W W W W W R R
PRO
VER 0 SLM 0 PRO PRO 0 PRO PRO PRO 0 PRO PRO 0
IN
DIS1 DIS0 IN2 IN1 IN0 DIS IN
rh r rh r rh rh r rh rh rh r rh rh r rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DF PF DF PF DF PF DF PF D1 D0 FA P
PRO SQ ERA PR
DB DB SB SB OP OP PA PA BU BU BU BU
ER ER SE OG
ER ER ER ER ER ER GE GE SY SY SY SY
rh rh rh rh rh rh rh rh rh rh rh rh rh rh rh rh
FLASH_MARP
Flash Margin Control Register PFLASH
(1018H) Reset Value: 0000 8000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TR
MARGIN MARGIN
AP 0
1 0
DIS
rw r rw rw
FLASH_MARD
Flash Margin Control Register DFLASH
(101CH) Reset Value: 0000 8000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TR
BNK MARGIN MARGIN
AP 0
SEL 1 0
DIS
rw r rw rw rw
FLASH_FCON
Flash Configuration Register (1014H) Reset Value: 000X 0636H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
DF PF DF PF
EOB PRO SQ DDF DDF DDF
DB DB SB SB 0 DDF DCF RPA
M ERM ERM PCP DMA DBG
ERM ERM ERM ERM
rw rw rw rw rw rw rw r rw rw rw rwh rwh rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
WS WS
SL ESL WS WS WS
0 EC 0 EC
EEP DIS DFLASH WLHIT PFLASH
DF PF
rw rw r rw rw r rw rw rw
FLASH_PROCON0
Flash Protection Configuration Register User 0
(1020H) Reset Value: 0000 XXXXH
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R
0 S12L S11L S10L S9L S8L S7L S6L S5L S4L S3L S2L S1L S0L
PRO
rh r rh rh rh rh rh rh rh rh rh rh rh rh rh
FLASH_PROCON1
Flash Protection Configuration Register User 1
(1024H) Reset Value: 0000 XXXXH
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 S12L S11L S10L S9L S8L S7L S6L S5L S4L S3L S2L S1L S0L
r rh rh rh rh rh rh rh rh rh rh rh rh rh
FLASH_PROCON2
Flash Protection Configuration Register User 2
(1028H) Reset Value: 0000 XXXXH
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 S12L S11L S10L S9L S8L S7L S6L S5L S4L S3L S2L S1L S0L
r rh rh rh rh rh rh rh rh rh rh rh rh rh
64
DLMB Interface
Slave Master
Parity
DMU Control/Check
64
Overlay Address
Generation &
Control
SRAM VDDRAM
PLMB (LMI) Interface
64 KB
Slave
To
Program 64
DMU
Local
Control
Master
Memory 64
Bus
SBRAM VDDSBRAM
16 KB
VDD
8.2 SBRAM
The 16 Kbyte SBRAM provides stand-by functionality. It is connected to a separate
power supply pin VDDSBRAM. This power supply pin provides the power for normal
operation of SBRAM, and during power-off state of the TC1796. If VDDSBRAM does not
drop below a specified voltage level in power-down mode (specified in Data Sheet), the
SBRAM will remain its memory content. The switch between regular supply voltage and
power-down mode supply voltage must be done externally.
In order to maintain the memory contents when switching into power-down mode and
coming back from power-down mode, the SBRAM must be locked. This SBRAM lock
mechanism is controlled by the Stand-by SRAM Control Register SBRCTR. When
writing a dedicated pattern into bit fields STBULK and STBSLK, the SBRAM will be
locked. A status flag STBLOCK indicates whether the SBRAM is locked or not. To unlock
the SBRAM, register SBRCTR must be written by three consecutive write operations (for
a detailed description see Page 8-12.
).
If an access to the SBRAM is performed while the SBRAM is locked, an error
acknowledge will be issued as response to the access.
8.3 SRAM
64 Kbyte of fast SRAM are available in the DMU. Besides being used for normal data
storage, this memory can be used to shadow the active portions of the Data Flash and
as overlay RAM for calibration/instrumentation support.
The SRAM can operate as fast mirror memory during Data Flash EEPROM emulation.
In this application, a copy of the active DFLASH region (typically 16 Kbyte) is stored in
the SRAM memory and can be accessed (read/written) very fast. More details about
Data Flash EEPROM emulation are described on Page 7-26.
The SRAM also provides an overlay functionality. During calibration operations, SRAM
memory can be the target of redirected data accesses from internal or external code
memories. The redirection process is described in the following section.
Internal or External
Code Memory DMU Memory
Block Size
(OMASKx)
Overlay
Memory Block x Base Address
(RABRx)
Overlay Target
Target Code Memory
Address
(OTARx)
Redirect
Figure 8-2 Redirection of Data Read Accesses from Code Memory to Internal
Data Memory
In the TC1796, the complete 64 Kbyte SRAM of the DMU can be used as overlay
memory. Sixteen overlay memory blocks within the SRAM with programmable base
address and block sizes are supported, and can be individually enabled for overlay
functionality. The block size of each overlay memory block can be in the range of 2 bytes
up to 512 bytes.
Attention: In the TC1796ED emulation device, it is possible in addition to redirect
code memory data accesses to the emulation memory of the
TC1796ED.
There are four overlay RAM control registers (DMU_IOCRn, n = 0-3) assigned to control
the internal overlay functionality. Each register specifies the start address of an
overlayed 2 Kbyte block within the lower 128 Mbytes of segment 10 and 11. This start
address can be placed on any 2 Kbyte boundary within the external code memory, using
bit field OVPTR.
The principal operation of the address translation process is shown in Figure 8-3.
Target Address
4 Bits 28 Bits
Seg Offset
OMASKx
0000 11111 …..111111111 0000 0
Programmable
no match match
Compare
OTARx
TBASE 0
RABRx
OBASE 0
The size of the overlay memory blocks can be 2n times the minimal block size (2 byte or
1 Kbyte). The start address of the block can be a integer multiple of the programmed
block size (natural page boundary).
If the overlay block is enabled and the segment address is 8H or AH, the segment offset
of the target address is compared with the target block address of the overlay target
address. This bit-wise comparison is qualified by the content of the mask, ignoring the
address bits that form the offset into the overlayed block.
If there is no match, the original target address is taken to perform the access.
If there is a match:
• The most significant part of the segment offset, that addresses memory sizes beyond
the maximum overlay memory size (64 Kbyte for DMU, 1024 Kbyte for TC1796ED
emulation memory), is set to predefined values according to the address map (fixed
bits in registers RABRx).
• The part of the target block address, that corresponds to the overlay block base
address and is masked, is replaced by the respective overlay block base address bits
(bits OBASE in RABRx, where the corresponding mask bits OMASK in registers
OMASKx are set to “1”).
• The address is completed by the original offset into the block; the number of bits used
are determined by the bits set to “0” in the mask OMASK.
Write Accesses
Write accesses are performed with zero wait states.
If no overlay is enabled, the accesses to the DMU memories take one cycle (1 wait
state). If a pipelined read follows immediately a write, the read will be delayed by an
additional wait state.
If an overlay is enabled, the access to the DMU overlay memory block may be prolonged
by one cycle.
The access to the Emulation Memory will not be more than 10 cycles. Details can be
found in TC1796ED specific documents.
Read Transactions
When the first read access to cachable memory areas is done, the LMI initiates a 2-beat
burst access on PLMB, requesting 128 bit of data. The start address for the burst is
generated by setting the last 4 bits of the address to 0.
Cachable memory regions for data accesses are:
Segment 8: 8000 0000H - 8FFF FFFFH
In all other memory regions mapped via the LMI, normal non-burst accesses of the
requested data size are initiated and the read data are not stored in the read buffer. The
read data cache buffer content remains unmodified.
For subsequent accesses into cachable memory regions, it is checked, whether the data
is completely contained in the buffer:
• If this is true, the data is extracted out of the buffer without initiating an access to the
PLMB.
• If the data is not contained in the buffer, a new 2-beat burst access is performed to
the PLMB as previously described, and the read data is stored in the buffer.
The requested data can only be extracted after all 128 bits have been read; thus a
cached access will take 1 cycle longer than non-cached access. As the cachable
memory regions are also visible in non-cachable areas (see address map), the user can
map the data dependent on his application to optimize between additional latency and
subsequent fast accesses for data with high locality, and un-cached faster accesses for
data with low locality.
Write Transactions
When a write transaction hits into the read buffer, the buffer content is invalidated. This
feature also can be used to flush the buffer contents.
Read-Modify-Write Transactions
Read-modify-write transaction always will be forwarded to the PLMB. They will not effect
the buffer content at all (no caching, no invalidation). This implies that read-modify-write
operations should be done to non-cached areas only.
The Module Identification Register ID contains read-only information about the DMU
module version.
ID
Module Identification Register (08H) Reset Value: 002D C0XXH
31 16 15 8 7 0
r r r
The Stand-by SRAM Control Register SBRCTR controls the locking and unlocking of the
DMU stand-by memory (SBRAM).
SBRCTR
Stand-by SRAM Control Register (E0H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
STB
0 STBSLK STBULK LOC
K
r w w rh
For each of the 16 overlay sections (indicated by index x), three registers control the
overlay operation:
• The Redirected Address Base Register RABRx, which holds the base address of the
overlay memory block in the overlay memory, and some control bits
• The Overlay Target Address Register OTARx, which holds the base address of the
memory block being overlayed
• The Overlay Mask Register OMASKx, which determines which bits are part of the
offset address and which bits are part of the base address
RABRx (x = 0-15)
Redirected Address Base Register x
(20H+x*CH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
OV IEMS
RC1 RC0 0
EN = 0
rw r r r r
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
OBASE 0
rw r
OTARx (x = 0-15)
Overlay Target Address Register x
(20H+x*CH+4H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
TSEG TBASE
rw rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TBASE 0
rw r
The Overlay Mask Register x determines the size of the overlay memory block x. It also
determines which address bits will participate in the address compare for a block base
address and which bits are used from the original target address and which bits are taken
from RABRx.OBASE.
OMASKx (x = 0-15)
Overlay Mask Register x (20H+x*CH+8H) Reset Value: 0FFF FE00H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0 1
r r
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
1 OMASK 0
r rw r
9 Memory Maps
This chapter gives an overview of the TC1796 memory map, and describes the address
locations and access possibilities for the units, memories, and reserved areas as “seen”
from the three different on-chip buses’ points of view.
The TC1796 has the following memories:
• Data Memory Unit (DMU) with
– 64 Kbyte of Data Memory (SRAM)
– 16 Kbyte of Stand-by Data Memory (SBRAM)
• Program Memory Unit (PMU) with
– 2 Mbyte of Program Flash Memory (PFLASH)
– 128 Kbyte of Data Flash Memory (DFLASH)
– 8 Kbyte of Boot ROM (BROM)
– 8 Kbyte of Test ROM (TROM)
• Program Memory Interface (PMI)
– 48 Kbyte of Scratch-Pad RAM (SPRAM)
– 16 Kbyte of Instruction Cache (ICACHE)
• Data Memory Interface (DMI)
– 56 Kbyte of Local Data RAM (LDRAM)
– 8 Kbyte of Dual-Port RAM (DPRAM)
• PCP memory
– 32 Kbyte of PCP Code Memory (CMEM)
– 16 Kbyte of PCP Data Memory (PRAM)
Furthermore, the TC1796 has four on-chip buses:
• System Peripheral Bus (SPB)
• Remote Peripheral Bus (RPB)
• Program Local Memory Bus (PLMB)
• Data Local Memory Bus (DLMB)
The DLMB address map shows the system addresses from the point of view of the
DLMB master (DMI).
Table 9-1 defines the acronyms and other terms that are used in the address maps
(Table 9-2 to Table 9-5).
Segments 0-7
These segments are reserved segments in the TC1796.
Segment 8
From the SPB point of view (PCP, DMA, and Cerberus), this memory segment allows
accesses to all PMU memories (PFLASH, DFLASH, BROM, and TROM) and the
external EBU space.
From the CPU point of view (PMI and DMI), this memory segment allows cached
accesses to all PMU memories (PFLASH, DFLASH, BROM, and TROM) and the
external EBU space.
Segment 9
This memory segment is reserved in the TC1796.
Segment 10
From the SPB point of view (PCP, DMA, and Cerberus), this memory segment allows
accesses to all PMU memories (PFLASH, DFLASH, BROM, and TROM) and the
external EBU space.
From the CPU point of view (PMI and DMI), this memory segment allows non-cached
accesses to all PMU memories (PFLASH, DFLASH, BROM, and TROM) and the
external EBU space.
Segment 11
This memory segment is reserved in the TC1796 (comparable to segment 9).
Segment 12
From the SPB point of view (PCP, DMA, and Cerberus), this memory segment is
reserved in the TC1796.
From the PLMB point of view (PMI), this memory segment is reserved in the TC1796.
From the DLMB point of view (DMI), this memory segment allows cached accesses to
all DMU memories (SRAM and SBRAM).
Segment 13
From the SPB point of view (PCP, DMA, and Cerberus), this memory segment allows
accesses to the external peripheral and emulator space.
From the PLMB point of view (PMI), this memory segment allows non-cached accesses
to the external peripheral and emulator space, the PMI scratch-pad RAM and read
access to the boot ROM and test ROM (BROM and TROM).
From the DLMB point of view (DMI), this memory segment allows non-cached accesses
to the external peripheral and emulator space and to the DMI memories (LDRAM and
DPRAM).
Segment 14
From the SPB point of view (PCP, DMA, and Cerberus), this memory segment allows
accesses to the external peripheral space, the PMU data memory (SRAM), the DMI
memories (LDRAM and DPRAM), and the PMI scratch-pad memory (SPRAM).
From the CPU point of view (PMI and DMI), this memory segment allows non-cached
accesses to the external peripheral space.
Segment 15
From the SPB point of view (PCP, DMA, and Cerberus), this memory segment allows
accesses to all SFRs and CSFRs, the PCP memories, and the MLI transfer windows.
From the CPU point of view (PMI and DMI), this memory segment allows accesses to all
SFRs and CSFRs, the PCP memories, and the MLI transfer windows.
9.3.1 Segments 0 to 14
Table 9-2 shows the address map of segments 0 to 14 as it is seen from the SPB and
RPB bus masters PCP, DMA, and OCDS.
9.3.2 Segment 15
Table 9-3 shows the address map of segment 15 as seen from the SPB and RPB bus
masters PCP, DMA, and OCDS. Please note that access in Table 9-3 means only that
an access to an address within the defined address range is not automatically incorrect
or ignored. If an access is really addressing a correct address, it can be found in the
detailed tables in Chapter 18.
32 16
Data Bus D[31:0] Port 0 None
Address Bus 24 16
Port 1 MLI0 / SCU
A[23:0]
20 14 SSC0 / SSC1 /
Control / Clock Port 2 GPTA
16
Port 3 GPTA
16
Port 4 GPTA
8 ASC0 / ASC1 /
Dedicated I/O Lines TC1796 Port 5 MSC0 / MSC1 / MLI0
6 12 SSC0 / SSC1 /
SSC0 Port 6 MSC0 / MSC1 / CAN
MSC0 / MSC1 8 8
Port 7 ADC0 / ADC1
LVDS Outputs
8
Port 8 MLI1 / GPTA
9 MSC0 / MSC1 /
Port 9
GPTA
4
Port 10 HWCFG
MCA05652
Pn_PDRx
Pad Driver
Mode Registers
Pn_IOCR
Input/Output
Control Register
Pn_OMR Pull-up
Output Pull-down
Modification Reg. Control
Pn_OUT
Data Output
Register
Pull
Devices
Pn_ESR
System Peripheral Bus (SPB)
EMSTOP
MUX
Only available for GPTA lines Select
Output
ALT1 Driver Pin
ALT2
ALT3
TC[1:0]
Schmitt
Trigger
Pn_IN
Data Input
Register
Pad Control Logic
AltDataIn
MCA05653
Each port line has a number of control and data bits, enabling very flexible usage of the
line. Each port pin (except Port 10) can be configured for input or output operation. In
input mode (default after reset), the output driver is switched off (high-impedance). The
actual voltage level present at the port pin is translated into a logical 0 or 1 via a Schmitt-
Trigger device and can be read via the read-only register Pn_IN. An input signal can also
be connected directly to the various inputs of the peripheral units (AltDataIn). The
function of the input line from the pin to the input register Pn_IN and to AltDataIn is
independent of whether the port pin operates as input or output. This means that when
the port is in output mode, the level of the pin can be read by software via Pn_IN or a
peripheral can use the pin level as an input.
In output mode, the output driver is activated and drives the value supplied through the
multiplexer to the port pin. Switching between input and output mode is accomplished
through the Pn_IOCR register, which enables or disables the output driver. If a
peripheral unit uses a GPIO port line as a bi-directional I/O line, register Pn_IOCR has
to be written for input or output selection. The Pn_IOCR register further controls the
driver type of the output driver, and determines whether an internal weak pull-up or pull-
down device is alternatively connected to the pin when used as an input. This offers
additional advantages in an application.
The output multiplexer in front of the output driver selects the signal source for the GPIO
line when used as output. If the pin is used as general-purpose output, the multiplexer is
switched by software (Pn_IOCR register) to the Output Data Register Pn_OUT. Software
can set or clear the bit in Pn_OUT, and therefore it can directly influence the state of the
port pin. If the on-chip peripheral units use the pin for output signals, the alternate output
lines ALT1 to ALT3 can be switched via the multiplexer to the output driver. The data
written into the output register Pn_OUT by software can be used as input data to an on-
chip peripheral. This enables, for example, peripheral tests via software without external
circuitry.
When selected as general-purpose output line, the logic state of each port pin can be
changed individually by programming the pin-related bits in the Output Modification
Register Pn_OMR. The bits in Pn_OMR make it possible to set, clear, toggle, or leave
the bits in the Pn_OUT register unchanged.
When selected as general-purpose output line, the actual logic level at the pin can be
examined through reading latch Pn_IN and compared against the applied output level
(either applied through software via the output register Pn_OUT, or via an alternate
output function of a peripheral unit). This can be used to detect some electrical failures
at the pin caused through external circuitry. In addition, software-supported arbitration
schemes can be implemented in this way using the open-drain configuration and an
external wired-And circuitry. Collisions on the external communication lines can be
detected when a high level (1) is output, but a low level (0) is seen when reading the pin
value via the input register Pn_IN.
The temperature compensation feature for pad output drivers (two inputs lines TC[1:0])
makes it possible to control the output driver characteristics automatically within
operating temperature range. The temperature compensation can be controlled for two
separate groups: for all high speed (class A2) outputs at GPIO ports and all EBU output
lines.
All GPIO lines of the TC1796 that are used by the GPTA modules (GPTA0, GPTA1,
LTCA2) have an emergency stop logic. This logic makes it possible to individually
disconnect GPTA outputs from the driving GPTA module outputs and to put them onto
a well defined logic state in an emergency case. In en emergency case, the content of
the port output register Pn_OUT is driven at the output pin instead of the GPTA module
output. The Emergency Stop Register Pn_EMR determines whether a GPTA output is
enabled or disabled in an emergency case.
Pn_IOCR0 Pn_OUT
Pn_IOCR1 Pn_IN
Pn_IOCR2
Pn_IOCR3
Pn_PDR
Pn_OMR
Pn_ESR
MCA05654
Pn_IOCR0
Port n Input/Output Control Register 0
(10H) Reset Value: 2020 2020H
31 28 27 24 23 20 19 16 15 12 11 8 7 4 3 0
rw r rw r rw r rw r
Pn_IOCR4
Port n Input/Output Control Register 4
(14H) Reset Value: 2020 2020H
31 28 27 24 23 20 19 16 15 12 11 8 7 4 3 0
rw r rw r rw r rw r
Pn_IOCR8
Port n Input/Output Control Register 8
(18H) Reset Value: 2020 2020H
31 28 27 24 23 20 19 16 15 12 11 8 7 4 3 0
rw r rw r rw r rw r
Pn_IOCR12
Port n Input/Output Control Register 12
(1CH) Reset Value: 2020 2020H
31 28 27 24 23 20 19 16 15 12 11 8 7 4 3 0
rw r rw r rw r rw r
Depending on the GPIO port functionality (number of GPIO lines of a port), not all of the
port input/output control registers are implemented.
The structure with one control bit field for each port pin located in different register bytes
offers the possibility to configure the port pin functionality of a single pin with byte-
oriented accesses without accessing the other PCx bit fields.
Overview
The pad structure of the TC1796 GPIO lines offers the possibility to select the output
driver strength and the slew rate. These two parameters are controlled by the bit fields
in the pad driver mode register Pn_PDR, independently from input/output and pull-
up/pull-down control functionality as programmed in the Pn_IOCR register. One
Pn_PDR register is assigned to each port.
The GPIO port lines consist of by two classes of pads:
• Class A1 pins (low speed 3.3V LVTTL outputs)
• Class A2 pins (high speed 3.3V LVTTL outputs. e.g. for serial outputs)
The assignment of each port pin to one of these pad classes is shown in the port
configuration figures (Figure 10-4 to Figure 10-13). Further details about pad driver
classes that are available in the TC1796 are summarized in Table 1-5 on Page 1-57.
Depending on the assigned pad class, the 3-bit wide pad driver mode selection bit fields
PDx in the pad driver mode registers Pn_PDR make it possible to select the port line
functionality as shown in Table 10-4. Note that the pad driver mode registers are specific
for each port. Therefore, the Pn_PDR layout is described for each port in the port-
specific sections.
Class A1 pins make it possible to select between medium and weak output drivers. Class
A2 pins make it possible to select between strong/medium/weak output drivers. In the
case of strong driver type, the signal transition edge can be additionally selected as
sharp/medium/soft.
Note: Please refer to the TC1796 Data Sheet for detailed DC characteristics of class A1
and class A2 pads.
In addition to the pad driver mode register control selections, a temperature
compensation logic, which is a part of the system control unit (SCU), makes it possible
to adjust the edges of the high-speed class A2 GPIO output lines depending on the die
temperature. The temperature compensation logic affects all class A2 GPIO output lines
that are used simultaneously as output.
The fully programmable temperature compensation logic provides four types of output
driver levels:
• Maximum level (low temperature)
• High level
• Low level
• Minimum level (high temperature)
Further details of the temperature compensation logic are described in Section 5.6 on
Page 5-41 (SCU) of this User’s Manual.
Pad Driver Mode Register Example: Port 0 Pad Driver Mode Register
P0_PDR
Port 0 Pad Driver Mode Register (40H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 PD1 0 PD0
r rw r rw
Further details of the temperature compensation logic are described in Section 5.6 on
Page 5-41 (SCU) of this User’s Manual.
Pn_OUT
Port n Output Register (00H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh
Note: Only Port 0, 1, 3, and 4 are 16-bit wide ports. The Pn_OUT registers of the other
ports have a reduced number of Px bits (see Pn_OUT register descriptions in the
corresponding port sections).
Pn_OMR
Port n Output Modification Register (04H) Reset Value: 0000 XXXXH
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
PR PR PR PR PR PR PR PR PR PR PR PR PR PR PR PR
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
w w w w w w w w w w w w w w w w
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PS PS PS PS PS PS PS PS PS PS PS PS PS PS PS PS
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
w w w w w w w w w w w w w w w w
Note: Register Pn_OMR is virtual and does not contain any flip-flop. A read action
delivers the value of the corresponding port input register Pn_IN. Therefore, reset
values of Pn_OMR and Pn_IN registers are also identical.
The Pn_OMR registers should always be written using word accesses.
Pn_ESR
Port n Emergency Stop Register (50H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EN EN EN EN EN EN EN EN EN EN EN EN EN EN EN EN
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw
Note: Only Port 3 and 4 are 16-bit wide ports used by the GPTA modules. The Pn_ESR
registers of the other ports have a reduced number of bits (see Pn_ESR register
descriptions in the corresponding port sections).
Pn_IN
Port n Input Register (24H) Reset Value: 0000 XXXXH
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rh rh rh rh rh rh rh rh rh rh rh rh rh rh rh rh
Note: Only Port 0, 1, 3, and 4 are 16-bit wide ports. The Pn_IN registers of the other
ports have a reduced number of Px bits (see Pn_IN register descriptions in the
corresponding port sections).
10.3 Port 0
This section describes the Port 0 functionality in detail.
MCA05655
Note: The complete address map of Port 0 is described in Table 18-9 on Page 18-22 of
this TC1796 System Units (Vol. 1 of 2) User’s Manual.
P0_PDR
Port 0 Pad Driver Mode Register (40H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 PD1 0 PD0
r rw rw
SCU_SCLIR
SCU Software Configuration Latched Inputs Register
(F0000038H) Reset Value: 0000 XXXXH
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SWO SWO SWO SWO SWO SWO SWO SWO SWO SWO SWO SWO SWO SWO SWO SWO
PT15 PT14 PT13 PT12 PT11 PT10 PT9 PT8 PT7 PT6 PT5 PT4 PT3 PT2 PT1 PT0
rh rh rh rh rh rh rh rh rh rh rh rh rh rh rh rh
Note: The reset value (bits “X”) of the register SCU_SCLIR is defined by the circuitry
connected to Port 0 at the rising edge of HDRST. Port 0 lines are set to inputs with
pull-up devices connected (reset values of port input/output control registers).
10.4 Port 1
This section describes the Port 1 functionality in detail.
CAN
TTCAN
P1.8P6.8
Control A1 P1.8 / RCLK0A
MCA05656
Note: The complete address map of Port 1 is described in Table 18-10 on Page 18-23
of this TC1796 System Units (Vol. 1 of 2) User’s Manual.
P1_PDR
Port 1 Pad Driver Mode Register (40H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0 PDSYSCLK 0 PDMLI0
r rw r rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 PD1 0 PD0
r rw r rw
10.5 Port 2
This section describes the Port 2 functionality in detail.
P2.2
Slave Select Outputs
A2 P2.2 / SLSO2
Control
SSC0 P2.3
A2 P2.3 / SLSO3
Control
P2.4
A2 P2.4 / SLSO4
Control
P2.5
A2 P2.5 / SLSO5
Slave Select Outputs
Control
P2.6
SSC1 A2 P2.6 / SLSO6
Control
P2.7
A2 P2.7 / SLSO7
Control
P2.8
Control A1 P2.8 / IN0 / OUT0
P2.9
Control A1 P2.9 / IN1 / OUT1
GPTA0
P2.10
Control A1 P2.10 / IN2 / OUT2
P2.11
Control A1 P2.11 / IN3 / OUT3
GPTA1
P2.12
Control A1 P2.12 / IN4 / OUT4
P2.13
Control A1 P2.13 / IN5 / OUT5
P2.14
Control A1 P2.14 / IN6 / OUT6
LTCA2 P2.15
Control A1 P2.15 / IN7 / OUT7
MCA05657
Note: The complete address map of Port 2 is described in Table 18-11 on Page 18-24
of this TC1796 System Units (Vol. 1 of 2) User’s Manual.
P2_IOCR0
Port 2 Input/Output Control Register 0
(10H) Reset Value: 2020 2020H
31 28 27 24 23 20 19 16 15 12 11 8 7 4 3 0
rw r rw r rw r rw r
P2_PDR
Port 2 Pad Driver Mode Register (40H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0 PDSLS1 0 PDSLS0
r rw r rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 PD1 0
r rw r
10.6 Port 3
This section describes the Port 3 functionality in detail.
P3.0
Control A1 P3.0 / IN8 / OUT8
P3.1
Control A1 P3.1 / IN9 / OUT9
P3.2
Control A1 P3.2 / IN10 / OUT10
P3.3
Control A1 P3.3 / IN11 / OUT11
GPTA0
P3.4
Control A1 P3.4 / IN12 / OUT12
P3.5
Control A1 P3.5 / IN13 / OUT13
P3.6
Control A1 P3.6 / IN14 / OUT14
P3.7
Control A1 P3.7 / IN15 / OUT15
GPTA1
P3.8
Control A1 P3.8 / IN16 / OUT16
P3.9
Control A1 P3.9 / IN17 / OUT17
P3.10
Control A1 P3.10 / IN18 / OUT18
P3.11
Control A1 P3.11 / IN19 / OUT19
LTCA2 P3.12
Control A1 P3.12 / IN20 / OUT20
P3.13
Control A1 P3.13 / IN21 / OUT21
P3.14
Control A1 P3.14 / IN22 / OUT22
P3.15
Control A1 P3.15 / IN23 / OUT23
MCA05658
Note: The complete address map of Port 3 is described in Table 18-12 on Page 18-25
of this TC1796 System Units (Vol. 1 of 2) User’s Manual.
P3_PDR
Port 3 Pad Driver Mode Register (40H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 PD1 0 PD0
r rw r rw
10.7 Port 4
This section describes the Port 4 functionality in detail.
P4.0
A2 P4.0 / IN24 / OUT24
Control
P4.1
A2 P4.1 / IN25 / OUT25
Control
P4.2
A2 P4.2 / IN26 / OUT26
Control
P4.3
A2 P4.3 / IN27 / OUT27
GPTA0 Control
P4.4
A2 P4.4 / IN28 / OUT28
Control
P4.5
A2 P4.5 / IN29 / OUT29
Control
P4.6
A2 P4.6 / IN30 / OUT30
Control
P4.7
A2 P4.7 / IN31 / OUT31
Control
GPTA1
P4.8
Control A1 P4.8 / IN32 / OUT32
P4.9
Control A1 P4.9 / IN33 / OUT33
P4.10
Control A1 P4.10 / IN34 / OUT34
P4.11
Control A1 P4.11 / IN35 / OUT35
LTCA2
P4.12
Control A1 P4.12 / IN36 / OUT36
P4.13
Control A1 P4.13 / IN37 / OUT37
P4.14
Control A1 P4.14 / IN38 / OUT38
P4.15
Control A1 P4.15 / IN39 / OUT39
MCA05659
Note: The complete address map of Port 4 is described in Table 18-13 on Page 18-26
of this TC1796 System Units (Vol. 1 of 2) User’s Manual.
P4_PDR
Port 4 Pad Driver Mode Register (40H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 PD1 0 PD0
r rw r rw
10.8 Port 5
This section describes the Port 5 functionality in detail.
P5.0
A2 P5.0 / RXD0A
Control
ASC0
P5.1
A2 P5.1 / TXD0A
Control
P5.2
A2 P5.2 / RXD1A
Control
ASC1
P5.3
A2 P5.3 / TXD1A
Control
P5.4
MSC0 A2 P5.4 / EN00 / RREADY0B
Control
P5.5
A2 P5.5 / SDI0
Control
MLI0
P5.6
A2 P5.6 / EN10 / TVALID0B
Control
P5.7
MSC1 A2 P5.7 / SDI1
Control
MCA05660
Note: The complete address map of Port 5 is described in Table 18-14 on Page 18-27
of this TC1796 System Units (Vol. 1 of 2) User’s Manual.
P5_PDR
Port 5 Pad Driver Mode Register (40H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
r rw r rw r rw r rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
10.9 Port 6
This section describes the Port 6 functionality in detail.
P6.8
P6.8
Control A2 P6.8 / RXD0B / RXDCAN0
ASC0
P6.9 Control A2 P6.9 / TXD0B / TXDCAN0
Note: The complete address map of Port 6 is described in Table 18-15 on Page 18-28
of this TC1796 System Units (Vol. 1 of 2) User’s Manual.
P6_PDR
Port 6 Pad Driver Mode Register (40H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
r rw r rw r rw r rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
10.10 Port 7
This section describes the Port 7 functionality in detail.
SCU
Note: The complete address map of Port 7 is described in Table 18-16 on Page 18-29
of this TC1796 System Units (Vol. 1 of 2) User’s Manual.
P7_PDR
Port 7 Pad Driver Mode Register (40H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 PD0
r rw
10.11 Port 8
This section describes the Port 8 functionality in detail.
P8.0
A2 P8.0 / TCLK1 / IN/40/ OUT40
GPTA0 Control
P8.1
Control A1 P8.1 / TREADY1A / IN41 / OUT41
P8.2
A2 P8.2 / TVALID1A / IN42 / OUT42
Control
P8.3
A2 P8.3 / TDATA1 / IN43 / OUT43
Control
MLI1
P8.4
Control A1 P8.4 / RCLK1A / IN44 / OUT44
P8.5
A2 P8.5 / RREADY1A / IN45 / OUT45
Control
P8.6
Control A1 P8.6 / RVALID1A / IN46 / OUT46
GPTA1 P8.7
Control A1 P8.7 / RDATA1A / IN47 / OUT47
MCA05663
Note: The complete address map of Port 8 is described in Table 18-17 on Page 18-30
of this TC1796 System Units (Vol. 1 of 2) User’s Manual.
P8_PDR
Port 8 Pad Driver Mode Register (40H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0 PDMLI1
r rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 PD0
r rw
10.12 Port 9
This section describes the Port 9 functionality in detail.
P9.0
A2 P9.0 / EN12 / IN/48 / OUT48
Control
P9.1
A2 P9.1 / EN12 / IN49 / OUT49
Control
MSC1 P9.2
A2 P9.2 / SOP1B / IN50 / OUT50
Control
P9.3
A2 P9.3 / FCLP1B / IN51 / OUT51
Control
GPTA0 P9.4
A2 P9.4 / EN03 / IN52 / OUT52
Control
P9.5
A2 P9.5 / EN02 / IN53 / OUT53
Control
GPTA1
P9.6
A2 P9.6 / EN01 / IN54 / OUT54
Control
P9.7
A2 P9.7 / SOP0B / IN55 / OUT55
Control
MSC0 P9.8
A2 P9.8 / FCLP0B
Control
MCA05664
Note: The complete address map of Port 9 is described in Table 18-18 on Page 18-31
of this TC1796 System Units (Vol. 1 of 2) User’s Manual.
P9_IOCR8
Port 9 Input/Output Control Register 8
(14H) Reset Value: 0000 0020H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 PC8 0
r rw r
P9_PDR
Port 9 Pad Driver Mode Register (40H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0 PDMSC1 0 PDMSC0
r rw r rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 PD0
r rw
HWCFG0
P10.0 Control P10.0
SCU HWCFG1
P10.1 Control P10.1
Register HWCFG2
P10.2 Control P10.2
RST_SR
HWCFG3
P10.3 Control P10.3
MCA05665
Note: The complete address map of Port 10 is described in Table 18-19 on Page 18-32
of this TC1796 System Units (Vol. 1 of 2) User’s Manual.
Note: Bit field HWCFG in register RST_SR contains the latched logic levels of the
Port 10 inputs that were detected at the last low-to-high transition of HDRST.
Register P10_IN makes it possible to read the actual logic levels of the Port 10
inputs.
Table 10-28 SSC0 Dedicated I/O Line Selection and Setup (cont’d)
Dedicated SSC0 Input/ SSC0 Input/Output Enable Pad Driver
Port Line Output Mode Selection Control Control
MTSR0 Tri-Stated – – SSC0_ –
MRST0 CON.EN = 0
SCLK0
SLSI0 Input – – – –
Dedicated SSC0 Slave Select Outputs
SLSO0 Output Master – SSC0_CON. SCU_CON.
SLSO1 EN = 1 SLSPDR2)
SLSO0 Tri-Stated SSC0_CON. –
SLSO1 EN = 0
1) SSC0PDR = 0: strong driver / sharp edge selected; SSC0PDR = 1: strong driver / soft edge selected;
2) SLSPDR = 0: strong driver / sharp edge selected; SLSPDR = 1: strong driver / soft edge selected;
Note: The dedicated SSC0 output pins are class A2 pins (high-speed 3.3 V LVTTL
outputs). They do not provide open-drain and pull-up/pull-down capability!
Code Parameter
Memory Memory
CMEM PRAM
PCP
Processor
Core
CPU Interrupt
Arbitration Bus
MCB05666
R7 is the only one of the eight registers that may not be used as a full GPR. The most
significant 16 bits of R7 may not be written, and will always read back as 0. However, no
error will occur when writing to the most significant 16 bits.
Note: The GPRs of the PCP are not memory-mapped into the overall address space.
They can only be directly accessed through PCP instructions. The contents of all
or some of the registers are part of a channel program’s context stored in the
PRAM between executions of the channel program. This context is then
accessible from outside the PCP.
11.3.1.1 Register R0
R0 is used as an implicit operand destination for some instructions. These are detailed
in the individual instruction descriptions.
11.3.1.4 Register R6
Register R6 may also be used as a general-use register. Again however, there are some
instructions that use fields within R6. If the COPY or EXIT instructions are used, then the
field R6.CNT1 can optionally be used implicitly as a counter. If an EXIT instruction is
used that causes an interrupt, R6.SRPN and R6.TOS must be configured properly prior
to execution of the EXIT. If interrupt priority management is used, then R6.CPPN must
be set to the priority level at which the channel shall run at its next invocation, before the
EXIT is executed. The fields for R6 are shown below.
PCP Register R6
Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
CPPN SRPN
rw rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TOS – – CNT1
rw rw rw rw
11.3.1.5 Register R7
Register R7 is an exception with respect to the other registers in that not all bits within
the register can be written, and the implicit use of the remaining bits virtually excludes
the use of R7 as a GPR. R7 serves purposes similar to those of a Program Status Word
found in traditional processors.
R7 holds the flag bits, a channel enable/disable control bit, and the PRAM Data Pointer
(DPTR). The upper 16 bits of R7 are reserved.
Most instructions of the PCP update the flags (CN1Z, V, C, N, Z) in R7 according to the
result of their operation. See Table 11-14 on Page 11-107 for details on the flag updates
of the individual instructions. The values of the flag bits in R7 maintain their state until
another instruction that updates their state is executed.
Note: Implicit updates to the flags caused by instruction take precedence over any bits
that are explicitly moved to R7. For example, if a MOV instruction is used to place
0000FF07H in R7, then the bit positions for the C (carry), Z (zero) and N (negative)
flags are being written with 1. The MOV instruction, however, implicitly updates the
Z and N flag bits in R7 as a result of its operation. Because the number is not
negative, and not zero, it will update the Z and N flags to 0. As a result, the value
left in R7 after the MOV is complete will be 0000FF04H (i.e C = 1, Z = 0, N = 0).
It is recommended that only SET and CLR instructions should be used to explicitly
modify flags in R7.
The Data Pointer, R7.DPTR, is the means of accessing PRAM variables
programmatically. It points to a 64-word PRAM segment that may be addressed by
instructions that can use the PRAM for source or destination operands (xx.P and xx.PI
instructions). The 8 bits of the DPTR are concatenated with a 6-bit offset value (either
specified in the instruction as an immediate value or contained in one of the registers) to
give a 14 bit (word) address. A program is able to update the DPTR value dynamically,
in order to index more than 64 words of PRAM.
Note: Care must be taken when updating R7.DPTR to ensure that other bits within R7
(e.g. R7.CEN) are not inadvertently corrupted.
The channel enable control bit, R7.CEN, allows the enabling or disabling of specific
channel programs. If an interrupt request is received for a channel that is disabled, an
error exit is forced, and an error interrupt to the CPU is activated.
The interrupt enable control bit, R7.IEN, allows the enabling or disabling of channel
interruption on a channel to channel basis. When R7.IEN is 0 the channel will continue
execution regardless of the priority of any new service requests. When R7.IEN is ‘1’ and
conditions allow, the channel will be suspended on receipt of a higher-priority service
request.
Note: See Page 11-120 regarding the use of R7.IEN.
PCP Register R7
Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw rw rw rw rw rw rw rw rw
To distinguish the actual register contents from the copies stored in the PRAM context
regions, the term CRx is used throughout the rest of this document to refer to the register
values in the context regions. Registers R6 and R7 are always handled in a special way
during context save and restore operations, this is described in detail in Page 11-17.
The Context Model is selected via a bit field PCP_CS.CS, this is a global setting (i.e. the
selected Context Model is used for all channels). Once a Context Model has been
selected (during PCP configuration) and the PCP has been started the PCP must
continue to use that Context Model. Attempting to change the Context Model in use
during PCP operation will lead to invalid context restore operations which will in turn lead
to invalid PCP operation.
In the case of Small and Minimum Context Models, the unsaved and unrestored
registers (shaded in Figure 11-2) can be thought of as global registers that any channel
program can use or change, or reference as constants – for example as base address
pointers (see Page 11-114 for more detail).
Note: Special care must be taken when using Minimum or Small Context Model with
nested interrupts (see Page 11-119).
R0 R0
R1 R1
R2 Restore R2
R3 R3
Full Context 8 Words
R4 R4
Save
R5 R5
R6 R6
R7 R7
R0
R1
R2
R3
Small Context
R4 Restore R4
R5 R5
4 Words
R6 R6
R7 Save R7
R0
R1
R2
R3
Minimum Context
R4
Restore R5
R6 R6
2 Words
R7 R7
Save
MCA05667
If portions of the PRAM are used for other variables and global data, the space available
for the CSA and the range of valid SRPNs is reduced by the memory space required for
this data. For best utilization of PRAM, it is advisable to have the CSA grow upwards as
a contiguous area without any “holes”, meaning that all SRPNs in the range 1 … max.
are actually used to place interrupt requests on the PCP. Unused regions within the CSA
(that is, the unused region at the base of the CSA and any context regions associated
with unused channels) cannot be used for general variable storage.
31 0 31 0 31 0
Context
#n1
n1×8H SRPN = n1
Context
CR0 #n2
CR1 n2×4H SRPN = n2
CR2 Context
CR3 #n3 SRPN = n3
Context n3×2H
CR4 #2
CR5
CR6
CR7 SRPN = 2
10H
CR0
CR1 Context
CR2 #3
CR3 SRPN = 3
Context 0CH
CR4 #1 CR4
CR5 CR5 Context
CR6 CR6 #2
CR7 SRPN = 1 CR7 SRPN = 2
08H 08H 08H
CR4 Context
CR5 Context #3 SRPN = 3
06H
CR6 #1 CR6 Context
8 Words CR7 SRPN = 1 CR7 #2 SRPN = 2
not used 04H 04H
CR6 Context
4 Words CR7 #1 SRPN = 1
not used 02H
2 Words
not used
00H 00H 00H
Note: All addresses in this figure are word addresses. MCA05668
the Full Context, and only some would require more context to be saved. In this case, a
smaller Context Model can be used, and the channels which would require more register
to be saved/restored would do this via explicit load and store instructions. This is
especially advantageous if the channel program can be designed such that the initial
real-time response operations can be executed using only the registers which have been
automatically restored. Then, as the timing requirements of the service are relaxed,
further register contents can be restored from PRAM through regular load instructions.
Of course, the contents of these registers needs to be explicitly saved, through regular
store instructions, before the exit of the channel program.
Note: Special care must be exercised when using Minimum or Small Context Models in
conjunction with nested interrupts (see Page 11-119).
The criteria for choosing the Context Model are listed in the following:
• Size of PRAM implemented in a given derivative
• Amount of channels (= SRPNs) that need to be used in a system
• Amount of PRAM used for general variables and globals
• Amount of context (register content) which need to be saved and restored quickly by
most of the most important channels
While registers R0 through R5 are always restored in a normal manner (according to the
context size), registers R6 and R7 merit discussion regarding context restore operations.
The memory location CR7 in a context region is used to hold two different pieces of
information: The lower part of register R7, and the PC value of the channel. Similarly, the
memory location CR6 in a context region can also be used to hold two different pieces
of information: The value to be restored to register R6, and the Operating Priority (CPPN)
value of the channel. This leads to the Restore/Save operations described in the
following two sections.
31 16 0
Stored Content
CPPN SRPN TOS CNT1
CR6 in PRAM
31 16 0 31 16 0
PCP Interrupt
ARB PCP
Control Reg. 0 CTL PIPN 0 IE CPPN CPPN SRPN TOS CNT1
Register R6
PCP_ICR
31 16 0
Stored Content
CPC CDPTR CFLAGS
CR7 in PRAM
16 0 31 16 0
PCP Program PCP
PC 0 CDPTR FLAGS
Counter Register R7
MCA05669
31 16 0
Stored Content
CPPN SRPN TOS CNT1
CR6 in PRAM
31 16 0 31 16 0
PCP Interrupt
ARB PCP
Control Reg. 0 CTL PIPN 0 IE CPPN CPPN SRPN TOS CNT1
Register R6
PCP_ICR
16 0 31 16 0
Stored Content
2 * SRPN CPC CDPTR CFLAGS
CR7 in PRAM
16 0 31 16 0
PCP Program PCP
PC 0 CDPTR FLAGS
Counter Register R7
MCA05670
31 16 0
PCP Interrupt R SS T
Req Node. 0 R
Q
0 SRNC 0 RR O
RE S
0 SRPN
PCP_SRNx
Channel
Number
31 16 0
PCP Interrupt
ARB
Control Reg. 0 CTL PIPN 0 IE CPPN
PCP_ICR
31 16 0
Stored Content CPPN SRPN TOS CNT1
CR6 in PRAM
31 16 0
PCP CPPN SRPN TOS CNT1
Register R6
31 16 0
Stored Content
CPC CDPTR CFLAGS
CR7 in PRAM
16 0 31 16 0
PCP Program PCP
PC 0 DPTR FLAGS
Counter Register R7
31 16 0
PCP
Register R6 CPPN SRPN TOS CNT1
31 16 0
Stored Content
CR6 in PRAM CPPN SRPN TOS CNT1
16 0 31 16 0
PCP Program PCP
Counter PC 0 CDPTR FLAGS Register R7
31 16 0
Stored Content
CR7 in PRAM CPC CDPTR CFLAGS
31 16 0
PCP
CPPN SRPN TOS CNT1
Register R6
31 16 0
Stored Content
CR6 in PRAM CPPN SRPN TOS CNT1
16 0 31 16 0
PCP
2 * SRPN 0 CDPTR FLAGS Register R7
31 16 0
Stored Content
CR7 in PRAM CPC CDPTR CFLAGS
MCA05673
Channel Suspend
Figure 11-9 illustrates the operation of a context save for a channel that is being
suspended. This is the same as for Channel Resume mode except that an interrupt
request is created to allow the channel to be restarted at a later time. This restore
operation utilizes one of three specially extended SRNs (see Page 11-70) to store the
interrupt request. The information stored as part of the interrupt request is the channel
number (SRPN), and the operating priority (CPPN) with which the channel was operating
prior to being suspended. This operation in conjunction with the suspended channel
restore operation shown in Figure 11-6 allows the temporary suspension of a channel
in favor of a higher-priority channel.
8 0 31 16 0 PCP Interrupt
ARB Control Reg.
1 SRPN 1 0 CTL PIPN 0 IE CPPN
PCP_ICR
31 16 0
PCP
CPPN SRPN TOS CNT1
Register R6
31 16 0
Stored Content
CPPN SRPN TOS CNT1
CR6 in PRAM
16 0 31 16 0
PCP Program PCP
PC 0 DPTR FLAGS
Counter Register R7
31 16 0
Stored Content
CPC CDPTR CFLAGS
CR7 in PRAM
MCA05674
It is recommended that all EXIT instructions for all channels should use the EP = 0
setting when the PCP is operated in Channel Restart Mode (see Page 11-89).
Note that when Channel Restart Mode is in use a Channel Entry Table must be provided
with a valid entry for every channel being used. Figure 11-10 shows an example of
CMEM organization when Channel Restart Mode has been selected. Failure to provide
a valid entry for all channels that are in use will lead to invalid PCP operation.
16 0 16 0
Channel #2
Main Code
Channel #n1
Main Code
Channel #2
Main Code
Channel #3
Main Code
Channel Instruction #2
#1 Instruction #1 SRPN = n1
n1×2H
Channel #3
Main Code
Channel
Channel Instruction #2
Entry
#3 Instruction #1 SRPN = 3
06H Table
Channel Instruction #2
#2 Instruction #1 SRPN = 2
04H
Channel Instruction #2 Channel #1
#1 Instruction #1 SRPN = 1 Main Code
02H
2 Half-words
not used
00H 00H
MCA05675
Figure 11-10 Examples of Code Memory Organization for Channel Restart and
Channel Resume Modes
Note: The CMEM address offsets in the above figure are shown as PCP instruction (half-
word) offsets. To obtain FPI address offsets (byte offset), multiply each offset by
two.
After the channel program starts, the value of R6 may be changed without altering
the value of the effective CPPN, because updates to the value of R6.CPPN have no
effect until the next invocation of the channel program.
• If the R7.CEN bit is clear (0), then an error has occurred because a disabled channel
program has been invoked, the PCP_ES.DCR bit is set to flag the error, and the
channel program performs an error exit (see Page 11-29).
• If the R7.CEN bit is set (1), then code execution begins at the value of the restored
PC or at the address of the interrupt routine in the Channel Entry Table, depending
on the value of PCP_CS.RCB.
Special care needs to be taken regarding the number of clock cycles required to switch
context when the last state of the PCP before channel exit was execution of channel “N”
(SRPN = “N”), and the current service request is also SRPN = “N”. In this case, the PCP
Processor Core should not load the context (as the PCP GPRs already contain the
correct content), but continue operation from the current point and state (noting that the
PC value should be set to the appropriate channel entry point if PCP_CS.RCB = 1).
• The PC of the instruction that was executing when the error occurred is stored in
PCP_ES.EPC.
• The number of the channel program that was executing when the error occurred is
stored in PCP_ES.EPN.
• The error type is set in the appropriate field of register PCP_ES.
• The context is saved back to the PRAM CSA. Depending on the chosen context size
(PCP_ES.CS) a Full, Small, or Minimum Context save is performed.
• If the error condition was not due to an FPI Bus error or a DEBUG instruction, then
an interrupt request to the CPU is generated with the priority number stored in
register PCP_CS.ESR.
The repetitive posting of PCP error interrupts will not cause an overwhelming number of
interrupts to the CPU. In this situation, the PCP’s CPU service request queue (see
Page 11-33) will quickly fill, and force the PCP to stall until the CPU can resolve the
situation.
Note: An error condition (other than an FPI Bus error) will result in an interrupt being sent
to the CPU. The interrupt routine that responds to this interrupt must be capable
of dealing with the cause as recorded in PCP_ES, and it must be able to restore
the channel program to operation. The minimum required to restart the channel
program is to set the context value of CR7.CEN = 1.
Note: The DEBUG instruction must be only used in DEBUG mode; otherwise an “Illegal
Operation” (IOP) error will be generated.
Winning SRPN,
Priority & Interrupt
Type
PCP Core
PCP_SRC8
Select
PCP_SRC0 Suspended
PCP_SRC7 interrupt
PCP_SRC1
Select taken
PCP_SRC6
PCP_SRC2
Select
PCP_SRC3
PCP Queue
PCP_SRC5 full
Select PICU
PCP_SRC9
PCP_SRC4 PCP_SRC10
Select PCP_SRC11
PCP Queue
Winner
MCB05676
service requests by performing an FPI Bus write operation to an external service request
node (SRN). Alternately, the PCP can raise a service request using one of its own
internal SRN’s. An interrupt can only be generated by the PCP via an internal SRN when
executing an EXIT instruction, or when an error condition occurs. In the following
descriptions, PCP service requests triggered through an EXIT instruction or the
occurrence of an error are called “implicit” PCP service requests to distinguish them from
the “explicit” way of generating a service request through an FPI Bus write to a service
request node external to the PCP.
The twelve service request nodes are split into four groups of two nodes each.
• The first group, containing registers PCP_SRC0 and PCP_SRC1, handles implicit
PCP service requests targeted to the CPU. The Type-of-Service control fields, TOS,
of these registers are hard-wired to 00B, directing the requests to the CPU.
• The second group, registers PCP_SRC2 and PCP_SRC3, handles the service
requests targeted to the PCP itself. The respective TOS field of these registers are
hard-wired to 01B, directing the requests to the PCP.
• The third group, containing registers PCP_SRC4 to PCPSRC8, have programmable
TOS fields which allow these registers to be assigned (at configuration time) to any
of the available interrupt buses.
• The fourth group, containing registers PCP_SRC9, PCP_SRC10 and PCP_SRC11,
are an extended version of a standard Service Request Node. These handle service
requests targeted to the PCP itself, including service requests representing a
suspended interrupt. The respective TOS field of these registers are hard-wired to
01B, directing the requests to the PCP.
The service request enable bits, SRE, of the PCP_SRCx registers are hard-wired to 1,
meaning these service requests are always enabled.
Note: The number of interrupt buses is device-dependent. Programming a PCP_SRCx
register (x = 4 to 8) with a TOS value representing a non-available interrupt bus
(10B or 11B in the TC1796) will disable Service Request Node x.
The actual service request flag and the service request priority number of the
PCP_SRCx registers are updated by the PCP when it generates an implicit service
request. The way this is performed is described in the following section.
The service request nodes in each of the groups described above are implemented as
queues with the appropriate number of entries. When the PCP generates an implicit
service request, it places the request into the next available free entry of the appropriate
queue rather than writing it into a specific register. Queue management logic
automatically ensures proper handling of the queue. If all entries of a queue are filled with
pending service requests, the queue management reports this condition to the PCP
kernel via a “queue full” signal.
In the following descriptions, the terms “CPU Queue” and “PCP Queue” are used to refer
to the queues in the two groups of PCP service request nodes.
lower than those of the PCP queue. In this way, it is guaranteed that one entry in the PCP
queue gets serviced, freeing one slot in the queue.
The PCP programmer needs to carefully consider this special operation. It ensures that
deadlocks are avoided, but it implies that if too many PCP channel programs post
service requests to the PCP (self-interrupt), the PCP will have to service these rather
than outside interrupt sources. Depending on the priority given to these requests, this
could undermine an otherwise appropriate use of the interrupt priority scheme. It is
recommended that the system be designed such that in most cases, high-priority
numbers can be assigned to these self-interrupts so that they can win normal arbitration
rounds, avoiding the situation where the PCP queue becomes full.
Note: If the CPU queue is full, the PCP can continue to operate until it needs to post
another service request to the CPU queue.
The second of these cases can result from an address calculation either from the
execution of a PC relative jump instruction (either a JC, JC.I, or JL instruction), or the PC
being incremented following execution of the previous instruction.
Note: If a conditional instruction’s condition code is false, the operation will be treated as
a “No Operation”. Register values will not be changed and the flags will not be
updated.
Note: If a conditional instruction’s condition code is false, the operation will be treated as
a “No Operation”. Register values will not be changed and the flags will not be
updated.
Note: Since channel 0 is not defined (no service request with SRPN = 0), the first area
is not an actual CSA. It is recommended that this area should not be used by PCP
channel programs.
The FPI Bus address of a word location pointed to by the Data Pointer R7_DPTR is
calculated by the following formula:
• Effective FPI Bus address[31:0] = (PRAM Base Address) + (<DPTR> << 6)
included in the context will not be saved, and indeed these register values may be
changed by the operation of another active channel. In this case, the required
registers should be explicitly saved to PRAM by store instructions prior to
execution of the DEBUG instruction.
If the DEBUG instruction is programmed to stop all channel program execution, the PCP
disables further invocations of any channel by clearing bit PCP_CS.EN. The execution
of this channel is only stopped according to the SDB instruction field value. The PCP will
only start to reaccept service requests when PCP_CS.EN is written to 1.
Note: The DEBUG instruction must be only used in DEBUG mode; otherwise it will
generate an IOP error.
Note: If PCP_CS.RCB = 0 (Channel Resume Mode), then the channel program will
begin executing at whatever PC is restored from the context location CR7.PC. If
PCP_CS.RCB = 1 (Channel Restart Mode), then the channel program is forced to
always start at its channel entry table location, no matter what the restored context
value is for the PC. This means that in Channel Restart Mode, it is not possible to
restart the channel program from where it was halted by the debug event. It is
recommended that when using Channel Restart Mode, the user should also
program all EXIT instructions with the “EP = 0” setting to allow selection of
Channel Resume Mode for debugging without changing operation of the channel
programs.
MCA05677_mod
PCP_ID
PCP Module Identification Register (008H) Reset Value: 0020 C0XXH
31 16 15 8 7 0
r r r
PCP_CLC
PCP Clock Control Register (00H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PCG
0
DIS
rw r
PCP_CS
PCP Control/Status Register (10H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
rw rw rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw rw rw rw rw r rh rwh rw
PCP_ES
PCP Error/Debug Status Register (14H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
EPC
rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rh rh rh r rh rh rh rh rh
Note: An interrupt request with the SRPN held in PCP_CS.ESR is posted to the CPU
whenever a PCP error event, other than an FPI Bus error occurs. FPI Bus error
interrupt generation is automatically handled by the FPI Bus control logic, rather
than by the PCP. The execution of a DEBUG instruction is not classed as an error
event and does not therefore generate an interrupt request to the CPU. The entire
contents of the register are updated whenever there is a debug or an error event
detected (i.e. all status/error bits, other than the bit representing the last PCP
error/debug event, are cleared). This register therefore only provides a record of
the last error/debug event encountered. The only way to clear this register is to
reset the PCP.
PCP_ICR
PCP Interrupt Control Register (20H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
P
0 ONE PARBCYC PIPN
CYC
r rw rw rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 IE CPPN
r rh rh
PCP_ITR
PCP Interrupt Threshold Control Register
(24H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0 ITL
r rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 ITP
r rw
PCP_ICON
PCP Interrupt Configuration Register (28H) Reset Value: 0000 03E4H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
IP3E IP2E IP1E IP0E P3T P2T P1T P0T
0
=0 =0 =1 =1 = 11 = 10 = 01 = 00
r r r r r r r r r
PCP_SSR
PCP Stall Status Register (2CH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0 SCHN
r rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ST 0 STOS SSRN
rh r rh rh
PCP_SRCx (x = 0-1)
PCP Service Request Control Register x
(FCH-x*4H) Reset Value: 0000 1000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SRE TOS
0 SRR 0 SRPN
=1 = 00
r rh r r r rh
PCP_SRC2
PCP Service Request Control Register 2
(F4H) Reset Value: 0000 1400H
PCP_SRC3
PCP Service Request Control Register 3
(F0H) Reset Value: 0000 1400H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SRE TOS
0 SRR 0 SRPN
=1 = 01
r rh r r r rh
PCP_SRCx (x = 4-8)
PCP Service Request Control Register x
(FCH-x*4H) Reset Value: 0000 1000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SRE
0 SRR TOS 0 SRPN
=1
r rh r rw r rh
PCP_SRCx (x = 9-11)
PCP Service Request Control Register x
(FCH-x*4H) Reset Value: 0000 1400H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0 RRQ 0 SRCN
r rh r rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SRE TOS
0 SRR 0 SRPN
=1 = 01
r rh r r r rh
COPY
Instruction
CNT0 := RC0
DATA Transfer
CNT0 := CNT0 - 1
no
CNT0 = 0 ?
yes
00 10
CNC = ?
01
no
CNT1 = 0 ?
yes
Next
Instruction MCA05678
BCOPY
Instruction
DATA Transfer
(Block size
determined by
CNT0 field)
00 10
CNC = ?
01
no
CNT1 = 0 ?
yes
Next
Instruction
MCA05679_mod
a 40-bit unsigned multiply and then shifts this result right by 8 bits (discards the least
significant 8 bits of the 40-bit result).
The DSTEP instruction also has some conditions stipulated regarding input values to the
instruction. Use of the pseudo-code model for the DSTEP instruction with invalid input
values will yield an invalid result.
See also Page 11-127 for TC1796 specific details of the BCOPY instruction.
Note: Execution of the DEBUG command when not in Debug Mode will cause the PCP
to generate an “Illegal Operation” Error Exit.
Note: The value in Ra must always be greater than the value in R0 prior to execution of
the DSTEP instruction. If the rules specified at Page 11-79 are followed, then the
above description and operation are correct. Failure to adhere to these rules will
yield undefined results.
JL Syntax JL offset10
Description Add the sign-extended value specified by offset10 to the
contents of the PC, and jump to that address.
Operation PC = PC + sign_ext(offset10)
Flags None
Note: In the case of the MSTEP64 instruction above, the “temp” variable is a 40-bit
variable and all calculations are performed using 40-bit unsigned arithmetic. All
other calculations use 32-bit unsigned arithmetic.
Note: MCLR and MSET are read/modify/write operations that cannot be interrupted by
an access from another FPI master. They can be used to implement semaphore
systems.
JC ERROR,cc_NZ
;jump to error routine if not
;correct
ADD.I R5,#0x1 ;increment state number
EXIT EC=1,ST=0,INT=0,EP=1,cc_UC ;begin exit
STATE1:
COMP.I R5,#0x1 ;compare to interrupt number it
;should be
JC ERROR,cc_NZ ;jump to error routine if not
;correct
ADD.I R5,#0x1 ;increment state number
EXIT EC=1,ST=0,INT=0,EP=1,cc_UC ;begin exit
STATE2:
COMP.I R5,#0x2 ;compare to interrupt number it
;should be
JC ERROR,cc_NZ ;jump to error routine if not
;correct
LD.I R5,#0x0 ;reset state number
JC START,cc_UC ;jump back to start of state
;machine
The last state could just as easily have ended with an EXIT that resets the PC to the
Channel Entry Table (EP = 0) rather than jumping back to START.
two choices here. A boot-time interrupt channel program can be invoked once to perform
initialization, or there can be a program that routinely loads these values as a matter of
course, and is invoked at boot time or as upon receipt of the very first interrupt.
In the example above, the COPY instruction increments the destination held in R5
(DST+), and the source address is left constant in R4 (SRC). All permutations of
decrement, increment or do not modify can be applied to either pointer register (R4 and
R5) by use of the SRC and DST fields (SRC-, SRC+ or SRC and DST-, DST+ or DST).
Building on this basic DMA method, scatter-gather DMA channels can be created.
service request for a channel in any group from 1 to 3, a group 2 channel program can
only be interrupted by a new service request for a channel in group 3).
Note: When using this scheme, each channel program must ensure prior to channel exit
that the R6.CPPN field contains the appropriate value, so that when the channel
is next invoked, it will run at the correct priority.
Divide Examples
Example of a 32/32 bit divide (R5 / R3):
DINIT R5, R3 ;Initialize ready for the divide
JC HANDLE_DIVIDE_BY_ZERO, cc_V ;V flag was set so
;jump to divide
;by zero error handler
DSTEP R5, R3 ;4 DSTEP instructions
;(4 * 8 = 32 bit
DSTEP R5, R3 ; divide)
DSTEP R5, R3
DSTEP R5, R3
After this sequence, R5 holds the result, R0 the remainder and R3 is unchanged.
Example of a 8/32 bit divide (R4 / R2):
RR R4, 8 ;Rotate R4 right by 8 to move
;least significant byte into
;most significant byte
DINIT R4, R2 ;Initialize ready for the divide
JC HANDLE_DIVIDE_BY_ZERO, cc_V ;V flag was set so
;jump to divide
;by zero error handler
DSTEP R4, R2 ;DSTEP instruction
;(1 * 8 = 8 bit divide)
After this sequence, R4 holds the result, R0 the remainder and R2 is unchanged.
Note that the above example is specified as being a 8/32 bit divide rather than an 8/8 bit
divide (see comments above).
Multiply Examples
Example of a 32 × 8 bit multiply (R4 × R1) yielding a 32 bit result (R4 = 32 bit, R1 = 8 bit):
RR R1, 8 ;Rotate least significant byte of R1 to
;most significant byte
MINIT R1, R4 ;Initialize ready for multiply
Note: “BE” means that in case of an access to this address region, a bus error is
generated.
Note: The complete address map of the PCP is described in Table 18-25 on Page 18-77
of this TC1796 System Units (Vol. 1 of 2) User’s Manual.
More details about the parity control for on-chip memories are described in Section 5.5
on Page 5-37.
FPI Bus error as the PCP’s interface to the FPI Bus becomes reset.
Therefore, it is generally not recommended to use the PCP soft reset capability in
a PCP application program. A PCP hard reset should be generated instead.
Interface 0
FPI Bus
System
DMA
Peripheral
Request Channels
Bus
Selection/ 00-07
Arbitration
DMA Transaction Interface 1
Requests of Control Unitl
FPI Bus
On-chip Remote
CH0n_OUT Bus Peripheral
Periph.
Units Switch Bus
DMA Sub-Block 1
DMA
MLI0
Request Channels
Selection/ 10-17
Interface
Arbitration
MLI
Address MLI1
Transaction
Decoder Control Unit
CH1n_OUT Memory
Checker
Interrupt SR[15:0] Arbiter/
Request DMA Interrupt Control Switch
Nodes Control
MCB05680
12.1.1 Features
• 16 independent DMA channels
– 8 DMA channels in each DMA Sub-Block
– Up to 8 selectable request inputs per DMA channel
– 2-level programmable priority of DMA channels within a DMA Sub-Block
– Software and hardware DMA request
– Hardware requests by selected on-chip peripherals and external inputs
• Programmable priority of the DMA Sub-Blocks on the bus interfaces
• Buffer capability for move actions on the buses (at least 1move per bus is buffered)
• Individually programmable operation modes for each DMA channel
– Single Mode: stops and disables DMA channel after a predefined number of DMA
transfers
– Continuous Mode: DMA channel remains enabled after a predefined number of
DMA transfers; DMA transaction can be repeated
– Programmable address modification
• Full 32-bit addressing capability of each DMA channel
– 4 Gbyte address range
– Support of circular buffer addressing mode
• Programmable data width of DMA transfer/transaction: 8-bit, 16-bit, or 32-bit
• Micro Link bus interface support
• Register set for each DMA channel
– Source and destination address register
– Channel control and status register
– Transfer count register
• Flexible interrupt generation (the service request node logic for the MLI channels is
also implemented in the DMA module)
• All buses connected to the DMA module must work at the same frequency
• Read/write requests of the System Bus side to the Remote Bus peripherals are
bridged to the Remote Peripheral Bus (only the DMA is master on the RPB)
DMA Move
A DMA move is an operation that always consists of two parts:
1. A read move that loads data from a data source into the DMA controller
2. A write move that puts data from the DMA controller to a data destination
Within a DMA move, data is always moved from the data source via the DMA controller
to the data destination. Data is temporarily stored in the DMA controller. The data width
of read move and write move are always identical (8-bit, 16-bit or 32-bit). Data assembly
or disassembly is not supported.
DMA Controller
Read Write
Data Move DMA Move Data
Source Channel Destination
DMA Transfer
A DMA transfer can be composed of 1, 2, 4, 8 or 16 DMA moves.
DMA Transaction
A DMA transaction is composed of several (at least one) DMA transfers. The Transfer
Count determines the number of DMA transfers within one DMA transaction.
Example:
1024 word (32-bit wide) transactions can be composed of 256 transfers of four DMA
word moves, or 128 transfers of eight DMA word moves.
DMA Controller
Request On-Chip On-Chip
Peripheral Peripheral
Unit 1 Unit 2
Sub-Block 0
FPI Bus 0 Request
Bus Switch
Request
FPI Bus 1
Sub-Block 1
On-Chip On-Chip
Request
Peripheral Peripheral
Unit 3 Unit 4
Request
MLI Bus Interface
MCA05682
the source or destination address register. In this case, no buffering of the address is
required. When writing a new address to the (address of) the source or destination
address register and a DMA transaction is running, no transfer to an address register can
take place and SHADRmn holds the new address value that was written. For this
operation, bit field ADRCRmn.SHCT must be set either to 01B (address is a source
address) or 10B (new address is a destination address). At the start of the next DMA
transaction, the shadow transfer takes place and the content of SHADRmn is written
either into SADRmn or DADRmn (ADRCRmn.SHCT must be set accordingly). After the
shadow transfer, SHADRmn is set to 0000 0000H. Therefore, the software can check by
reading the shadow address register whether or not the shadow transfer has already
taken place.
Only one address register can be shadowed while a transaction is running, because the
shadow register can only be assigned either to the source or to the destination address
register. Note that the shadow address register transfer has the same behavior in Single
or Continuous Mode. When the shadow mechanism is disabled
(ADRCRmn.SHCT = 00B), SHADRmn is always read as 0000 0000H.
No transaction running ?
yes
(CHSRmn.TCOUNT = 0 &
TRSR.CHmn = 0)
no
yes
Content of SHADRmn is
New source address is
transferred into
directly transferred into
SADRmn and
SADRmn
SHADRmn := 00000000 H
MCA05683
1) 2) 3)
CHCRmn
Suspend Request
CHMODE
TRSR
Software-controlled Modes
In software-controlled mode one software request starts one complete DMA transaction
or one single DMA transfer. Software-controlled modes are selected by writing
HTREQ.DCHmn = 1. This forces status flag TRSR.HTREmn = 0 (hardware request of
DMA channel mn is disabled).
The software-controlled mode that initiates one complete DMA transaction to be
executed is selected for DMA channel mn by the following write operations:
• CHCRmn.RROAT = 1
• STREQ.SCHmn = 1
Setting STREQ.SCHmn to 1 (this is the software request) causes the DMA transaction
of DMA channel mn to be started and TRSR.CHmn to be set. At the start of the DMA
transaction, the value of CHCRmn.TREL is loaded into CHSRmn.TCOUNT (transfer
count or tc) and the DMA transfers are executed. After each DMA transfer, TCOUNT
becomes decremented and next source and destination addresses are calculated.
When TCOUNT reaches the 0, DMA channel mn becomes disabled and status flag
TRSR.CHmn is cleared. Setting STREQ.SCHmn again starts a new DMA transaction of
DMA channel mn with the parameters as actually defined in the channel register set.
CHCRmn.RROAT = 1
TRSR.CHmn
Writing
STREQ.SCHmn = 1
CHCRmn.RROAT = 0
TRSR.CHmn
Writing
STREQ.SCHmn = 1
CHSRmn.TCOUNT 0 tc tc-1 1 0
tc = initial transfer count
INTmn
(triggered by
TCOUNT = 0) MCT05686
Hardware-controlled Modes
In hardware-controlled modes a hardware request signal starts a DMA transaction or a
single DMA transfer. There are two hardware-controlled modes available:
• Single Mode:
Hardware requests are disabled by hardware after a DMA transaction
• Continuous Mode:
Hardware requests are not disabled by hardware after a DMA transaction
CHCRmn.RROAT = 1
TRSR.CHmn
TRSR.HTREmn
CHmn_REQ
CHCRmn.RROAT = 0
TRSR.CHmn
TRSR.HTREmn
CHmn_REQ
CHSRmn.TCOUNT 0 tc tc-1 2 1 0 tc
TRSR.CHmn
Writing
STREQ.SCHmn=1
Writing
HTREQ.ECHmn=1
TRSR.HTREmn
CHmn_REQ
CHSRmn.
0 tc tc-1 2 1 0
TCOUNT
INT tc = initial transfer count
(triggered at the end
of a transaction with
IRDV = 0) MCT05688
Transaction
Transfer 0 Transfer 1 Transfer n
DMA Moves M1 M2 Mx M1 M2 Mx M1 M2 Mx
CHmn_REQ
CHSRmn.
0 tc tc-1 1 0
TCOUNT
31 16 15 0 31 16 15 0
1CH 1CH
18H D0 18H
14H 14H
DMA
D1 10H Moves D1 10H
0CH 0CH
08H .... 08H
04H 04H
D0 00H .... 00H
31 16 15 0 31 16 15 0
1CH D7 1CH
18H D6 18H
14H D5 14H
DMA
10H Moves D4 10H
D7 D6 0CH D3 0CH
D5 D4 08H D2 08H
D3 D2 04H D1 04H
D1 D0 00H D0 00H
Move Engine m
Bus Switch
MCA05692
Move Move
Engine 0 Engine 1
MLI0
Interface
Arbiter/
MLI
The arbiter/switch control unit arbitrates the bus requests for the switch and grants the
buses connected to the switch for data transfers. Table 12-1 defines the Bus Switch
priorities.
Lowest MLI –
CHCRmn.DMAPRIO determines the priority that is used when a move operation related
to this channel is targeting the FPI Bus 0 (SPB). In the TC1796, the DMA controller has
two priorities on FPI Bus 0 (DMA0 and DMA1), where it competes against the other bus
masters in the system to access the bus. The DMAPRIO bit field also determines which
priority is used by a DMA Move Engine to arbitrate the FPI Bus 0 access. DMIPRIO has
no effect in the channel prioritization but is also used for Bus Switch arbitration of the two
Move Engines.
Access modes (U, SV) of an access from FPI Bus 0 to FPI Bus 1 are identically
transferred to FPI Bus 1. All accesses triggered by the DMA Move Engines or the MLI
modules are always done in SV mode.
The DMA bridge functionality from the FPI Bus 0 to FPI Bus 1, to the MLI modules or to
the memory checker does not support read/modify/write instructions.
after Suspend Mode has been left again. Suspend Mode of DMA channel mn is left and
its normal operation continues if either the SUSREQ signal becomes inactive, or if the
enable bit SUSENmn is cleared by software.
Transfer
TRSR & Request to
CHmn Channel
Arbiter
MCA05694
≥1 ≥1
Enabled & & Enabled
Transaction Transaction
Lost Interrupts Lost Interrupts
00-07 10-17
TRSR 3 2 2 3 TRSR
CH01 CH11
Edge Edge
TRSR Detection Detection TRSR
CH07 CH17
≥1
BREAK
MCA05695
TR15 TR14 TR13 TR12 TR11 TR10 TR9 TR8 TR7 TR6 TR5 TR4 TR3 TR2 TR1 TR0
CH CH CH CH CH CH CH CH
0 05
07 06 04 03 02 01 00
TR15 TR14 TR13 TR12 TR11 TR10 TR9 TR8 TR7 TR6 TR5 TR4 TR3 TR2 TR1 TR0
ME0 ME0
RBT1 0 RBT0 CH0
WS RS
12.1.8 Interrupts
The interrupt structure of the DMA controller is a very flexible control logic that allows an
interrupt coming from an interrupt source within four interrupt source types to be
connected to each of the sixteen interrupt outputs. This permits, for example, DMA
channels that generate interrupts very rarely to share one interrupt node. The remaining
interrupt nodes can be assigned to dedicated DMA channels to reduce the interrupt
overhead for these channels. The four interrupt source types are:
• Channel interrupts
• Transaction lost interrupt
• Move Engine interrupts
• Wrap buffer interrupts
Some of the interrupt functions are common to all of the four interrupt source types. An
interrupt event, internally generated as a request pulse, is always stored in an interrupt
status flag. This interrupt status flag can be cleared by software. Further, the interrupt
event can be enabled or disabled. When an interrupt event is enabled, a 4-bit Interrupt
Node Pointer determines which of the sixteen interrupt outputs will be activated.
The following sections describe each of the four interrupt source types in more detail.
match interrupt is generated at the end of a DMA transaction (after the last DMA
transfer).
The pattern detection interrupt is indicated when status flag INTSR.IPMmn is set. The
status flags IPMmn and ICHmn can be cleared together by software when setting bit
INTCR.CICHmn (or CHRSTR.CHmn). The pattern detection interrupt of DMA channel
mn is enabled when bit CHICRmn.PATSEL is set to a value not equal to 00B. The
channel interrupt pointer CHICRmn.INTP determines which of the interrupt outputs
SR[15:0]1) will be activated on a pattern detection or channel interrupt.
m = 0-1, n = 0-7
When a Move Engine m source or destination error occurs, additional status bits and bit
fields are provided in the error status register ERRSR to indicate the following two status
conditions:
• At which FPI Bus interface a Move Engine m error occurred (FPI0ER and FPI1ER)
• For which DMA channel a Move Engine m read or write move error was reported
(LECME0 and LECME1)
These error status bits and bit fields are required by error handler software to detect in
detail at which FPI Bus interface and at which DMA channel the Move Engine error was
generated. ERRSR.FPI0ER or ERRSR.FPI1ER are cleared when bits CLRE.CFPI0ER
or CLRE.CFPI1ER, respectively, become set.
CHICRmn CHICRmn
INTP SIDMA0
4
≥1
DMA Channel mn to SR1
Interrupts (16) & Interrupt
Pattern Det. Output
Interrupts (16) to SR14 SR0
EER
TRLINP
4
to SR1
Transaction Lost
Interrupts (16)
to SR14
EER
MEmINP
4
to SR1
Move Engine
Interrupts (2)
to SR14
CHICRmn
CHICRmn SIDMA15
WRPP
≥1
4
Interrupt
to SR1 Output
Wrap Buffer SR15
Interrupts (16)
to SR14
MCA05700
Compare Logic
for 1 Bit
=1
≥1 &
Mask Compare
1
Match
Output
Compare Logics
of other Bits
n
Data from
MEmR
Register MCA05701
When 8-bit channel data width is selected, the pattern detection logic makes it possible
to compare the byte of one read move with two different patterns. Furthermore, after
each read move the pattern match result “RDm0 with PATm1, masked by PATm3” is
stored in bit CHCRmn.LXO. This operating mode allows, for example, to detect two-byte
sequences in an 8-bit data stream coming from a serial peripheral unit with 8-bit data
width (e.g.: recognition of carriage-return, line-feed characters). A mask operation of
each compared bit is possible.
31 24 23 16 15 8 7 0 CHCRmn
MEmPR PATm3 PATm2 PATm1 PATm0 PATSEL
2
0 00
Mask
COMP 01
Pattern
Mask Detected
COMP 10
&
11
1)
MEmR RDm3 RDm2 RDm1 RDm0 LXO
31 8 7 0 CHSRmn
1) Compare result is clocked into LXO after each read move. MCA05702
Figure 12-25 Pattern Detection for 8-bit Data Width (CHCRmn.CHDW = 00B)
When 16-bit channel data width is selected, the pattern detection logic makes it possible
to compare the complete half-word of one read move only (aligned mode) or to compare
upper and lower byte of two consecutive read moves (un-aligned modes). Both modes
can be combined, too (combined mode). A mask operation of each compared bit is
possible.
In un-aligned mode 1 (source address decremented), the high byte (RDm1) of the
current and the low byte (RDm0) of the previous 16-bit read move are compared.
In un-aligned mode 2 (source address incremented), the low byte (RDm0) of the current
and the high byte (RDm1) of the previous 16-bit read move are compared.
If it is not known on which byte boundary (even or odd address) the 16-bit pattern to be
detected is located, the combined mode should be used. This mode is the most flexible
mode that combines the pattern search capability for aligned and un-aligned 16-bit data
searches.
31 24 16 15 8 7 0 ADRCRmn CHCRmn
MEmPR PATm3 PATm2 PATm1 PATm0 INCS PATSEL
2
0 00
Mask
COMP 01
Pattern
Detected
10
Mask ≥1
COMP 0 11
Mask &
COMP 1
0
1)
MEmR RDm3 RDm2 RDm1 RDm0 LXO
31 24 23 16 15 8 7 0 1
CHSRmn
1) This signal is clocked into LXO after each read move. MCA05703
Figure 12-26 Pattern Detection for 16-bit Data Width (CHCRmn.CHDW = 01B)
In 32-bit channel data width mode, the pattern detection logic makes it possible to
compare the lower half-word only, the upper half-word only, or the complete 32-bit word
with a pattern stored in the MEmPR register. A mask operation is not possible.
31 16 15 0 CHCRmn
MEmPR PATm3 PATm2 PATm1 PATm0 PATSEL
2
0 00
Mask
0 COMP 01
Pattern
Mask Detected
0 COMP 10
&
11
Figure 12-27 Pattern Detection for 32-bit Data Width (CHCRmn.CHDW = 10B)
Note: The definition of the fixed address ranges x and the assignment of each sub-range
to one of the fixed address ranges is product-specific. The definitions of the
address ranges for the DMA controller as implemented in the TC1796 are defined
on Page 12-98.
31 a a-1 0
Fixed Address Variable Address
31 a a-1 0
SIZE = 111B Fixed Address Variable Address
31 a-2 0
SIZE = 110B Fixed Address 1) Variable Address
31 a-3 0
SIZE = 101B Fixed Address 2) Variable Address
31 a-4 0
SIZE = 100B Fixed Address 3) Variable Address
31 a-5 0
SIZE = 011B Fixed Address 4) Variable Address
31 a-6 0
SIZE = 010B Fixed Address 5) Variable Address
31 a-7 0
SIZE = 001B Fixed Address 0 5) Variable Address
31 a-8 0
SIZE = 000B Fixed Address 0 0 5) Variable Address
Programmable by SLICE
Fixed address bits
Assigned for AENx
1) This bit is defined by SLICE[0].
2) These 2 bits are defined by SLICE[1:0].
3) These 3 bits are defined by SLICE[2:0].
4) These 4 bits are defined by SLICE[3:0].
5) These 5 bits are defined by SLICE[4:0].
MCA05705
Note: Register bits marked with “w” are virtual registers and do not contain flip-flops.
They are always read as 0.
Note: The DMA registers can only be written in supervisor mode. Some of them are also
Endinit-protected.
DMA_ID
DMA Module Identification Register (008H) Reset Value: 001A C0XXH
31 16 15 8 7 0
r r r
The OCDS Register describes the break capability of the DMA module. OCDSR is only
reset with the OCDS Reset.
DMA_OCDSR
DMA OCDS Register (064H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
BRL BRL
0 BCHS1 BTRC1 0 BCHS0 BTRC0
1 0
r rw rw rw r rw rw rw
The Suspend Mode Register contains bits for each DMA channel that make it possible
to enable/disable its Soft-suspend Mode capability and that indicate its suspend status.
DMA_SUSPMR
DMA Suspend Mode Register (068H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
SUS SUS SUS SUS SUS SUS SUS SUS SUS SUS SUS SUS SUS SUS SUS SUS
AC AC AC AC AC AC AC AC AC AC AC AC AC AC AC AC
17 16 15 14 13 12 11 10 07 06 05 04 03 02 01 00
rh rh rh rh rh rh rh rh rh rh rh rh rh rh rh rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SUS SUS SUS SUS SUS SUS SUS SUS SUS SUS SUS SUS SUS SUS SUS SUS
EN EN EN EN EN EN EN EN EN EN EN EN EN EN EN EN
17 16 15 14 13 12 11 10 07 06 05 04 03 02 01 00
rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw
The Global Interrupt Set Register makes it possible to activate the interrupt output lines
of the DMA by software.
DMA_GINTR
DMA Global Interrupt Set Register (02CH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SI SI SI SI SI SI SI SI SI SI SI SI SI SI SI SI
DMA DMA DMA DMA DMA DMA DMA DMA DMA DMA DMA DMA DMA DMA DMA DMA
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
w w w w w w w w w w w w w w w w
Note: In the TC1796, only interrupt output lines SR[7:0] are available. Therefore, only
bits SIDMA[7:0] are effective.
DMA_CHRSTR
DMA Channel Reset Request Register
(010H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CH CH CH CH CH CH CH CH CH CH CH CH CH CH CH CH
17 16 15 14 13 12 11 10 07 06 05 04 03 02 01 00
rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh
The bits in the Transaction Request State Register indicates which DMA channel is
processing a request, and which DMA channel has hardware transaction requests
enabled.
DMA_TRSR
DMA Transaction Request State Register
(014H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
HT HT HT HT HT HT HT HT HT HT HT HT HT HT HT HT
RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE
17 16 15 14 13 12 11 10 07 06 05 04 03 02 01 00
rh rh rh rh rh rh rh rh rh rh rh rh rh rh rh rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CH CH CH CH CH CH CH CH CH CH CH CH CH CH CH CH
17 16 15 14 13 12 11 10 07 06 05 04 03 02 01 00
rh rh rh rh rh rh rh rh rh rh rh rh rh rh rh rh
The bits in the Software Transaction Request Register are used to generate a DMA
transaction request by software.
DMA_STREQ
DMA Software Transaction Request Register
(018H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SCH SCH SCH SCH SCH SCH SCH SCH SCH SCH SCH SCH SCH SCH SCH SCH
17 16 15 14 13 12 11 10 07 06 05 04 03 02 01 00
w w w w w w w w w w w w w w w w
Note: Register bits marked with “w” are virtual and are not stored in flip-flops. Reading
STREQ returns 0 when read.
The bits in the Hardware Transaction Request Register enable or disable DMA hardware
requests.
DMA_HTREQ
DMA Hardware Transaction Request Register
(01CH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
DCH DCH DCH DCH DCH DCH DCH DCH DCH DCH DCH DCH DCH DCH DCH DCH
17 16 15 14 13 12 11 10 07 06 05 04 03 02 01 00
w w w w w w w w w w w w w w w w
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ECH ECH ECH ECH ECH ECH ECH ECH ECH ECH ECH ECH ECH ECH ECH ECH
17 16 15 14 13 12 11 10 07 06 05 04 03 02 01 00
w w w w w w w w w w w w w w w w
The Enable Error Register describes how the DMA controller reacts to errors. It enables
the interrupts for the loss of a transaction request or Move Engine errors.
DMA_EER
DMA Enable Error Register (020H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
E E E E
TRLINP ME1INP ME0INP ME1 ME1 ME0 ME0
DER SER DER SER
rw rw rw rw rw rw rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
E E E E E E E E E E E E E E E E
TRL TRL TRL TRL TRL TRL TRL TRL TRL TRL TRL TRL TRL TRL TRL TRL
17 16 15 14 13 12 11 10 07 06 05 04 03 02 01 00
rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw
The Error Status Register indicates if the DMA controller couldn’t answer to a request
because the previous request was not terminated (see Section 12.1.4.4). It indicates
also the FPI Bus accesses that have been terminated with errors.
DMA_ERRSR
DMA Error Status Register (024H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
MLI LEC MLI LEC FPI1 FPI0 ME1 ME1 ME0 ME0
0
1 ME1 0 ME0 ER ER DER SER DER SER
rh rh rh rh r rh rh rh rh rh rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TRL TRL TRL TRL TRL TRL TRL TRL TRL TRL TRL TRL TRL TRL TRL TRL
17 16 15 14 13 12 11 10 07 06 05 04 03 02 01 00
rh rh rh rh rh rh rh rh rh rh rh rh rh rh rh rh
The Clear Error Register contains bits that make it possible to clear the Transaction
Request Lost flags or the Move Engine error flags.
DMA_CLRE
DMA Clear Error Register (028H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
C C C C C C
CLR CLR
0 0 FPI1 FPI0 ME1 ME1 ME0 ME0
MLI1 MLI0
ER ER DER SER DER SER
w r w r w w w w w w
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CTL CTL CTL CTL CTL CTL CTL CTL CTL CTL CTL CTL CTL CTL CTL CTL
17 16 15 14 13 12 11 10 07 06 05 04 03 02 01 00
w w w w w w w w w w w w w w w w
DMA_INTSR
DMA Interrupt Status Register (054H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
IPM IPM IPM IPM IPM IPM IPM IPM IPM IPM IPM IPM IPM IPM IPM IPM
17 16 15 14 13 12 11 10 07 06 05 04 03 02 01 00
rh rh rh rh rh rh rh rh rh rh rh rh rh rh rh rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ICH ICH ICH ICH ICH ICH ICH ICH ICH ICH ICH ICH ICH ICH ICH ICH
17 16 15 14 13 12 11 10 07 06 05 04 03 02 01 00
rh rh rh rh rh rh rh rh rh rh rh rh rh rh rh rh
The Wrap Status Register gives information about the channels that did a wrap-around
on their source or destination buffer(s). This condition can also lead to an interrupt if it is
enabled.
DMA_WRPSR
DMA Wrap Status Register (05CH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
WRP WRP WRP WRP WRP WRP WRP WRP WRP WRP WRP WRP WRP WRP WRP WRP
D17 D16 D15 D14 D13 D12 D11 D10 D07 D06 D05 D04 D03 D02 D01 D00
rh rh rh rh rh rh rh rh rh rh rh rh rh rh rh rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
WRP WRP WRP WRP WRP WRP WRP WRP WRP WRP WRP WRP WRP WRP WRP WRP
S17 S16 S15 S14 S13 S12 S11 S10 S07 S06 S05 S04 S03 S02 S01 S00
rh rh rh rh rh rh rh rh rh rh rh rh rh rh rh rh
The bits in the Interrupt Clear Register make it possible to clear the channel interrupt
flags and the wrap buffer interrupt flags for DMA Channels mx.
DMA_INTCR
DMA Interrupt Clear Register (058H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
C C C C C C C C C C C C C C C C
WRP WRP WRP WRP WRP WRP WRP WRP WRP WRP WRP WRP WRP WRP WRP WRP
17 16 15 14 13 12 11 10 07 06 05 04 03 02 01 00
w w w w w w w w w w w w w w w w
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
C C C C C C C C C C C C C C C C
ICH ICH ICH ICH ICH ICH ICH ICH ICH ICH ICH ICH ICH ICH ICH ICH
17 16 15 14 13 12 11 10 07 06 05 04 03 02 01 00
w w w w w w w w w w w w w w w w
DMA_MESR
DMA Move Engine Status Register (030H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ME1 ME1 ME0 ME0
RBT1 CH1 RBT0 CH0
WS RS WS RS
rh rh rh rh rh rh rh rh
The Move Engine m (m = 0,1) Read Register indicates the value that has just been read
by Move Engine m. The value in this register is compared to the bits in register MEmPR
according to the bit fields CHCR0x.PATSEL.
DMA_ME0R
DMA Move Engine 0 Read Register
(034H) Reset Value: 0000 0000H
DMA_ME1R
DMA Move Engine 1 Read Register
(038H) Reset Value: 0000 0000H
31 24 23 16 15 8 7 0
rh rh rh rh
The Move Engine m (m = 0,1) Pattern Register contains the patterns (mask and/or
compare bits) to be processed by the pattern detection logic in Move Engine m.
DMA_ME0PR
DMA Move Engine 0 Pattern Register
(03CH) Reset Value: 0000 0000H
DMA_ME1PR
DMA Move Engine 1 Pattern Register
(040H) Reset Value: 0000 0000H
31 24 23 16 15 8 7 0
rw rw rw rw
The DMA Move Engine m (m = 0,1) Access Enable Register controls the access
protection. It enables/disables the address protection ranges n (n = 0-31) for Move
Engine m.
DMA_ME0AENR
DMA Move Engine 0 Access Enable Register
(044H) Reset Value: 0000 0000H
DMA_ME1AENR
DMA Move Engine 1 Access Enable Register
(04CH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
AEN AEN AEN AEN AEN AEN AEN AEN AEN AEN AEN AEN AEN AEN AEN AEN
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
AEN AEN AEN AEN AEN AEN AEN AEN AEN AEN AEN AEN AEN AEN AEN AEN
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw
Note: See Table 12-11 on Page 12-98 for the TC1796 specific address range definition.
The DMA Move Engine m (m = 0,1) Access Range Register determines number and size
of the sub-ranges for address range extension n (n = 0-3). See also Figure 12-28 for bit
field definitions.
DMA_ME0ARR
DMA Move Engine 0 Access Range Register
(048H) Reset Value: 0000 0000H
DMA_ME1ARR
DMA Move Engine 1 Access Range Register
(050H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
rw rw rw rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw rw rw rw
Note: See Section 12.3.2 on Page 12-98 for the TC1796 specific address range and
address range extension definitions.
DMA_CHCR0x (x = 0-7)
DMA Channel 0x Control Register
(x*20H+84H) Reset Value: 0000 0000H
DMA_CHCR1x (x = 0-7)
DMA Channel 1x Control Register
(x*20H+184H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
CH
DMA CH RRO
0 0 0 PATSEL 0 CHDW MO BLKM
PRIO PRIO AT
DE
r rw r rw r rw r rw rw rw rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PRSEL 0 TREL
rw r rw
The Channel Status Register contains the current transfer count and a pattern detection
compare result.
DMA_CHSR0x (x = 0-7)
DMA Channel 0x Status Register
(x*20H+80H) Reset Value: 0000 0000H
DMA_CHSR1x (x = 0-7)
DMA Channel 1x Status Register
(x*20H+180H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LXO 0 TCOUNT
rh r rh
DMA_CHICR0x (x = 0-7)
DMA Channel 0x Interrupt Control Register
(x*20H+88H) Reset Value: 0000 0000H
DMA_CHICR1x (x = 0-7)
DMA Channel 1x Interrupt Control Register
(x*20H+188H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
WRP WRP
IRDV INTP WRPP INTCT
DE SE
rw rw rw rw rw rw
Note: The interrupt node of the wrap-around interrupts is shared with the pattern match
interrupt. In order to support interrupt generation in case of a pattern match, the
wrap-around interrupt should be disabled. If the wrap-around interrupts are used,
the pattern match interrupt should not be used. The settings are independent for
each DMA channel.
The Address Control Register controls how source and destination addresses are
updated after a DMA move. Furthermore, it determines whether or not a source or
destination address register update is shadowed.
DMA_ADRCR0x (x = 0-7)
DMA Channel 0x Address Control Register
(x*20H+8CH) Reset Value: 0000 0000H
DMA_ADRCR1x (x = 0-7)
DMA Channel 1x Address Control Register
(x*20H+18CH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0 SHCT
r rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw rw rw rw rw rw
Table 12-8 shows the offset values that are added or subtracted to/from a source or
destination address register after a DMA move. Bit field SMF and bit INCS determine the
offset value for the source address. Bit field DMF and bit INCD determine the offset value
for the destination address.
DMA_SADR0x (x = 0-7)
DMA Channel 0x Source Address Register
(x*20H+90H) Reset Value: 0000 0000H
DMA_SADR1x (x = 0-7)
DMA Channel 1x Source Address Register
(x*20H+190H) Reset Value: 0000 0000H
31 0
SADR
rwh
A write to SADRmx is executed directly only when the DMA channel mx is inactive
(CHSRmx.TCOUNT = 0 and TRSR.CHmx = 0). If DMA channel mx is active when
writing to SADRmx, the source address will not be written into SADRmx directly but will
be buffered in the shadow register SHADRmx until the start of the next DMA transaction.
During this shadowed address register operation, bit field ADRCRmx.SHCT must be set
to 01B.
The Destination Address Register contains the 32-bit destination address. If a DMA
channel is active, DADRmx is updated continuously (if programmed) and shows the
actual destination address that is used for write moves within DMA transfers.
DMA_DADR0x (x = 0-7)
DMA Channel 0x Destination Address Register
(x*20H+94H) Reset Value: 0000 0000H
DMA_DADR1x (x = 0-7)
DMA Channel 1x Destination Address Register
(x*20H+194H) Reset Value: 0000 0000H
31 0
DADR
rwh
A write to DADRmx is executed directly only when the DMA channel mx is inactive
(CHSRmx.TCOUNT = 0 and TRSR.CHmx = 0). If DMA channel mx is active when
writing to DADRmx, the source address will not be written into DADRmx directly but will
be buffered in the shadow register SHADRmx until the start of the next DMA transaction.
During this shadowed address register operation, bit field ADRCRmx.SHCT must be set
to 10B.
The Shadow Address Register holds the shadowed source or destination address before
it is written into the source or destination address register. SHADRmx can be read only.
DMA_SHADR0x (x = 0-7)
DMA Channel 0x Shadow Address Register
(x*20H+98H) Reset Value: 0000 0000H
DMA_SHADR1x (x = 0-7)
DMA Channel 1x Shadow Address Register
(x*20H+198H) Reset Value: 0000 0000H
31 0
SHADR
rh
Interface 0
FPI Bus
System
DMA
Peripheral
Request Channels
Bus
Selection/ 00-07
Arbitration
DMA
Transaction
Requests
Interface 1
Control Unitl
FPI Bus
of Remote
On-chip CH0n_OUT
Bus Peripheral
Periph. Switch Bus
Units
DMA Sub-Block 1
DMA
MLI0
Request Channels
Selection/ 10-17
Interface
Arbitration
MLI
Address MLI1
Transaction
Decoder Control Unit
CH1n_OUT Memory
Checker
DMA
Arbiter/
Interrupt DMA Interrupt Control
SR[7:0] Switch
Nodes
Control
3
SCU
4
1 System Interrupt Nodes MLI Interrupt Nodes
Flash
2
MCA05707
In the TC1796, two internal memory areas are assigned for access protection using
programmable address sub-ranges:
• 8-Kbyte Dual-Ported RAM (DPRAM), assigned as address range 18. The sub-ranges
are controlled by bit fields MEmARR.SIZE0 and MEmARR.SLICE0.
• 64-Kbyte SRAM, assigned as address range 29. The sub-ranges are controlled by
bit fields MEmARR.SIZE1 and MEmARR.SLICE1.
Bit fields SIZE0 and SLICE0 for the DPRAM sub-range access protection are coded as
shown in Table 12-12.
Bit fields SIZE1 and SLICE1 for the SRAM sub-range access protection (with address
translation from E800 to C000) are coded as shown in Table 12-13.
• Eight interrupt requests SR[7:0] = INT_O[7:0] from the DMA controller; upper eight
interrupt requests of the DMA controller INT_O[15:8] are not connected.
• Four interrupt requests SR[3:0] = INT_O[3:0] from the MLI0 module; upper four
interrupt requests of the MLI0 module INT_O[7:4] are not connected.
• Two interrupt requests SR[1:0] = INT_O[1:0] from the MLI1 module; upper six
interrupt requests of the MLI0 module INT_O[7:2] are not connected.
• Four system interrupts SR[3:0] from the SCU.
MLI0_FDR MLI1_FDR
fMLI0 fMLI1
Address
Decoder
SR[3:0]
SR[7:0] 16 8 8
Interrupt
SR[3:0]
Control
in DMA SR[1:0]
Module
Figure 12-32 Implementation of the DMA Module and the MLI Modules
DMA_CLC
DMA Clock Control Register (000H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FS SB SP
0 0 DISS DISR
OE WE EN
r rw w rw rw r rw
DMA_SRCx (x = 0-7)
DMA Service Request Control Register x
(2FCH-x*4H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SET CLR
SRR SRE 0 TOS 0 SRPN
R R
w w rh rw r rw r rw
DMA_MLI0SRCx (x = 0-3)
DMA MLI0 Service Request Control Register x
(2ACH-x*4H) Reset Value: 0000 0000H
DMA_MLI1SRCx (x = 0-1)
DMA MLI1 Service Request Control Register x
(2BCH-x*4H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SET CLR
SRR SRE 0 TOS 0 SRPN
R R
w w rh rw r rw r rw
Note: The bit coding of the MLI0/MLI1 service request registers is identical to that of the
DMA Service Request Control Registers shown on the previous page.
DMA_SYSSRCx (x = 0-4)
DMA System Interrupt Service Request Control Register x
(29CH-x*4H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SET CLR
SRR SRE 0 TOS 0 SRPN
R R
w w rh rw r rw r rw
Note: The bit coding of the system interrupt service request control registers is identical
to that of the DMA service request control registers shown two pages before.
F000 3E78H
DMA Channel
10 - 17
Registers
F000 3D80H
DMA Channel
00 - 07
Registers
F000 3C80H
DMA
F000 3C54H Control/Status Registers
DMA
Control/Status Registers
F000 3C10H
G32 = x32+ x26+ x23+ x22+ x16+ x12+ x11+ x10+ x8+ x7+ x5+ x4+ x2+ x +1 (12.1)
Note: Although the polynomial above is used for generation, the generation algorithm
differs from the one that is used by the Ethernet protocol.
12.4.2 Registers
This section describes the kernel registers of the Memory Checker module.
MCHK_IR MCHK_ID
MCHK_RR MCHK_WR
MCA05711_mod
MCHK_ID
Memory Checker Module Identification Register
(008H) Reset Value: 001B C0XXH
31 16 15 8 7 0
r r r
The Memory Checker Input Register is used during write moves of a memory checker
related DMA transaction as data destination with its fixed register address. If the DMA
moves to register MCHK_IR are 8-bit or 16-bit wide, the unused register bits of the 32-bit
MCHKIN value are taken as 0s for the current result calculation.
MCHK_IR
Memory Checker Input Register (10H) Reset Value: 0000 0000H
31 0
MCHKIN
Note: MCHK_IR is a write-only register. Any read action will deliver 0000 0000H.
The Memory Checker Result Register contains the result of the memory check
operation. Before starting a checksum calculation operation, it should be written with an
initial checksum calculation value.
MCHK_RR
Memory Checker Result Register (14H) Reset Value: 0000 0000H
31 0
MCHKR
rwh
The Memory Checker Write Register is a dummy write-only register that is located within
the memory checker address range. This register is near by (above) the MLI address
range of the TC1796. It has no meaning for memory checker operation.
The Memory Checker Write Register can be used as dummy write register at the write
back action of the DMA or MLI controller Move Engines when the pattern detection
feature of the DMA controller is used. Accessing MCHK_WR with the Move Engines of
the MLI or DMA controller via the Bus Switch of the DMA controller (see Figure 12-14)
does not request the two FPI buses of the TC1796, SPB and RPB, because it is near the
MLI modules address ranges.
MCHK_WR
Memory Checker Write Register (20H) Reset Value: 0000 0000H
31 0
WO
32
Data Bus
24
Address Bus
External
13 Bus
Control Lines 64 To/From Program
Unit
5 Local Memory Bus
Chip Select
Lines EBU
Clock Output
Clock Input
MCA05712
Asynchronous
Access
State Machine
Control
Master
Lines
PLMB Interface
64
Burst Access Program
State Machine PLMB 64 Local
Data
32 Memory
Slave
Region Bus
Arbitration External Bus Selection PLMB
Signals Arbitration Address
Note: After reset, all EBU pins (except BFCLKO and BFCLKI) have an internal pull-up
device connected. These pull-up devices can be disconnected together by setting
bit SCU_CON.EPUD.
Note: The TC1796 does not directly support for 8-bit data bus width. When 8-bit wide
devices are used they must be arranged in pairs to implement either a 16-bit or a
32-bit wide memory region.
The third read/write control line, MR/W, can be used to connect external devices directly
to an asynchronous Motorola-style bus interface. MR/W goes to a low level during a write
cycle, and will stay at high during a read cycle.
The BCx lines are not activated during Burst Mode cycles.
Signals BCx can be programmed for different timing. The available modes cover a wide
range of external devices, such as RAM with separate byte write-enable signals, and
RAM with separate byte chip select signals. This allows external devices to connect
without any external “glue” logic.
Two components that are equipped with the EBU arbitration protocol can be directly
connected together (without additional external logic) as shown below:
HOLD HOLD
HLDA HLDA
Arbiter User
BREQ BREQ
MCA05714
HOLD 1) 4)
(EBU Input)
≥1 Cycle
HLDA 2) 5)
(EBU Output)
2 Cycles
1 Cycle
BREQ 3) 6)
(EBU Output)
1. The external master wants to perform an external bus access by asserting a low
signal on the HOLD input.
2. When the EBU is able to release bus ownership, it enters Hold Mode by tri-stating its
bus interface lines and drives HLDA = 0 to indicate that it has released the bus. At
this point, the external master ia allowed to drive the bus.
3. Two clock (LMBCLK) cycles after issuing HLDA low, the EBU drives BREQ low in
order to regain bus ownership. This bus request is issued whether or not the EBU has
a pending external bus access. However, the external master will ignore this signal
until it has finished its bus access. This scheme assures that the external master can
perform at least one complete external bus access.
4. When the external master has completed its access, it tri-states its bus interface and
sets HOLD to inactive (high) level to signal that it has released the bus back to the
EBU.
5. When the EBU detects that the bus has been released, it returns HLDA to high level
and returns to Owner Mode by actively driving the bus interface lines. There is always
at least one clock (LMBCLK) cycle delay from the release of the HOLD input to the
EBU driving the bus.
6. Finally, the EBU deactivates the BREQ signal one clock (LMBCLK) cycle after
deactivation of HLDA. Now (and not earlier) the external master can generate a new
hold request to the EBU.
This sequence assures that the EBU can perform at least one complete bus cycle before
it re-enters Hold Mode as a result of a request from the external master.
The conditions that cause change of bus ownership when the EBU is operating in Arbiter
Mode are shown in Figure 13-5.
Start
While EXTLOCK = 1
Perform Appropriate or
PLMB access yes External Bus Access Until all current/queued external
to external bus (for read access return accesses are completed.
is starting? result to PLMB)
When the external master requests
no the external bus (HOLD = 0) and
conditions are appropriate the EBU
releases ownership of the bus by
EBU_CON. yes HLDA = 0.
EXTLOCK = 1?
no
no
HOLD = 0?
yes
yes
HOLD = 0?
no
MCA05716
BREQ 1) 5)
(EBU Output) 7) 8)
≥1 Cycle
HLDA 2) 6)
(EBU Output)
≥1 Cycle
HOLD 4)
(EBU Input)
≥1 Cycle
External Bus Ext. Master on Bus 3) EBU on Bus Ext. Master on Bus
MCT05717
Start
yes
no
MCA05718
Figure 13-7 Bus Ownership Control with the EBU in Participant Mode
no yes
Arbitration Mode =
"No Bus"?
yes
Done
MCA05719
As shown in Figure 13-8, this event also triggers the EBU to arbitrate with the external
master in order to attempt to gain ownership of the external bus so that the request can
be serviced when it is re-submitted by the master. This strategy ensures that the PLMB
remains available while the EBU arbitrates for the external bus.
Further details about EBU start-up mode selection after reset are defined in Table 4-3
on Page 4-12.
13.4.1 Disabled
The EBU will come up with access to the external bus disabled after reset (i.e. no access
from PLMB to external memory is possible without EBU re-configuration).
Command Delay
Address Phase Phase Command Phase
(96 LMB_CLK (224 LMB_CLK (224 LMB_CLK
cycles) cycles) cycles)
LMBCLK
Write Data
AP0 AP95 CD0 CD223 CP0 CP223 to BUSCON
Register
A[23:0] 000004H X
CS0
BC[3:0]
RD
D[31:0] Data in
Sample
MCT05720
RES32
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CON
WAI AALI
F32 CMULT BCGEN WAIT ADDRC WAITRDC RES
TINV GN
BIT
The “compare” action means that the EBU compares the supplied PLMB address to all
its external regions. If a match is found, the EBU performs the appropriate external bus
access. Otherwise, the EBU generates a PLMB Error Acknowledge.
The “access registers” action means that the EBU is selected for a control/status register
access. The EBU performs the requested register access (or generates an PLMB Error
Acknowledge if there is no register at the supplied address).
For all address ranges that not listed in Table 13-9 the EBU is not selected and PLMB
requests are ignored.
Table 13-11 lists the programmable parameters that are available for the five external
regions (region 0 to 3 and the emulator memory region).
EBU_CON SCU_CON
Bit Field Bit Bit Bit Bit CSG CSO CSE
GLOBALCS 19 18 17 16 EN EN EN
1)
1 0
CS3
CS3
1
& 1 0
CSGLB 1
1 0
CS2 1
CS2
EBU 1 0
Control CS1 1
CS1
1 0
CS0 CS0
1
CSEMU &
1 0
CSCOMB
1
1 0
1
& 1 0
CSOVL 1
1 0
1
EBU_EMUOVL
Bit Bit Bit Bit Bit Field
1 0 3 2 1 0 OVERLAY
1
1 0
1) Bit CSEEN is set after reset. Bits CSOEN and CSGEN are cleared after reset MCA05721
WRITE 31 30 28 27
LMB
EBU_BUSCONx
Write ? AGEN
Register
& ≥1
7
Burst
9 8 Mode?
31 28 27 26 12 11 0
LMB Address
15 15
5
Region 6 4
Equal ?
Selected
≥1
&
10 &
4 Equal ?
Equal ?
2 1
3
31 28 27 26 12 11 8 7 4 1 0
EBU_ADDRSELx
ALTSEG MASK
Register
17 16 15 14 0
3. The most significant four bits of the PLMB address (“main” segment address) are
compared to the most significant four bits of the BASE bit field. The result of the
comparison (1 if equal, otherwise 0) is fed to the OR gate.
4. The OR gate combines the result of the “main” and “alternate” segment comparisons
generates a 1 if the PLMB address is in the selected segment(s) for the region,
otherwise it generates 0. The output of the OR gate is fed to the final AND gate.
5. Bit 27 of the PLMB address is (unconditionally) compared with bit 15 of the BASE bit
field. The result of the comparison (1 if equal, otherwise 0) is fed to the final AND
gate.
6. The appropriate number of PLMB address bits from bit 26 downwards is compared
with the corresponding bits from bit field BASE bit 14 downwards. The number of bits
used for the comparison is controlled by the MASK bit field. The result of the
comparison (1 if the appropriate bits are equal, otherwise 0) is fed to the final AND
gate.
7. The comparator checks whether the access is a Burst Flash access of Type 0
(AGEN = 010B) or of Type 1 (AGEN = 101B). The output of the comparator is fed to
an OR gate.
8. The OR gate produces a 1 if the region is a read-only region (for example a Burst
Flash access) that is write-protected via the write bit. The output of the OR gate is fed
to a NAND gate.
9. The NAND gate delivers a 0 if a write is performed to a read-only region, and prevents
the region from being selected. The output of the NAND gate is fed to the final AND
gate.
10. The final AND gate delivers a 1 if a match occurs at the address comparison, and the
region x is enabled by REGENAB = 1, and the access is not a write access when the
region is defined as read-only access.
This address decoding scheme has the following effects:
• The smallest possible address region is 212 bytes (4 Kbyte)
• The largest possible address region is 227 bytes (128 Mbyte)
• The start address of a region depends on the size of the region. It must be at an
address that is a multiple of the size of a region; for example, the smallest region can
be placed on any 4-Kbyte boundary, while the largest region can be placed on
8-Mbyte boundaries only.
Table 13-12 shows the possible region sizes and start granularity, as determined by the
programming of the MASK bit field. The range of the offset address within such a region
is also given.
Table 13-12 EBU Address Regions Size and Start Address Relations
MASK No. of Address Range of Address Region Size and Range of Offset
Bits compared Bits compared to Start Address Address Bits
to BASE[26:12] BASE[26:12] Granularity within Region
1111B 15 A[26:12] 4 Kbyte A[11:0]
1110B 14 A[26:13] 8 Kbyte A[12:0]
1101B 13 A[26:14] 16 Kbyte A[13:0]
1100B 12 A[26:15] 32 Kbyte A[14:0]
1011B 11 A[26:16] 64 Kbyte A[15:0]
1010B 10 A[26:17] 128 Kbyte A[16:0]
1001B 9 A[26:18] 256 Kbyte A[17:0]
1000B 8 A[26:19] 512 Kbyte A[18:0]
0111B 7 A[26:20] 1 Mbyte A[19:0]
0110B 6 A[26:21] 2 Mbyte A[20:0]
0101B 5 A[26:22] 4 Mbyte A[21:0]
0100B 4 A[26:23] 8 Mbyte A[22:0]
0011B 3 A[26:24] 16 Mbyte A[23:0]
0010B 2 A[26:25] 32 Mbyte1) A[24:0]
1)
0001B 1 A[26] 64 Mbyte A[25:0]
1)
0000B 0 – 128 Mbyte A[26:0]
1) These region size selections do not affect the external address bus of the TC1796 because A24, A25,and A26
are not output at pins (only A[23:0] are available at TC1796 pins).
The EBU uses the five region select outputs from the above scheme, in conjunction with
its own address decode logic, to react to PLMB accesses as follows:
1. Address is in the EBU register space:
An EBU register access is executed, and in case of a illegal register address, PLMB
Error Acknowledge is retuned.
2. Address matches exactly one enabled external region:
The requested access is performed to external memory.
3. Address matches more than one enabled region (overlapping regions):
The requested access is performed using the parameters from the region with
highest priority. The region with the lowest region number x (region 0) has the highest
priority. The emulator region has lowest priority).
4. Address matches disabled region(s) or no address match:
The EBU returns a PLMB Error Acknowledge.
When defining mirrored segments, the user is responsible for ensuring that there is no
collision. There is no checking mechanism in hardware that ensures that each segment
defined (either in BASE[31:28] or ALTSEG[11:8] or both) is exclusive. Therefore, the
user must ensure that each mapping from region 0 to 3 and the emulator region does not
interfere with any other; otherwise, only the mapping with the highest priority will take
effect.
No Match Error
Region 0 Access
Addr. Compare Parameter
Region 1 Check
Addr. Compare Region
Latched Region Matched
Region 2 3
PLMB Arbi-
Addr. Compare
Address tration
Region 3 Region 0
Addr. Compare Parameters
Emulator Region Region 1
Addr. Compare Parameters
Selection
Region 2
Parameters
Region 3
Parameters
Emul. Region
Parameters
The next cycle (Cycle n + 3) sees these parameters being passed to the appropriate
external access cycle state machine (used to select/initialize the appropriate external
access cycle, and also to select the external bus pins to be used for the access cycle).
Write Protection
Each address region has an associated bit to provide write protection (programmable
separately for each region). Write protection is controlled by the WRITE bit in the
EBU_BUSCONx and EBU_EMUBC registers.
Writing to the area occupied by a write-protected region will only generate an error if
there is not a lower-priority region programmed for write accesses at the matching
address (i.e. if the access causes no regions to be selected).
Data64
PLMB Data
[63:32] Data32 DataMS16
Buffers EBU
(most sig. [31:16] [31:16]
Data Bus
32 bits) Pins
Buffer 1
D[31:16]
Buffer 3
Data32[31:0]
Data32
[31:16]
DataLS16
EBU
Buffer 4 [15:0]
Data Bus
Pins
Data32
D[15:0]
Data64 [15:0]
PLMB Data
[31:0]
Buffers
(least sig. Buffer 5
32 bits)
Buffer 2
MCA05724
When alignment is not enabled (default after reset) for a region, the EBU will issue a byte
address to the external bus.
MCA05725
modified bits in an external peripheral), the user’s software must ensure data coherency
through the use of the DLOAD bit(s).
When the EBU receives an external bus read access that represents a code fetch (i.e.
was generated by the PMU) to a memory region with “pre-fetch” enabled (via bit
PREFETCH in registers EBU_BUSCON or EBU_EMUBC), the EBU will perform a code
prefetch into the Code Prefetch Buffer.
Note: The Data Write Buffer can only store the data associated with a single write
access. If the EBU receives a PLMB request for a write to the external bus and the
Data Write Buffer is not available (i.e. a previous write is still pending or
underway), the EBU will return an PLMB Retry acknowledge.
For the case where the Data Write Buffer holds the requested read data, a
programmable bypass feature is provided from the Data Write Buffer to the Data Read
Buffer.
• Asserts the MR/W signal according to the type of access to be performed (low in the
case of a write access, not used in burst read cycles). This level is retained until the
start of the next Address Phase.
• At the end of the Address Phase the EBU returns the ADV signal to high.
The length (number of LMBCLK cycles) of the Address Phase is programmed via the
EBU_BUSAPx.ADDRC bit field parameter. Additionally, the length of the Address Phase
selected via ADDRC can be multiplied by the EBU_BUSCONx.CMULT parameter, but
only if bit EBU_BUSCONx.MULTMAP[0] is set (ADDRC multiplier function enabled).
The calculation of the number of LMBCLK cycles in the Address Phase is described in
the following table:
The equivalent control capability is available for bit field EBU_EMUBAP.ADDRC, that
can be multiplied by EBU_EMUBCx.CMULT if bit EBU_EMUBC.MULTMAP[0] is set.
When an access is performed at a burst read cycle, the start of the Address Phase is
always synchronized to a rising edge of the appropriate BFCLK signal (BFCLK0 for
accesses to Type 0 devices and BFCLK1 for accesses to Type 1 devices). This allows
the programming of the EBU to correctly latch the data issued by the Burst Flash.
BFCLKO is used during a burst access to cause a Flash device to output the next
sequential data value.
The equivalent control capability is available for bit fields EBU_EMUBAP.WAITRDC and
EBU_BUSAPx.WAITWRC, which are multiplied by EBU_EMUBC.CMULT.
Additionally, when accessing asynchronous devices, a Command Phase can also be
extended externally using the WAIT signal when the region being accessed is
programmed for external command delay control via bit EBU_BUSCONx.WAIT or
EBU_EMUBC.WAIT.
The Command Phase is further subdivided into:
• CPi (= internally-programmed Command Phase)
• CPe (= externally-prolonged Command Phase, i.e. prolonged by the assertion of the
WAIT signal).
At the start of the Command Phase, the EBU:
• Asserts the appropriate control signal RD or RD/WR low according to the access type
(read or write),
• Issues the data to be written on the data bus D[31:0] (in the case of a write cycle),
• Asserts the appropriate BCx low (in the case where BCx is programmed to be
asserted with the RD or RD/WR signals).
At the end of the Command Phase during an asynchronous access, the EBU:
• Returns the appropriate control signal RD or RD/WR high according to the type of
access type (read or write),
• Latches the data from the data bus D[31:0] (in the case of a read cycle),
• Returns the appropriate BCx high (in the case where BCx is programmed to be
asserted with the RD or RD/WR signals).
The EBU takes no action at the end of the Command Phase during an access to a Burst
Flash device (i.e. no signals are changed or sampled).
During accesses to Burst Flash devices, the Command Phase is always extended by
zero or more LMBCLK cycles to ensure that the end of the Command Phase coincides
with a positive edge of the appropriate BFCLKO (Burst Flash clock output) signal.
The equivalent control capability is available for bit field EBU_EMUBAP.DATAC, which
is multiplied by EBU_EMUBC.CMULT.
Additionally, when accessing Nand Flash Devices, a Data Hold phase can also be
extended externally by asserting the WAIT signal when the region being accessed is
programmed for external data hold delay control via bit field EBU_BUSCONx.WAIT.
The equivalent control capability is available for bit field EBU_EMUBAP.BURSTC, which
is multiplied by EBU_EMUBC.CMULT.
During accesses to Burst Flash devices the length of the Burst Phase must be
programmed such that the end of the Burst Phase always coincides with a positive edge
of the appropriate BFCLKO (Burst Flash Clock) signal.
The EBU implements a “highest wins” algorithm to ensure that the longest applicable
recovery delay is always used between consecutive accesses to the external bus.
Table 13-15 shows the scheme for determining this delay for all possible circumstances.
For example, if a read access to a region associated with CS1 is followed by a write to
a region associated with CS2, the delay will be the highest of DTARDWR, DTACS and
RDRECOVC. In this case, if DTARDWR is greater than DTACS and RDRECOVC, then
the number of recovery cycles between the two accesses is DTARDWR.
A[23:0] A[23:0]
16-Bit
TC1796 D[31:16] Not Memory/
EBU Connected Peripheral
D[15:0] D[15:0] Unit
MCA05726
A[23:0] A[23:0]
32-Bit
TC1796 D[31:16] D[31:16] Memory/
EBU Peripheral
D[15:0] D[15:0] Unit
MCA05727
Figure 13-17 shows a typical connection for Intel-style and Motorola-style peripherals.
The MR/W signal indicates the data direction for the current transfer, and can be used
to control the data direction through the buffer for the D[31:0] bus (as well as controlling
whether an access to a Motorola-Style device is read or write).
A[23:0] A[23:0]
D[31:0] D[31:0]
CSx CE 32-Bit
Intel-style
CSy Device
RD OE
RD/WR WE
MR/W
A[23:0]
TC1796 D[31:0]
EBU 32-Bit
Motorola
AS
-style
R/W Device
WAIT DTACK
MCA05728
LMBCLK1)
AP CD2) CP RP2)
next AP
(1 to n) (0 to n) (1 to n) (0 to n)
ADV
CSx
RD
RD/WR
MR/W
Sample
D[31:0] Data in
BCx 3) 3)
LMBCLK1)
ADV
CSx
RD
RD/WR
MR/W
BCx 3) 3)
Note: Due to the two-cycle delay in Asynchronous Mode between the sampling of the
WAIT input and its evaluation by the EBU, the Command Phase must always be
programmed to be at least two LMBCLK cycles (via EBU_BUSAPx.WAITRDC or
EBU_EMUBAP.WAITWRC) in this mode.
Figure 13-20 shows an example of the extension of the Command Phase through the
WAIT input in synchronous mode:
• At LMBCLK edge 1 (at the end of the Address Phase), the EBU samples the WAIT
input as low and starts the first cycle of the Command Phase (CPi1 - internally
programmed).
• At LMBCLK edge 2, the EBU samples the WAIT input as low and starts an additional
Command Phase cycle (CPe2 - externally generated) as a result of the WAIT input
sampled as low at LMBCLK edge 1.
• At LMBCLK edge 3, the EBU samples the WAIT input as high and starts an additional
Command Phase cycle (CPe3 - externally generated) as a result of the WAIT input
sampled as low at LMBCLK edge 2.
• Finally at LMBCLK edge 4, as a result of the WAIT input sampled as high at point 3,
the EBU terminates the Command Phase, reads the input data from D[31:0] and
starts the Recovery Phase.
Note: Synchronous operation means that even though access to the device may be
asynchronous, the control logic generating the control signals must meet setup
and hold time requirements with respect to LMBCLK.
LMBCLK
A[23:0] Address
CSx
RD
D[31:0] Data in
WAIT
(active low)
1 2 3 4
• Finally at LMBCLK edge 5, as a result of the WAIT input sampled as high at LMBCLK
edge 3, the EBU terminates the Command Phase, reads the input data from
D[31:0],and starts the Recovery Phase.
LMBCLK
A[23:0] Address
CSx
RD
D[31:0] Data in
WAIT
(active low)
1 2 3 4 5
Read Access
LMBCLK
New
AP1 AP2 CDi1 CDi2 CPi1 CPi2 CPi3 RP1 RP2
AP1
CSx
RD
D[31:0] Data in
Sample
Write Access
LMBCLK
New
AP1 AP2 CDi1 CDi2 CPi1 CPi2 DH1 DH2 RP1
AP1
CSx
RD/WR
MCT05733
Read Access
LMBCLK
New
AP1 AP2 CPi1 CPi2 CPe3 CPe4 CPe5 RP1 RP2
AP1
M/RW
D[31:0] Data in
Sample
WAIT 1)
(used as DTACK)
Write Access
LMBCLK
New
AP1 AP2 CPi1 CPi2 CPe3 CPe4 RP1 RP2 RP3
AP1
MR/W
WAIT 1)
(used as DTACK)
A[23:0] A[23:0]
16-Bit
TC1796 D[31:16] Not Burst
EBU Connected FLASH
D[15:0] D[15:0] Memory
MCA05735
A[23:0] A[23:0]
16-Bit
TC1796 D[31:16] D[31:16] Burst
EBU FLASH
D[15:0] D[15:0] Memory
MCA05736
Figure 13-26 shows an example of two basic configurations for external Burst Flash
memory connections.
D[15:0] DQ[15:0]
A[21:2] A[19:0]
CSx CE
1M x 16
TC1796 RD OE Burst
EBU FLASH
RD/WR WE
Memory
ADV ADV
BAA WAIT
CLK
WAIT
BFCLKO
BFCLKI
MCA05737
Figure 13-26 Example Configuration for Connection with Intel/AMD Flash Devices
After reset, the Burst Flash memory devices are normally configured as asynchronous
devices. For operation in Burst Mode, the user’s software must first perform the
appropriate actions to initialize the Burst Flash memory devices for burst operation
(using asynchronous access mode), and then reconfigure the EBU to use the devices in
Burst Mode.
Note: The EBU will issue an LMB Error Acknowledge if an attempt is made to write to an
address that is programmed as Burst Flash unless a lower priority write-enabled
region exists at the same address.
LMBCLK
MCT05738_mod
13.9.9 Control of ADV and BAA Delays During Burst Flash Access
The ADV and BAA signals are delayed by half an LMBCLK clock cycle with respect to
the other control signals of the EBU. This delay can be removed via bit BFCON.EBSEn
(n = 0, 1). The default setting after reset has the delay enabled (EBSEn = 0). Index n
refers to type 0 or type 1 Burst Flash device parameters.
Note: If EBSEn = 0, it must be regarded that the ADV/BAA active/inactive time in respect
to BFCLKO can be negative. More details are defined in the AC timings of the
TC1796 Data Sheet.
LMBCLK
BFCLKO
new
AP1 AP2 AP3 CDi1 CDi2 CDi3 CPi1 CPi2 BP1 BP2 BP1 BP2 BP1 BP2 BP1 BP2 RP1 RP2
AP1
A[23:0] Addr
ADV
Next data
issued by Flash
CSx
RD
BAA
Figure 13-29 shows a burst read access (burst length of four) with a BFCLKO frequency
of 1/3 of LMBCLK frequency (EXTCLOCK = 01B).
LMBCLK
BFCLKO
AP AP AP CD CD CD CP CP BP BP BP BP BP BP BP BP RP RP new
1 2 3 i1 i2 i3 i1 i2 1 2 1 2 1 2 1 2 1 2 AP1
A[23:0] Addr
ADV
Next data
issued by Flash
CSx
RD
BAA
Note: The description in this section assumes a low active WAIT input (WAITINV = 0).
In Wait for Page Load Mode, the WAIT input being asserted low during a burst access
causes the EBU to complete the current Burst Phase and then to perform an additional
Burst Phase (if the previous Burst Phase was not the last of the current burst access
cycle). Following this, the next Burst Phase (again if this Burst Phase required) will not
be started until the WAIT input is de-asserted. Additionally, the start of the next Burst
Phase is also synchronized to the next rising edge of the BFCLKO signal to ensure that
the EBU continues to sample data from the device at the correct time with respect to
BFCLKO. This mode allows, for example, an Intel Burst Flash device to temporarily
suspend the burst sequence in order to perform a page load when a page boundary is
crossed during the access.
The Wait for Page Load Mode supports the use of Intel Burst Flash devices (and
compatibles) configured for Early Wait Generation Mode (EBU_BUSCON.WAIT = 01B)
and standard wait generation (EBU_BUSCON.WAIT = 10B).
In operation, the Burst Flash controller loads a counter with the required number of
samples at the start of each burst. At the end of each Burst Phase, the Burst Flash
controller samples the WAIT input and the data bus. If WAIT is inactive, the sample is
valid, the sample counter is decremented, and the sampled data is passed to the data
path of the EBU. This synchronous sampling means that the validity of the sample can
not be determined until the clock cycle after the end of the burst phase. The Burst Flash
controller in the EBU will therefore overrun and generate extra burst phases until the
sample counter is decremented to zero. Extra data samples returned after the sample
counter is zero will be discarded.
This mode of operation is compatible with the use of clock feedback as, with feedback
enabled, WAIT is fed through the same re-synchronization signals as the data bus. The
only effect on operation is that the number of overrun cycles will increase as the
decrementing of the sample counter will be lagged by the re-synchronization stages.
LMBCLK
BFCLKO
A[23:0] Address
ADV
CSx
RD
BAA
MCT05740
EBU_CLC EBU_EMUAS
EBU_ID EBU_EMUBC
EBU_CON EBU_EMUBAP
EBU_BFCON EBU_EMUOVL
EBU_ADDRSELx
EBU_BUSCONx x = 3-0
EBU_BUSAPx
EBU_USERCON MCA05741_mod
Note: The EBU registers are accessible only through word accesses. Half-word and byte
accesses on EBU registers will generate a bus error.
EBU_ID
EBU Module Identification Register (008H) Reset Value: 0014 C0XXH
31 16 15 8 7 0
r r r
EBU_CLC
EBU Clock Control Register (000H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 DISS DISR
r r rw
Note: While the DISR bit is implemented in the EBU, a request to disable the module will
be ignored. This register is Endinit-protected after initialization. Writing to this
register in this state will cause the EBU to generate an LMB Error.
EBU_CON
EBU Configuration Register (010H)
Reset Value (Internal boot): 0000 0028H
Reset Value (External boot): 0801 0068H
0801 008AH
Reset Value (Emulation mode): 1001 0068H
1001 00A8H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
BF EMU CS0
0 0 GLOBALCS
SSS FAM FAM
r rw rw rw rw rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ARB EXT
ARB
TIMEOUTC SYN LOC 1 0 0
MODE
C K
rw rw rw rw rw rw r
EBU_BFCON
EBU Burst Flash Control Register (020H) Reset Value: 0010 01D0H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
WAI FBB
DBA EBS
0 0 TFU MSE FETBLEN1
1 E1
NC1 L1
r rw rw r rw rw rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
BFC WAI FBB
FDB DBA EBS EXT
DTALTNCY MSE TFU MSE FETBLEN0
KEN 0 E0 CLOCK
L NC0 L0
rw rw rw rw rw rw rw rw rw
EBU_ADDRSELx (x = 0-3)
EBU Address Select Register x (080H+x*8H)
ADDRSEL[3:1] - Reset Value: 0000 0000H
ADDRSEL0 - Reset Value (internal boot): 0000 0000H
ADDRSEL0 - Reset Value (external boot): A000 0001H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
BASE
rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ALT REG
BASE ALTSEG MASK 0 EN EN
AB AB
rw rw rw r rw rw
Note: The actual reset value of the ADDRSEL0 register is not relevant during external
boot modes, as the EBU_CON.CS0FAM bit is set to ensure that region 0 (i.e. CS0)
is activated for all external bus accesses. This allows external boot to be
performed from region 0 regardless of the actual boot address of the CPU to which
EBU is connected.
EBU_BUSCONx (x = 0-3)
EBU Bus Configuration Register (0C0H+x*8H)
Reset Value (internal boot): 8092 8000H
Reset Value (external boot): 8092 807FH
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
PRE
WRI WAI DLO ENDI
AGEN 0 WAIT PORTW BCGEN FET
TE TINV AD AN
CH
rw rw rw rw rw rw rw rw rw rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
WEA
AALI
CMULT 0 CTYPE KPR 0 MULTMAP
GN
EF
rw r rw rw rw r rw
Note: When in external boot mode (see Page 13-21) the reset value of BUSCON0 is
overwritten automatically (subsequent to the release of reset) as a result of the
external Boot Configuration Value fetch.
EBU_BUSAPx (x = 0-3)
EBU Bus Access Parameter Register
(100H+x*8H) Reset Value: FFFF FFFFH
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
rw rw rw rw rw rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw rw rw rw rw
Note: When in external boot mode (see Page 13-21), the reset value of BUSAP0 is
overwritten automatically (subsequent to the release of reset) as a result of the
external Boot Configuration Value fetch.
EBU_EMUAS
EBU Emulator Address Select Register
(160H) Reset Value: DE00 0031H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
BASE
rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ALT REG
BASE ALTSEG MASK 0 EN EN
AB AB
rw rw rw r rw rw
EBU_EMUBC
EBU Emulator Bus Configuration Register
(168H) Reset Value: 0190 2077H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
PRE
WRI WAI DLO ENDI
AGEN 0 WAIT PORTW BCGEN FET
TE TINV AD AN
CH
rw rw rw rw rw rw rw rw rw rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
WEA
AALI
CMULT 0 CTYPE KPR 0 MULTMAP
GN
EF
rw r rw rw rw r rw
EBU_EMUBAP
EBU Emulator Bus Access Parameter Register
(170H) Reset Value: 5248 4911H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
rw rw rw rw rw rw rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw rw rw rw rw
EBU_EMUOVL
EBU Emulator Overlay Register (178H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 OVERLAY
r rw rw
EBU_USERCON
EBU Test/Control Configuration Register
(190H) Reset Value: 0000 0000H
31 1 0
D
0 I
P
r rw
14 Interrupt System
The TC1796 interrupt system provides a flexible and time-efficient means for processing
interrupts. This chapter describes the interrupt system for the TC1796. Topics covered
include the architecture of the interrupt system, interrupt system configuration, and the
interrupt operations of the TC1796 peripherals and Central Processing Unit (CPU).
General information is also given about the Peripheral Control Processor (PCP). For
details about that unit, see Chapter 11.
This chapter also discusses the Non-Maskable Interrupt (NMI) (see Section 14.10 on
Page 14-25).
14.1 Overview
An interrupt request can be serviced either by the CPU or by the PCP. These units are
called “service providers”. Interrupt requests are called “service requests” rather than
“interrupt requests” in this document because they can be serviced by either of the
service providers.
Each peripheral unit in the TC1796 can generate service requests. Additionally, the Bus
Control Units, the Debug Unit, the PCP, and even the CPU itself can generate service
requests to either of the two service providers.
As shown in Figure 14-1, each TC1796 unit that can generate service requests is
connected to one or more Service Request Nodes (SRN). Each SRN contains a Service
Request Control Register mod_SRCx, where “mod” is the identifier of the service
requesting unit and “x” an optional index. Two arbitration buses connect the SRNs with
two Interrupt Control Units (ICUs), which handle interrupt arbitration among competing
interrupt service requests, as follows:
• The Interrupt Control Unit (ICU) arbitrates service requests for the CPU and
administers the CPU interrupt arbitration bus.
• The Peripheral Interrupt Control Unit (PICU) arbitrates service requests for the PCP
and administers the PCP interrupt arbitration bus.
The PCP can make service requests directly to itself (via the PICU), or it can make
service requests to the CPU. The Debug Unit can generate service requests to the PCP
or the CPU. The CPU can make service requests directly to itself (via the ICU), or it can
make service requests to the PCP. The CPU Service Request Nodes are activated
through software.
PCP CPU
Interrupt Interrupt
Arbitration Bus Arbitration Bus
MCB05742
mod_SRC
Service Request Control Register (00H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SET CLR
SRR SRE 0 TOS 0 SRPN
R R
w w rh rw r rw r rw
ICR
ICU Interrupt Control Register (F7E1FE2CH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
C
0 ONE CARBCYC PIPN
CYC
r rw rw rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 IE CCPN
r rwh rwh
If a new service request is received by the ICU before the CPU has acknowledged the
pending interrupt request, the ICU deactivates the pending request and starts a new
arbitration process. This reduces the latency of service requests posted before the
current request is acknowledged. The ICU deactivates the current pending interrupt
request by setting the ICR.PIPN bit field to 0, indicating that the ICU has not yet found a
new valid pending request. It then executes its arbitration process again. If the new
service request has a higher priority than the previous one, its priority will be written to
ICR.PIPN. If the new interrupt has a lower priority, the priority of the previous interrupt
request will again be written to ICR.PIPN. In any case, the ICU will deliver a new interrupt
request to the CPU according to the rules described in this section.
Once the CPU has acknowledged the current pending interrupt request, any new service
request generated by an SRN must wait at least until the end of the next service request
arbitration process to be serviced.
Essentially, arbitration in the ICU is performed whenever a new service request is
detected, regardless of whether or not the CPU is servicing interrupts. Because of this,
the ICR.PIPN bit field always reflects the pending service request with the highest
priority. This can, for example, be used by software polling techniques to determine high-
priority requests while leaving the interrupt system disabled.
Note: If less than four arbitration cycles are selected, the corresponding upper bits of the
SRPNs are not examined, even if they do not contain zeros.
1) Note that, if a context-switch trap occurs while the CPU is in the process of saving the upper context of the
current task, the pending ISR will not be entered, the interrupt request will be left pending, and the CPU will
enter the appropriate trap handling routine instead.
31 12 5 0
BIV 0 0 0 0 0 0 0 0 0
PIPN
OR
8 Words
PN = 255
8 Words
PN = 5
Service PN = 4
Routine (may not be used
may span if spanned by ISR
several with PN = 2)
entries PN = 3
PN = 2
8 Words
PN = 1
8 Words
for example, interrupt 14 is serviced, it can only be interrupted by requests with a priority
number higher than 17; therefore it will not be interrupted by requests from its own
priority group or requests with lower priority.
In Figure 14-4, the interrupt request with priority number 13 can be said to form an
interrupt priority group with just itself as a member.
Setting ICR.CCPN to the maximum value 255 in each service routine has the same
effect as not re-enabling the interrupt system; all interrupt requests can then be
considered to be in the same group.
Interrupt priority groups demonstrate the power of the TC1796 priority-based interrupt-
ordering system. Thus the flexibility of interrupt priority levels ranges from all interrupts
in one group to each interrupt request building its own group, and to all possible
combinations in between.
PN = 255
PN = 18
PN = 17
PN = 16
Priority
PN = 15
Group 2
PN = 14
PN = 13
PN = 12
Priority
PN = 11
Group 1
PN = 10
MCA05745
to process the observation. During this second phase, it may be acceptable for this ISR
to be interrupted by lower-level interrupts. This can be performed as follows.
Say, for example, the initial interrupt priority is fixed very high because response time is
critical. The necessary actions are carried out immediately by the ISR at that high-priority
level. Then the ISR prepares to invoke another ISR at a lower priority level through
software to perform the lower-priority actions.
To invoke an ISR through software, the high-priority ISR directly sets an interrupt request
bit in an SRN that will invoke the appropriate low-priority ISR. Then the high-priority ISR
exits.
When the high-priority ISR exits, the pending low-priority interrupt will eventually be
serviced (depending on the priority of other pending interrupts). When the low-priority
ISR eventually executes, the low-priority actions of the interrupt will be performed.
The inverse of this method can also be employed, wherein a low-priority ISR raises its
own priority level, or leaves interrupts turned off while it executes. For instance, the
priority of a service request might be low because the time to respond to the event is not
critical, but once it has been granted service, this service should not be interrupted. In
this case, the ISR could raise the value of ICR.CCPN to a priority that would exclude
some or all other interrupts, or simply leave interrupts disabled.
Entry in Trap
Handler Routine
no
V2.NMIEXT set?
V1 := SCU_PETSR
yes
no
V2.NMIPER = 1?
no
V2.NMIPLL set?
yes
yes
yes
V1 := SCU_PETSR no
V2.NMIWDT set?
V2 := NMISR yes
Execute Watchdog
NMI Req. Handler
Figure 14-5 NMI Trap Handler Routine for Parity Error Handling
NMISR
NMI Status Register (F000002CH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
NMI NMI NMI NMI
0
PER WDT PLL EXT
r rh rh rh rh
Note: The NMISR register is located in the address range of the System Control Unit
(see Page 5-61).
15 System Timer
15.1 Overview
This chapter describes the System Timer (STM). The TC1796’s STM is designed for
global system timing applications requiring both high precision about long periods. The
STM has the following features:
• Free-running 56-bit counter
• All 56 bits can be read synchronously
• Different 32-bit portions of the 56-bit counter can be read synchronously
• Flexible interrupt generation based on compare match with partial STM content
• Driven by max. 75 MHz clock (= fSYS, default after reset = fSYS/2)
• Counting starts automatically after a reset operation
• STM is reset by:
– Watchdog reset
– Software reset (RST_REQ.RRSTM must be set)
– Power-on reset
• STM (and clock divider STM_CLC.RMC) is not reset at a hardware reset
(HDRST = 0)
• STM can be halted in debug/suspend mode (via STM_CLC register)
Special STM register semantics provide synchronous views of the entire 56-bit counter,
or 32-bit subsets at different levels of resolution.
The maximum clock period is 256 × fSTM. At fSTM = 75 MHz, for example, the STM counts
30.47 years before overflowing. Thus, it is capable of continuously timing the entire
expected product life-time of a system without overflowing.
15.2 Operation
The STM is an upward counter, running either at the system clock frequency fSYS or at a
fraction of it. The STM clock frequency is fSTM = fSYS/RMC with RMC = 0-7 (default after
reset is fSTM = fSYS/2, selected by RMC = 010B). RMC is a bit field in register STM_CLC.
In case of a power-on reset, a watchdog reset, or a software reset, the STM is reset. After
one of these reset conditions, the STM is enabled and immediately starts counting up. It
is not possible to affect the content of the STM during normal operation of the TC1796.
The timer registers can only be read but not written to.
The STM can be optionally disabled for power-saving purposes, or suspended for
debugging purposes via its clock control register. In suspend mode of the TC1796
(initiated by writing an appropriate value to STM_CLC register), the STM clock is
stopped but all registers are still readable.
Due to the 56-bit width of the STM, it is not possible to read its entire content with one
instruction. It needs to be read with two load instructions. Since the timer would continue
to count between the two load operations, there is a chance that the two values read are
not be consistent (due to possible overflow from the low part of the timer to the high part
between the two read operations). To enable a synchronous and consistent reading of
the STM content, a capture register (STM_CAP) is implemented. It latches the content
of the high part of the STM each time when one of the registers STM_TIM0 to STM_TIM5
is read. Thus, STM_CAP holds the upper value of the timer at exactly the same time
when the lower part is read. The second read operation would then read the content of
the STM_CAP to get the complete timer value.
The STM can also be read in sections from seven registers, STM_TIM0 through
STM_TIM6, that select increasingly higher-order 32-bit ranges of the STM. These can
be viewed as individual 32-bit timers, each with a different resolution and timing range.
The content of the 56-bit System Timer can be compared against the content of two
compare values stored in the STM_CMP0 and STM_CMP1 registers. Interrupts can be
generated on a compare match of the STM with the STM_CMP0 or STM_CMP1
registers.
Figure 15-1 is an overview of the STM module. It shows the options for reading parts of
STM content.
STM Module
31 23 15 7 0
31 23 15 7 0
Enable / 00H
Disable STM_CAP
Clock
Control fSTM 00H STM_TIM6
STM_TIM5
Address STM_TIM4
Decoder
STM_TIM3
PORST
STM_TIM2
STM_TIM1
STM_TIM0
MCB05746
MSIZE0
31 23 15 7
Compare Match
MSIZEx = 0-31 Equal ? with STM_CMP0
MSTARTx = 0-24 Register
55 47 39 31 23 15 7
56-Bit System Timer
MSTART1
MSTART0
Compare Match
Equal ? with STM_CMP1
Register
31 23 15 7
MSIZE1 MCA05747
A compare operation with MSIZE not equal 0 always implies that the compared value
stored in the CMP register is right-extended with zeros. This means that in the example
of Figure 15-2, the compare register content STM_CMP0[17:0] plus ten zero bits right-
extended is compared with STM[27:0] with STM[9:0] = 000H. In case of register
STM_CMP1, STM[14:0] with STM[6:0] = 00H are compared to STM_CMP1[7:0] plus
seven zero bits right-extended.
Compare Match 0
from CMP0
Register Set 1
≥1
STMIR0
STM_ICR Register
CMP1 CMP1 CMP1 CMP0 CMP0 CMP0
OS IR EN OS IR EN
Clear ≥1
STMIR1
Set
STM_ISRR Reg.
CMP1 CMP1 CMP0 CMP0
IRS IRR IRS IRR
Set
Clear
Compare Match 0
from CMP1
Register Set 1 MCA05748_mod
The compare match interrupt flags STM_ICR.CMPxIR are immediately set after an STM
reset operation, caused by a compare match event with the reset values of the STM and
the compare registers STM_CMPx. This setting of the CMPxIR flags does not directly
generate compare match interrupts because the compare match interrupts are
automatically disabled after an STM reset (CMPxEN = 0). Therefore, before enabling a
compare match interrupt after an STM reset, the CMPxIR flags should be cleared by
software (writing register STM_ISSR with CMPxIRR set). Otherwise, undesired compare
match interrupt events are triggered accidentally.
STM_CLC
System Timer Clock Control Register (00H) Reset Value: 0000 0200H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FS SB E SP DIS DIS
0 RMC 0
OE WE DIS EN S R
r rw r rw w rw rw r rw
The STM Module Identification Register ID contains read-only information about the
STM module version.
STM_ID
STM Module Identification Register (08H) Reset Value: 0000 C0XXH
31 16 15 8 7 0
r r r
STM_TIM0
STM Timer Register 0 (10H) Reset Value: 0000 0000H
31 0
STM[31:0]
STM_TIM1
STM Timer Register 1 (14H) Reset Value: 0000 0000H
31 0
STM[35:4]
STM_TIM2
STM Timer Register 2 (18H) Reset Value: 0000 0000H
31 0
STM[39:8]
STM_TIM3
STM Timer Register 3 (1CH) Reset Value: 0000 0000H
31 0
STM[43:12]
STM_TIM4
STM Timer Register 4 (20H) Reset Value: 0000 0000H
31 0
STM[47:16]
STM_TIM5
STM Timer Register 5 (24H) Reset Value: 0000 0000H
31 0
STM[51:20]
STM_TIM6
STM Timer Register 6 (28H) Reset Value: 0000 0000H
31 24 23 0
0 STM[55:32]
r r
STM_CAP
STM Timer Capture Register (2CH) Reset Value: 0000 0000H
31 24 23 0
0 STM_CAP[55:32]
r r
Note: The bits in registers STM_CAP to STM_TIM0 are all read-only bits.
STM_CMPx (x = 0-1)
STM Compare Register x (30H+x*4H) Reset Value: 0000 0000H
31 0
CMPVAL
rw
The STM Compare Match Control Register controls the parameters of the compare
logic.
STM_CMCON
STM Compare Match Control Register
(38H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0 MSTART1 0 MSIZE1
r rw r rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 MSTART0 0 MSIZE0
r rw r rw
STM_ICR
STM Interrupt Control Register (3CH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CMP CMP CMP CMP CMP CMP
0 1 1 1 0 0 0 0
OS IR EN OS IR EN
r rw rh rw r rw rh rw
The bits in the STM Interrupt Set/Reset Register make it possible to set or clear the
compare match interrupt request status flags of register ICR.
STM_ISRR
STM Interrupt Set/Reset Register (40H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CMP CMP CMP CMP
0 1 1 0 0
IRS IRR IRS IRR
r w w w w
In the TC1796, the compare match interrupt output signals of the STM, STMIR0 and
STMIR1, are controlled by the STM Service Request Control Registers STM_SRC0 and
STM_SRC1.
STM_SRC0
STM Service Request Control Register 0
(FCH) Reset Value: 0000 0000H
STM_SRC1
STM Service Request Control Register 1
(F8H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SET CLR
SRR SRE 0 TOS 0 SRPN
R R
w w rh rw r rw r rw
Note: Further details of interrupt handling and processing are described in Chapter 14
of this TC1796 System Units (Vol. 1 of 2) User’s Manual
16 Watchdog Timer
This chapter describes the TC1796 Watchdog Timer (WDT). Topics include an overview
of the WDT function and descriptions of the registers, the password-protection scheme,
accessing registers, modes, and initialization.
SCU Module
Reset
fSYS To System
Address ENDINIT
Watchdog Timer (WDT) To System
Decoder
MCA05750
Figure 16-1 Interface of the WDT Inside and Outside the SCU Module
Time-
Time-Out Normal Out Normal Prewarning Time-Out
Mode Mode Mode Mode Mode Mode
FFFFH
6) 7)
FFFCH
1) 5)
REL_2
4)
3)
REL_1
2) 8)
WDT Reset
MCT05751
Reset
Time-Out
Mode
Normal Disable
Mode Mode
Prewarning
Mode
MCA05752
When reading register WDT_CON0, bit positions [7:4] always return 0s. As can be seen
from Table 16-2, the password is designed such that it is not possible to just read the
contents of a register and use this as the password. The password is never identical to
the contents of WDT_CON0 or WDT_CON1, it is always required to modify the read
value (at least bits 1 and [7:4]) to get the correct password. This prevents a malfunction
from accidentally reading a WDT register’s contents and writing it to WDT_CON0 as an
unlocking password.
If the password matches the requirements, WDT_CON0 will be unlocked as soon as the
Password Access has finished. The unlocked condition will be indicated by
WDT_CON0.WDTLCK = 0.
If WDT_CON0 is successfully unlocked, a subsequent write access can modify it, as
described on Page 16-11.
If an improper password value is written to WDT_CON0 during the Password Access, a
Watchdog Access Error condition exists. Bit WDTAE is set and the Prewarning Mode is
entered.
The user-definable password, WDTPW, provides additional options for adjusting the
password requirements to the application’s needs. It can be used, for instance, to detect
unexpected software loops, or to monitor the execution sequence of routines. See
Page 16-24.
Note: In Prewarning Mode, the device does not have to wait for the end of the Time-out
Period and the reset. After having saved required state in the NMI routine,
software can execute a software reset to shorten the time. However, the state of
the Watchdog Status Register should also be saved in this case, since the error
flags contained in it will be cleared due to the software reset (this is not the case
if the Watchdog reset is awaited).
The purpose of the Double Watchdog Error feature is to avoid loops such as: Reset -
software does not start correctly - prewarning - watchdog reset - software does not start
correctly - …
The WDT has an internal counter that generates a constant reset after a second
watchdog error. This counter can be cleared only by external reset sources (power-on
reset or hardware reset).
16 ( 1 – WDTIS ) × 6
( 2 – startvalue ) × 256 × 2
period = ---------------------------------------------------------------------------------------------------------- (16.1)
f SYS
The parameter startvalue represents the fixed value FFFCH for the calculation of the
Time-out Period, and the user-programmable reload value WDTREL for the calculation
of the Normal Period. Note that the exponent (1 - WDTIS) × 6 results to 0 if WDTIS is 1,
and to 6 if WDTIS is 0. This results in the value 256 being multiplied by either 1 (20 = 1)
or by 64 (26), giving the two divider factors 256 and 16384.
Note: Because there is no synchronization of the clock divider to the mode transitions of
the Watchdog, the next clock pulse, incrementing the counter, may come after one
clock divider period, or immediately after the counter was reloaded. Thus, it is
recommended that the reload value is programmed to a value that results in one
clock pulse more than the required period.
The WDT input clock rate can not be changed during the Time-out Period. The control
bit for the input clock rate, WDT_SR.WDTIS, is loaded from WDT_CON1.WDTIR when
WDT_CON0.ENDINIT is set to 1, that is, after Time-Out Mode has been properly exited.
Hence, the new input frequency will become effective only in the subsequent Time-out
Period.
Note: In Prewarning Mode, the device does not need to wait for the end of the Time-out
Period and the reset. After having saved required state in the NMI routine,
software can execute a software reset to shorten the time. However, the state of
the Watchdog Status Register should also be saved in this case, since the error
flags contained in it will be cleared due to the software reset (this is not the case
if the Watchdog reset is awaited).
Because the WDT is in Time-Out Mode after reset, WDT_CON0.ENDINIT must be set
to 1 before the Time-out Period expires. This means that initialization of ENDINIT-
protected system registers must be complete before the expiration of the Time-out
Period, defined on Page 16-18. To set WDT_CON0.ENDINIT to 1, a Valid Password
Access to WDT_CON0 must be performed first. During the subsequent Valid Modify
Access, WDT_CON0.ENDINIT must be set to 1, which will exit Time-Out Mode. The
WDT is switched to the operation determined by the new values of WDTIS and WDTDS.
Note: The action described above must absolutely be performed during initialization of
the device to properly terminate this mode. Even if the Watchdog function will not
be used in an application and the WDT will be disabled, a valid access sequence
to the WDT is mandatory. Otherwise, the Watchdog counter will overflow,
Prewarning Mode will be entered, and a Watchdog reset will occur at the end of
the Time-out Period.
Password access:
write xyH to WDTPW
Service
Sequence
n Modify access:
set WDTPW to 10H
Multiple
Omission Execution
of Service: Password access: of Service:
write 10H to WDTPW
Expected Service Expected
WDTPW = 10H Sequence WDTPW = 11H
n+1 Modify access:
WDTPW set WDTPW to 11H WDTPW
Written = 11H Written = 10H
==> Next expected WDTPW = 11H ==>
Access Error Access Error
Password access:
write 11H to WDTPW
Service
Sequence
n+2 Modify access:
set WDTPW to 12H
service sequence if all the expected paths and calculation routines have been executed
properly. If one or more steps were omitted or a wrong path was executed due to a
malfunction, the Watchdog failure mechanism will detect this and issue a reset of the
device (after the prewarning phase).
Determine branch
condition:
PW := A or B or C
Password access:
write xyH to WDTPW
Service
Sequence
n Modify access:
set WDTPW to PW
Perform
Branch
WDT_CON0 WDT_SR
WDT_CON1
MCA05755
WDT_CON0
Watchdog Timer Control Register 0 (20H) Reset Value: FFFC 0002H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
WDTREL
rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
WDTHPW WDTHPW WDT END
WDTPW
1 0 LCK INIT
rw w w rw rw
WDT_CON1
Watchdog Timer Control Register 1 (24H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
WDT WDT
0 0
DR IR
r rw rw r
WDT_SR
Watchdog Timer Status Register (28H) Reset Value: FFFC 0010H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
WDTTIM
rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
WDT WDT WDT WDT WDT WDT
0
PR TO DS IS OE AE
r rh rh rh rh rh rh
17.1 Overview
The TC1796 supports three levels of debug operation:
• OCDS Level 1
• OCDS Level 2
• OCDS Level 3
OCDS Level 1
The OCDS Level 1 is mainly assigned for real-time software debugging purposes which
have a demand for low-cost standard debugger hardware.
The OCDS Level 1 is based on a JTAG interface that is used by the external debug
hardware to communicate with the system. The on-chip Cerberus module controls the
interactions between the JTAG interface and the on-chip modules. The external debug
hardware may become master of the internal buses, and read or write the on-chip
register/memory resources. The Cerberus also makes it possible to set breakpoint and
trigger conditions as well as to control user program execution (run/stop, break, single-
step).
OCDS Level 2
The OCDS Level 2 makes it possible to implement program tracing capabilities for
enhanced debuggers by extending the OCDS Level 1 debug functionality with an
additional 16-bit wide trace output port with trace clock. With the trace extension, the
following four trace capabilities are provided (only one of the four trace capabilities can
be selected at a time):
• Trace of the CPU program flow
• Trace of the PCP program flow
• Trace of the DMA Controller transaction requests
• Trace of the DMA Controller Move Engine status information
OCDS Level 3
The OCDS Level 3 is based on a Multi-Core Debug Solution (MCDS) using a special
TC1796 emulation device, the TC1796ED. This device has additional features required
for high-end emulation purposes. The TC1796ED includes the TC1796 product chip and
additional emulation extension hardware in a package with the same footprint as the
TC1796. For detailed information about the TC1796ED functionality (e.g. required by
high-end emulation manufacturers), please contact local Infineon representatives.
Figure 17-1 is a block diagram of the TC1796 OCDS based system.
TriCore
SBCU RBCU
CPU
Watchdog
PCP2 Timer
(WDT)
M
TR[15:0] U
X
DMA
Controller
Enable, Control,
Cerberus
R eset Signals
(Bus Bridge)
TRCLK
Break & Suspend Signals
OCDS
System System
SPB
TDI
Peripheral
TDO Unit 1
JTAG
JTAG Debug SPB
TMS
Controller Interface Peripheral
(JDI) Unit m
TCK
TRST RPB
Peripheral
Unit 1
Multi Core
BRKIN
Break RPB
BRKOUT Switch Peripheral
(MCBS) Unit n
MCB05756_mod
Components
The OCDS of the TC1796 consists of the following building blocks:
• OCDS Level 1 module of TriCore
• OCDS Level 2 interface of TriCore
Target
Hardware
Serial
or
PC
Parallel
JTAG
JTAG
Interface
or TC1796
(with Debugger Adapter
USB
Software)
Interface
MCA05757
– Breaks on data/address
Two precise data/address values or one data/address range
No break before make possible (due to pipelined architecture)
– Combinations of the above break conditions
• Real-time features
– Read and write of memory/registers quasi-concurrently, with minimum intrusion
(stealing bus cycles by Cerberus).
– High priority requests can still be serviced when the core is in emulation mode, by
interrupting the monitor program.
Debug
Event
Generation
Debug
Event
Processing
Ext. Break Input
(BRKIN)
Execution of the
DEBUG Instruction
Execution of MTCR /
MFCR Instruction
MCA05758
CPU OCDS
Registers
DBGSR
EXEVT
CREVT
SWEVT
TR0EVT
TR1EVT
CPU_SBSRC0
MCA05759
Features
• 5-pin standard JTAG interface for OCDS Level 1 control
• Generation of external break condition via pins BRKIN/BRKOUT
• Full access to the complete SPB/RPB (FPI) Bus address space via JTAG
• No user resources (hardware/software) are required
• Minimum run-time impact
• Generic memory read/write functionality
• Write word, half-word and byte
• Block read and write
• Full support for communication between an on-chip monitor program and the
external debugger
• Pending reads/writes can be optionally triggered by the OCDS module (memory
tracing)
• Download of programs and data via JTAG
• Control of the OCDS blocks
• Data acquisition
17.4.1 RW Mode
As the name implies, the RW mode is used by a JTAG host to read or write arbitrary
memory locations via the JTAG interface. The RW mode needs the FPI Bus master
interface of the Cerberus to actively request data reads or data writes.
• BYTE (8-bit): If the host wants to read a byte, it has to read the associated word or
half-word. Then the JTAG host has to extract the needed part by itself.
Writing bytes or half-words is supported with the IO_WRITE_BYTE and
IO_WRITE_HWORD JTAG instructions. With these instructions, the JTAG host must
again shift in the full 32-bit word, but only the selected byte or half-word is actually
written. Its exact position is defined by the two lowest address bits in register IOADDR.
TriCore
CPU
BRKIN BRKOUT
BRKOUT
Signals
DMA,
SBCU, RBCU,
MLI0, MLI1
MCA05760_mod
Cerberus Registers
18 Register Overview
This chapter describes all registers of the TC1796 that are located is segment 15. It also
describes the read/write access rights of the specific address ranges/registers.
Throughout the tables in this chapter, the “Access Mode” “Read” and “Write”, and “Reset
Values” columns indicate access rights and values using symbols listed in Section 18-1.
Table 18-33 Address Map of CPU Core SFRs & GPRs (cont’d)
Short Description Address Access Mode Reset Value
Name Read Write
– Reserved F7E1 C020H - nE nE –
F7E1 C3FCH
DPR1_0L Data Seg. Prot. Reg. Set F7E1 C400H U, SV, SV, 0000 0000H
1, Range 0, Lower 32 32
Boundary
DPR1_0U Data Seg. Prot. Reg. Set F7E1 C404H U, SV, SV, 0000 0000H
1, Range 0, Upper 32 32
Boundary
DPR1_1L Data Seg. Prot. Reg. Set F7E1 C408H U, SV, SV, 0000 0000H
1, Range 1, Lower 32 32
Boundary
DPR1_1U Data Seg. Prot. Reg. Set F7E1 C40CH U, SV, SV, 0000 0000H
1, Range 1, Upper 32 32
Boundary
DPR1_2L Data Seg. Prot. Reg. Set F7E1 C410H U, SV, SV, 0000 0000H
1, Range 2, Lower 32 32
Boundary
DPR1_2U Data Seg. Prot. Reg. Set F7E1 C414H U, SV, SV, 0000 0000H
1, Range 2, Upper 32 32
Boundary
DPR1_3L Data Seg. Prot. Reg. Set F7E1 C418H U, SV, SV, 0000 0000H
1, Range 3, Lower 32 32
Boundary
DPR1_3U Data Seg. Prot. Reg. Set F7E1 C41CH U, SV, SV, 0000 0000H
1, Range 3, Upper 32 32
Boundary
– Reserved F7E1 C420H - nE nE –
F7E1 CFFCH
CPR0_0L Code Seg. Prot. Reg. Set F7E1 D000H U, SV, SV, 0000 0000H
0, Rng. 0, Lower 32 32
Boundary
CPR0_0U Code Seg. Prot. Reg. Set F7E1 D004H U, SV, SV, 0000 0000H
0, Rng. 0, Upper 32 32
Boundary
Table 18-33 Address Map of CPU Core SFRs & GPRs (cont’d)
Short Description Address Access Mode Reset Value
Name Read Write
CPR0_1L Code Seg. Prot. Reg. Set F7E1 D008H U, SV, SV, 0000 0000H
0, Rng. 1, Lower 32 32
Boundary
CPR0_1U Code Seg. Prot. Reg. Set F7E1 D00CH U, SV, SV, 0000 0000H
0, Rng. 1, Upper 32 32
Boundary
– Reserved F7E1 D010H - nE nE –
F7E1 D3FCH
CPR1_0L Code Seg. Prot. Reg. Set F7E1 D400H U, SV, SV, 0000 0000H
1, Rng. 0, Lower 32 32
Boundary
CPR1_0U Code Seg. Prot. Reg. Set F7E1 D404H U, SV, SV, 0000 0000H
1, Rng. 0, Upper 32 32
Boundary
CPR1_1L Code Seg. Prot. Reg. Set F7E1 D408H U, SV, SV, 0000 0000H
1, Rng. 1, Lower 32 32
Boundary
CPR1_1U Code Seg. Prot. Reg. Set F7E1 D40CH U, SV, SV, 0000 0000H
1, Rng. 1, Upper 32 32
Boundary
– Reserved F7E1 D410H - nE nE –
F7E1 DFFCH
DPM0 Data Protection Mode F7E1 E000H U, SV, SV, 0000 0000H
Register Set 0 32 32
– Reserved F7E1 E004H - nE nE –
F7E1 E07CH
DPM1 Data Protection Mode F7E1 E080H U, SV, SV, 0000 0000H
Register Set 1 32 32
– Reserved F7E1 E084H - nE nE –
F7E1 E1FCH
CPM0 Code Protection Mode F7E1 E200H U, SV, SV, 0000 0000H
Register Set 0 32 32
– Reserved F7E1 E204H - nE nE –
F7E1 E27CH
Table 18-33 Address Map of CPU Core SFRs & GPRs (cont’d)
Short Description Address Access Mode Reset Value
Name Read Write
CPM1 Code Protection Mode F7E1 E280H U, SV, SV, 0000 0000H
Register Set 1 32 32
– Reserved F7E1 E284H - nE nE –
F7E1 EFFCH
Core Debug Register (OCDS)
DBGSR Debug Status Register F7E1 FD00H U, SV, SV, 0000 0000H
32 32
– Reserved F7E1 FD04H nE nE –
EXEVT External Break Input F7E1 FD08H U, SV, SV, 0000 0000H
Event Specifier Register 32 32
CREVT Core SFR Access Break F7E1FD0CH U, SV, SV, 0000 0000H
Event Specifier Register 32 32
SWEVT Software Break Event F7E1 FD10H U, SV, SV, 0000 0000H
Specifier Register 32 32
– Reserved F7E1 FD14H - nE nE –
F7E1 FD1CH
TR0EVT Trigger Event 0 Specifier F7E1 FD20H U, SV, SV, 0000 0000H
Register 32 32
TR1EVT Trigger Event 1 Specifier F7E1 FD24H U, SV, SV, 0000 0000H
Register 32 32
– Reserved F7E1 FD28H - nE nE –
F7E1 FD3CH
DMS Debug Monitor Start F7E1 FD40H U, SV, U, DE00 0000H
Address Register 32 SV,
32,
NC
DCX Debug Context Save Area F7E1 FD44H U, SV, SV, DE80 0000H
Pointer 32 32
– Reserved F7E1 FD48H - nE nE –
F7E1 FDFCH
Core Special Function Registers (CSFR)
PCXI Previous Context F7E1 FE00H U, SV, SV, 0000 0000H
Information Register 32 32
Table 18-33 Address Map of CPU Core SFRs & GPRs (cont’d)
Short Description Address Access Mode Reset Value
Name Read Write
PSW Program Status Word F7E1 FE04H U, SV, SV, 0000 0B80H
32 32
PC Program Counter F7E1 FE08H U, SV, SV, DFFF FFFCH
32 32 DE00 0000H
– Reserved F7E1 FE0CH - nE nE –
F7E1 FE10H
SYSCON System Configuration F7E1 FE14H U, SV, SV, 0000 0000H
Register 32 32
CPU_ID CPU Identification F7E1 FE18H U, SV, U, 000A C0XXH
Register 32 SV,
NC,
32
– Reserved F7E1 FE1CH nE nE –
BIV Interrupt Vector Table F7E1 FE20H U, SV, SV, 0000 0000H
Pointer 32 E, 32
BTV Trap Vector Table Pointer F7E1 FE24H U, SV, SV, A000 0100H
32 E, 32
ISP Interrupt Stack Pointer F7E1 FE28H U, SV, SV, 0000 0100H
32 E, 32
ICR ICU Interrupt Control F7E1 FE2CH U, SV, SV, 0000 0000H
Register 32 32
– Reserved F7E1 FE30H - nE nE –
F7E1 FE34H
FCX Free Context List Head F7E1 FE38H U, SV, SV, 0000 0000H
Pointer 32 32
LCX Free Context List Limit F7E1 FE3CH U, SV, SV, 0000 0000H
Pointer 32 32
– – F7E1 FE40H - nE nE –
F7E1 FEFCH
CPU Core General Purpose Register (GPRs)2)
D0 Data Register 0 F7E1 FF00H – – XXXX XXXXH
D1 Data Register 1 F7E1 FF04H – – XXXX XXXXH
D2 Data Register 2 F7E1 FF08H – – XXXX XXXXH
Table 18-33 Address Map of CPU Core SFRs & GPRs (cont’d)
Short Description Address Access Mode Reset Value
Name Read Write
D3 Data Register 3 F7E1 FF0CH – – XXXX XXXXH
D4 Data Register 4 F7E1 FF10H – – XXXX XXXXH
D5 Data Register 5 F7E1 FF14H – – XXXX XXXXH
D6 Data Register 6 F7E1 FF18H – – XXXX XXXXH
D7 Data Register 7 F7E1 FF1CH – – XXXX XXXXH
D8 Data Register 8 F7E1 FF20H – – XXXX XXXXH
D9 Data Register 9 F7E1 FF24H – – XXXX XXXXH
D10 Data Register 0 F7E1 FF28H – – XXXX XXXXH
D11 Data Register 11 F7E1 FF2CH – – XXXX XXXXH
D12 Data Register 12 F7E1 FF30H – – XXXX XXXXH
D13 Data Register 13 F7E1 FF34H – – XXXX XXXXH
D14 Data Register 14 F7E1 FF38H – – XXXX XXXXH
D15 Data Register 15 F7E1 FF3CH – – XXXX XXXXH
– Reserved F7E1 FF40H - nE nE –
F7E1 FF7CH
A0 Address Register 0 F7E1 FF80H – – XXXX XXXXH
(Global Address Register)
A1 Address Register 1 F7E1 FF84H – – XXXX XXXXH
(Global Address Register)
A2 Address Register 2 F7E1 FF88H – – XXXX XXXXH
A3 Address Register 3 F7E1 FF8CH – – XXXX XXXXH
A4 Address Register 4 F7E1 FF90H – – XXXX XXXXH
A5 Address Register 5 F7E1 FF94H – – XXXX XXXXH
A6 Address Register 6 F7E1 FF98H – – XXXX XXXXH
A7 Address Register 7 F7E1 FF9CH – – XXXX XXXXH
A8 Address Register 8 F7E1 FFA0H – – XXXX XXXXH
(Global Address Register)
A9 Address Register 9 F7E1 FFA4H – – XXXX XXXXH
(Global Address Register)
A10 Address Register 10 F7E1 FFA8H – – XXXX XXXXH
(Stack Pointer)
Table 18-33 Address Map of CPU Core SFRs & GPRs (cont’d)
Short Description Address Access Mode Reset Value
Name Read Write
A11 Address Register 11 F7E1 FFACH – – XXXX XXXXH
(Return Address)
A12 Address Register 12 F7E1 FFB0H – – XXXX XXXXH
A13 Address Register 13 F7E1 FFB4H – – XXXX XXXXH
A14 Address Register 14 F7E1 FFB8H – – XXXX XXXXH
A15 Address Register 15 F7E1 FFBCH – – XXXX XXXXH
– Reserved F7E1 FFC0H - nE nE –
F7E1 FFFCH
1) Read/write operations from/to these locations have no effect.
2) Note that all GPRs are undefined (XXXX XXXXB) after a reset operation.
Clock fASC
Control
RXD
Address RXD
ASC
Decoder Port
Module
TXD Control
(Kernel) TXD
EIR
TBIR
Interrupt
TIR
Control
RIR
To DMA MCB05762
19.1.1 Overview
The ASC provides serial communication between the TC1796 and other
microcontrollers, microprocessors, or external peripherals.
The ASC supports full-duplex asynchronous communication and half-duplex
synchronous communication. In Synchronous Mode, data is transmitted or received
synchronous to a shift clock that is generated by the ASC internally. In Asynchronous
Mode, 8-bit or 9-bit data transfer, parity generation, and the number of stop bits can be
selected. Parity, framing, and overrun error detection are provided to increase the
reliability of data transfers. Transmission and reception of data is double-buffered. For
multiprocessor communication, a mechanism is included to distinguish address bytes
from data bytes. Testing is supported by a loop-back option. A 13-bit baud rate generator
provides the ASC with a separate serial clock signal, which can be accurately adjusted
by a prescaler implemented as fractional divider.
Features
• Full-duplex asynchronous operating modes
– 8-bit or 9-bit data frames, LSB first
– Parity-bit generation/checking
– One or two stop bits
– Baud rate from 4.69 Mbit/s to 1.12 bit/s (@ 75 MHz module clock)
– Multiprocessor mode for automatic address/data byte detection
– Loop-back capability
• Half-duplex 8-bit synchronous operating mode
– Baud rate from 9.38 Mbit/s to 763 bit/s (@ 75 MHz module clock)
• Double-buffered transmitter/receiver
• Interrupt generation
– On a transmit buffer empty condition
– On a transmit last bit of a frame condition
– On a receive buffer full condition
– On an error condition (frame, parity, overrun error)
Fractional
Divider
fASC fDIV fBR
2 MUX 13-Bit Baud Rate Timer 16
fBRT
R 3
M STP FE PE OE
ODD
Note: In wake-up mode, received frames are transferred to the receive buffer register
only if the 9th bit (the wake-up bit) is 1. If this bit is 0, no receive interrupt request
will be activated and no data will be transferred.
ASC
RXD 0 Asynch. Mode Logic
TXD
1
CON
LB
MCA05766
2
fASC fDIV fBR
MUX 13-Bit Baud Rate Timer 4
fBRT
3
R
BRS
M = 000B OE
0
Receive Shift Transmit Shift
MUX
RXD Register Register
1
Receive Transmit
Buffer Reg. Buffer Reg.
RBUF TBUF
Receive/Transmit Timing
Shift Latch Shift Latch Shift
Shift Clock
(TXD)
Transmit Data Data Bit n Data Bit n+1 Data Bit n+2
(RXD)
Shift Clock
(TXD)
Transmit Data
D0 D1 D2 D3 D4 D5 D6 D7 D0 D1 D2 D3
(RXD)
1. Byte 2. Byte
Receive Data
D0 D1 D2 D3 D4 D5 D6 D7 D0 D1 D2 D3
(RXD)
1. Byte 2. Byte
MCT05768
R 3
FDE BRS Selected Divider
BRS 0 0 2
0 1 3
1 X Fractional Divider
MCA05769
Table 19-1 Asynchronous Baud Rate Formulas using the Fixed Input Clock
Dividers
FDE BRS BG Formula
0 0 0 … 8191 f
ASC
Baud rate = -----------------------------------
-
32 × ( BG + 1 )
ASC f
BG = --------------------------------------
-– 1
32 × Baud rate
1 ASC f
Baud rate = ------------------------------------
-
48 × ( BG + 1 )
ASCf
BG = --------------------------------------
-–1
48 × Baud rate
BG represents the content of the reload register bit field BG.BR_VALUE, taken as an
unsigned 13-bit integer.
The maximum baud rate that can be achieved for the asynchronous operating modes
when using the two fixed clock dividers and a module clock of 75 MHz is 2.34 Mbit/s.
Table 19-2 lists various commonly used baud rates together with the required reload
values and the deviation errors compared to the intended baud rate.
Table 19-2 Typical Asynchronous Baud Rates using Fixed Input Clock Dividers
Baud Rate CON.BRS = 0, fASC = 75 MHz CON.BRS = 1, fASC = 75 MHz
Deviation Error Reload Value Deviation Error Reload Value
2.344 Mbit/s – 0000H – –
19.2 kbit/s +0.1% / -0.8% 0079H / 007AH +0.5% / -0.8% 0050H / 0051H
9600 bit/s +0.1% / -0.4% 00F3H / 00F4H +0.5% / -0.1% 00A1H / 00A2H
4800 bit/s +0.1% / -0.2% 01E7H / 01E8H +0.2% / -0.1% 0144H / 0145H
Note: CON.FDE must be 0 to achieve the baud rates in the table above. The deviation
errors given in the table are rounded. Using a baud rate crystal will provide correct
baud rates without deviation errors.
Table 19-3 Asynchronous Baud Rate Formulas using the Fractional Input Clock
Divider
FDE BRS BG FDV Formula
1 – 0 … 8191 1 … 511 FDV f ASC
Baud rate = ------------ × -----------------------------------
-
512 16 × ( BG + 1 )
0 f
ASC
Baud rate = -----------------------------------
-
16 × ( BG + 1 )
BG represents the content of the reload register bit field BG.BR_VALUE, taken as an
unsigned 13-bit integer. FDV represents the contents of the fractional divider register bit
field FDV.FD_VALUE, taken as an unsigned 9-bit integer.
Table 19-4 Typical Asynchronous Baud Rates using the Fractional Input Clock
Divider
fASC Desired BG FDV Resulting Deviation
Baud Rate Baud Rate
75 MHz 115.2 kbit/s 17H 12EH 115.204 kbit/s < 0.01%
57.6 kbit/s 2FH 12EH 57.602 kbit/s < 0.01%
38.4 kbit/s 23H 097H 38.401 kbit/s < 0.01%
19.2 kbit/s AEH 16FH 19.200 kbit/s < 0.01%
2
fASC fDIV Shift /
MUX 13-Bit Baud Rate Timer 4 Sample
fBRT Clock
3
R
1 ASC f ASCf
Baud rate = -----------------------------------
- BG = --------------------------------------
-– 1
12 × ( BG + 1 ) 12 × Baud rate
BG represents the content of the reload register bit field BG.BR_VALUE, taken as an
unsigned 13-bit integer.
The maximum baud rate that can be achieved in Synchronous Mode when using a
module clock of 75 MHz is 9.38 Mbit/s.
19.1.7 Interrupts
Four interrupt sources are provided for serial channel ASC. Line TIR indicates a transmit
interrupt, TBIR indicates a transmit buffer interrupt, RIR indicates a receive interrupt, and
EIR indicates an error interrupt of the serial channel. The interrupt output lines TBIR,
TIR, RIR, and EIR are activated (active state) for two periods of the module clock fASC.
The cause of an error interrupt request EIR (framing, parity, overrun error) can be
identified by the error status flags CON.FE, CON.PE, and CON.OE.
Note: By contrast to the error interrupt request line EIR, the error status flags
CON.FE/CON.PE/CON.OE are not cleared automatically but must be cleared by
software.
For normal operation (that is, other than error interrupt), the ASC provides three interrupt
requests to control data exchange via this serial channel:
• TBIR is activated when data is moved from TBUF to the transmit shift register.
• TIR is activated before the last bit of an asynchronous frame is transmitted, or after
the last bit of a synchronous frame has been transmitted.
• RIR is activated when the received frame is moved to RBUF.
While the task of the receive interrupt handler is quite clear, the transmitter is serviced
by two interrupt handlers. This provides advantages for the servicing software.
For single transfers, it is sufficient to use the transmitter interrupt (TIR), which indicates
that the previously loaded data has been transmitted, except for the last bit of an
asynchronous frame.
For multiple back-to-back transfers, it is necessary to load the following piece of data at
least before the last bit of the previous frame has been transmitted. In Asynchronous
Mode, this leaves just one bit-time for the handler to respond to the transmitter interrupt
request; in Synchronous Mode, it is entirely impossible.
Using the Transmit Buffer Interrupt (TBIR) to reload transmit data provides the time
necessary to transmit a complete frame for the service routine, as TBUF may be
reloaded while the previous data is still being transmitted.
Asynchronous Mode
TIR TIR TIR
TBIR TBIR TBIR
Start
Start
Start
Stop
Stop
Stop
Idle Idle
Synchronous Mode
TIR TIR TIR
TBIR TBIR TBIR
Idle Idle
ID
Module Identification Register (08H) Reset Value: 0000 44XXH
31 16 15 8 7 0
0 MODNUM MODREV
r r r
PISEL
Peripheral Input Select Register (04H) Reset Value: 0000 0000H
31 1 0
R
0 I
S
r rw
The serial operating modes of the ASC module are controlled by its Control Register
CON. This register contains control bits for mode and error check selection, and status
flags for error identification.
CON
Control Register (10H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Serial data transmission or reception is possible only when the run bit CON.R is set to 1.
Otherwise, the serial interface is idle. To avoid unpredictable behavior of the serial
interface, do not program the mode control field CON.M to one of the reserved
combinations.
The WHBCON register contains control bits that makes it possible to set/clear flags of
the CON register.
WHBCON
Write Hardware Bits Control Register (50H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SET SET SET CLR CLR CLR SET CLR
0 0 0
OE FE PE OE FE PE REN REN
r w w w w w w r w w r
Note: When the set and clear bits for an error flag are set at the same time during a
WHBCON write operation (e.g SETPE = CLRPE = 1), the error flag in CON is not
affected.
The Baud Rate Timer Reload Register BG of the ASC module contains the 13-bit reload
value for the baud rate timer in Asynchronous Mode and Synchronous Mode.
BG
Baud Rate Timer/Reload Register (14H) Reset Value: 0000 0000H
31 13 12 0
0 BR_VALUE
r rwh
The Fractional Divider Register FDV of the ASC module contains the 9-bit divider value
for the fractional divider (Asynchronous Mode only).
FDV
Fractional Divider Register (18H) Reset Value: 0000 0000H
31 9 8 0
0 FD_VALUE
r rw
TBUF
Transmit Buffer Register (20H) Reset Value: 0000 0000H
31 9 8 0
0 TD_VALUE
r rw
The Receive Buffer Register RBUF of the ASC module contains the receive data value
in Asynchronous Mode and Synchronous Mode.
RBUF
Receive Buffer Register (24H) Reset Value: 0000 0000H
31 9 8 0
0 RD_VALUE
r rh
Clock fASC
Control P5.0 /
A2 RXD0A
RXD_I0
P5.1 /
A2
Address RXD_I1 TXD0A
ASC0
Decoder Module RXD_O
(Kernel)
TXD_O P6.8 /
EIR A2 RXD0B
TBIR P6.9 /
Interrupt A2
Control TIR TXD0B
RIR
Port 5
ASC0_RDR &
To
DMA ASC0_TDR Port 6
Control
P5.2 /
A2 RXD1A
RXD_I0
P5.3 /
A2
RXD_I1 TXD1A
ASC1
Module RXD_O
(Kernel)
TXD_O P6.10 /
EIR A2 RXD1B
TBIR P6.11 /
Interrupt A2
Control TIR TXD1B
RIR
ASC1_RDR
To
DMA ASC1_TDR MCB05773
ASC0_CLC
ASC0 Clock Control Register (00H) Reset Value: 0000 0003H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FS SB E SP DIS DIS
RMC 0
OE WE DIS EN S R
rw r rw w rw rw r rw
Note: After a hardware reset operation, the two ASC modules are disabled.
Note: The number of module clock cycles (wait states) which are required for a
“destructive read” access (means: flags/bits are set/cleared by one read access)
to ASC module register depends on the selected CLC clock frequency, which is
selected via bit field RMC in the CLC register. Therefore, increasing
ASC0_CLC.RMC may result in a longer SPB read cycle access time.
Note: Further details of the clock control register functionality are described in section
“Clock Control Register CLC” on Page 3-24 of the TC1796 User’s Manual
System Units part (Volume 1).
The ASC0/ASC1 modules include a peripheral input select register that is used to switch
the RXD input lines of the ASC0/ASC1 module kernels alternatively to Port 5 or Port 6
as shown in Table 19-14. Register ASC0_PISEL controls the RXD input selection for
ASC0, and ASC1_PISEL controls the RXD input selection for ASC1.
RXD_I0
PISEL
P5.0 /
ASC0 RXD_I1 RXD0A
Module RXD_O
(Kernel)
TXD_O P5.1 /
TXD0A
Port 5
Control
P5.2 /
RXD_I0 RXD1A
PISEL
ASC1 RXD_I1
Module RXD_O P5.3 /
(Kernel) TXD1A
TXD_O
P6.8 /
RXD0B
6.9 /
TXD0B
Port 6
Control
P6.10 /
RXD1B
P6.11 /
TXD1B
MCA05775
ASC0_PISEL
ASC0 Peripheral Input Select Register
(04H) Reset Value: 0000 0000H
31 1 0
R
0 I
S
r rw
ASC1_PISEL
ASC1 Peripheral Input Select Register
(04H) Reset Value: 0000 0000H
31 1 0
R
0 I
S
r rw
Note: In synchronous operating mode of the ASC, the type of the selected RXD port pin
(input or output) is not automatically controlled by the ASC but must be defined by
a user program by writing the appropriate bit field in the IOCR registers.
P5_IOCR0
Port 5 Input/Output Control Register 0(10H) Reset Value: 2020 2020H
31 28 23 20 15 12 7 4 0
rw r rw r rw r rw r
P6_IOCR8
Port 6 Input/Output Control Register 8(14H) Reset Value: 2020 2020H
31 28 23 20 15 12 7 4 0
rw r rw r rw r rw r
P5_PDR
Port 5 Pad Driver Mode Register (40H) Reset Value: 0000 0000H
31 22 20 18 16 0
PD PD PD PD
0 0 0 0 0
MSC1 MSC0 ASC1 ASC0
r rw r rw r rw r rw r
P6_PDR
Port 6 Pad Driver Mode Register (40H) Reset Value: 0000 0000H
31 26 24 0
PD PD PD PD
0 0 0 0 0
CAN23 CAN01 SSC1 SSC0
r rw r rw r rw r rw r
The eight interrupts of the ASC0 and ASC1 modules are controlled by the following
service request control registers:
• ASC0_TSRC, ASC1_TSRC: control the transmit interrupts
• ASC0_RSRC, ASC1_RSRC: control the receive interrupts
• ASC0_ESRC, ASC1_ESRC: control the error interrupts
• ASC0_TBSRC, ASC1_TBSRC: control the transmit buffer empty interrupts
TSRC
Transmit Interrupt Service Request Control Register
(F0H) Reset Value: 0000 0000H
RSRC
Receive Interrupt Service Request Control Register
(F4H) Reset Value: 0000 0000H
ESRC
Error Interrupt Service Request Control Register
(F8H) Reset Value: 0000 0000H
TBSRC
Transmit Buffer Interrupt Service Request Control Register
(FCH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SET CLR
SRR SRE 0 TOS 0 SRPN
R R
w w rh rw r rw r rw
Note: Additional details on service request nodes and the service request control
registers are described on Page 14-3 of the TC1796 User’s Manual System Units
part (Volume 1).
Note: Further details on DMA handling and processing are described in the chapter
“DMA Controller” of the TC1796 System Units User’s Manual.
MRSTA
Master MRSTB
fSSC
MTSR MTSR
Clock
Control fCLC MTSRA
MTSRB
Slave
MRST MRST
Address SSC
Decoder SCLKA Port
Module
Slave SCLKB Control
(Kernel)
SCLK SCLK
EIR Master
SLSI[7:1]
Interrupt TIR Slave
Control SLSO[7:0] SLSI
RIR Master
SSC Enabled SLSO[7:0]
M/S Selected
To DMA MCB05776
20.1.1 Overview
The SSC supports full-duplex and half-duplex serial synchronous communication up to
37.5 Mbit/s (@ 75 MHz module clock) with Receive and Transmit FIFO support. The
serial clock signal can be generated by the SSC itself (Master Mode) or can be received
from an external master (Slave Mode). Data width, shift direction, clock polarity and
phase are programmable. This allows communication with SPI-compatible devices.
Transmission and reception of data is double-buffered. A shift clock generator provides
the SSC with a separate serial clock signal. Seven slave select inputs are available for
Slave Mode operation. Eight programmable slave select outputs (chip selects) are
supported in Master Mode.
Note: The SSC0 contains an 8-stage Receive and Transmit FIFO. The SSC1 does not
provide any FIFO functionality. Therefore, all FIFO related references in
Section 20.1 and Section 20.2 are not valid for the SSC1 module!
Features
• Master and Slave Mode operation
– Full-duplex or half-duplex operation
– Automatic pad control possible
• Flexible data format
– Programmable number of data bits: 2 to 16 bits
– Programmable shift direction: LSB or MSB shift first
– Programmable clock polarity: Idle low or idle high state for the shift clock
– Programmable clock/data phase: Data shift with leading or trailing edge of the shift
clock
• Baud rate generation from 37.5 Mbit/s to 572.2 bit/s (@ 75 MHz module clock)
• Interrupt generation
– On a transmitter empty condition
– On a receiver full condition
– On an error condition (receive, phase, baud rate, transmit error)
• Flexible SSC pin configuration
• Seven slave select inputs SLSI[7:1] in Slave Mode
• Eight programmable slave select outputs SLSO[7:0] in Master Mode
– Automatic SLSO generation with programmable timing
– Programmable active level and enable control
• SSC0 only: 8-stage Receive FIFO (RXFIFO) and 8-stage Transmit FIFO (TXFIFO)
– Independent control of RXFIFO and TXFIFO
– 2- to 16-bit FIFO data width
– Programmable receive/transmit interrupt trigger level
– Receive and Transmit FIFO filling level indication
– Overrun error generation
– Underflow error generation
Internal Bus
selects the leading edge or the trailing edge for each function. Bit CON.PO selects the
level of the clock line in the idle state. For an idle-high clock, the leading edge is a falling
one, a 1-to-0 transition (see Figure 20-3).
CON.PO = 0
CON.PH = 0
CON.PO = 0
CON.PH = 1
CON.PO = 1
CON.PH = 0
CON.PO = 1
CON.PH = 1
SSC Pins
MTSR / MRST
Transmit Data
First Last
Bit Bit
Latch Data
Shift Data MCT05778
When initializing the devices in this configuration, one device must be selected for
master operation while all other devices must be programmed for slave operation.
Initialization includes the operating mode of the device’s SSC and also the function of
the respective port lines.
Device #3 Slave
Shift Register
MTSR
MRST
CLK
Clock
MCA05779
transmission to the master send only 1s. Since this high level is not actively driven
onto the line, but is only held through the pull-up device, the selected slave can pull
this line actively to a low level when transmitting a zero bit. The master selects the
slave device from which it expects data either by separate select lines, or by sending
a special command to this slave.
After performing all necessary initializations of the SSC, the serial interfaces can be
enabled. For a master device, the alternate clock line will now go to its programmed
polarity. The alternate data line will go to either 0 or 1, until the first transfer starts. After
a transfer, the alternate data line will always remain at the logic level of the last
transmitted data bit.
When the serial interfaces are enabled, the master device can initiate the first data
transfer by writing the transmit data into register TB. This value is copied into the shift
register (assumed to be empty at this time), and the selected first bit of the transmit data
will be placed onto the MTSR line on the next clock from the shift clock generator
(transmission only starts, if CON.EN = 1). Depending on the selected clock phase, a
clock pulse is generated on the SCLK line. With the opposite clock edge, the master
simultaneously latches and shifts in the data detected at its input line MRST. This
“exchanges” the transmit data with the receive data. Because the clock line is connected
to all slaves, their shift registers will be shifted synchronously with the master’s shift
register, shifting out the data contained in the registers, and shifting in the data detected
at the input line. After the pre-programmed number of clock pulses (via the data width
selection), the data transmitted by the master is contained in all slaves’ shift registers,
while the master’s shift register holds the data of the selected slave. In the master and
all slaves, the content of the shift register is copied into the Receive Buffer (RB) and the
receive interrupt request line (RIR) is activated.
A slave device will immediately output the selected first bit (MSB or LSB of the transfer
data) at pin MRST when the contents of the transmit buffer are copied into the slave’s
shift register. Bit STAT.BSY is not set until the first clock edge at SCLK appears. The
slave device will not wait for the next clock from the shift clock generator – as the master
does – because the first clock edge generated by the master may be already used to
clock in the first data bit, depending on the selected clock phase. So the slave’s first data
bit must already be valid at this time.
Note: On the SSC, a transmission and a reception always take place at the same time,
regardless whether valid data has been transmitted or received.
MRST MRST
Common
Transmit/
Receive Device #3 Slave
Line Shift Register
MTSR
MRST
CLK
Clock
MCA05780
1. If in Master Mode the Transmit Buffer register TB is loaded with new data for the
following transmission just at the end of the current transmission and a leading
delay > 0 is selected (SSOTC.LEAD not equal 00B), a slightly enlarged leading delay
(< one SCLK shift clock period) is generated for the following transmission.
Note: The TXFIFO is flushed automatically at a reset operation of the SSC module or if
the TXFIFO becomes disabled (resetting bit TXFCON.TXFEN) after it was
previously enabled.
Byte
Byte 77 Byte 7
Byte 6
Byte Byte 6 Byte 6 Byte 6 Byte 6 6
Byte
Byte 55 TX
Byte 4 Byte 5 Byte 5 Byte 5 Byte 5
Byte
Byte 44 FIFO
Byte Byte 4 Byte 4
Byte
Byte 33 empty
Byte 33 Byte 3
Byte
Byte 2
Byte
Byte 22
Byte 22
FSTAT.
0000 0101 0100 0011 0010 0010 0001 0000
TXFFL
The RXFIFO is flushed automatically at a reset operation of the SSC module or if the
RXFIFO becomes disabled (resetting bit RXFCON.RXFEN) after it was previously
enabled. Resetting bit CON.EN without resetting RXFCON.RXFEN does not affect
(reset) the RXFIFO state. This means that the receive operation of the SSC is stopped,
in this case, without changing the content of the RXFIFO. After setting CON.EN again,
the RXFIFO with its content is again available.
Byte 6
Byte 5 Byte 5 RX
FIFO
Byte 4 Byte 4 Byte 4 Byte 4 empty
Byte 3 Byte 3
Byte 2 Byte 2 Byte 2
Byte 1 Byte 1 Byte 1 Byte 1
FSTAT.
0000 0001 0010 0011 0100 0001 0010 0011 0000
RXFFL
Receive Operation
The interrupt generation for the RXFIFO depends on its filling level and the execution of
read operations of register RB (see Figure 20-8). Transparent Mode for the RXFIFO is
enabled when bits RXTMEN and RXFEN in register RXFCON are set.
FSTAT.
000 001 010 011 100 011 010 001 000
RXFFL
If the RXFIFO is flushed in Transparent Mode, the software must take care that a
previously pending receive interrupt becomes ignored.
Note: The RXFIFO Interrupt Trigger Level bit field RXFCON.RXFITL is “don’t care” in
Transparent Mode.
Transmit Operation
Interrupt generation for the TXFIFO depends on the TXFIFO filling level and the
execution of write operations to the register TB. Transparent Mode for the TXFIFO is
enabled when bits TXFCON.TXTMEN and TXFCON.TXFEN are set.
TIR is also activated after a TXFIFO flush operation or when the TXFIFO becomes
enabled (TXFCON.TXTMEN and TXFCON.TXFEN set) when it was previously disabled.
In these cases, the TXFIFO is empty and ready to be filled with data.
If the TXFIFO is full (FSTAT.TXFFL = 1000B) and an additional message is written into
the TB, a transmit interrupt will be generated after the TB write operation. In this case,
the data byte last written into the TXFIFO is overwritten and a TIR will be generated with
bit CON.TE set.
Note: The TXFIFO Interrupt Trigger Level bit field TXFCON.TXFITL is “don’t care” in
Transparent Mode.
fSSC fSCLK
2 16-Bit Counter
SSCf SSC f
- BR_VALUE = -------------------------------------------- – 1
Baud rate SSC = ------------------------------------------------------ (20.1)
2 × ( BR_VALUE + 1 ) 2 × Baud rate SSC
BR_VALUE represents the content of the reload register, taken as an unsigned 16-bit
integer, while Baud rateSSC is equal to fSCLK as shown in Figure 20-9.
The maximum baud rate that can be achieved with fSSC = 75 MHz is 37.5 Mbit/s in
Master Mode (with BR_VALUE = 0000H) and 18.75 Mbit/s in Slave Mode (with
BR_VALUE = 0001H).
Table 20-1 lists some possible baud rates together with the required reload values and
the resulting bit times, assuming a module clock fSSC of 75 MHz.
In the TC1796, the module clock fSSC is generated outside the SSC module kernel.
Therefore, for baud rate calculations the dependencies of fSSC from fSYS must be taken
into account. Section 20.3.2.1 on Page 20-48 describes these dependencies in detail.
0
MTSRA
MTSRI MTSRB
1
PISEL.SRIS
To/From MRSTI 0 MRST
Internal
PISEL.STIP 1
Control PISEL.SCIS
Port
Control
0
SCLKA
0 SCLKB
SCLKI 1
1 CON.PO
000 0
SLSI
001
SSC Kernel
Slave Mode PISEL.SLSIS
MCA05785
tSCLK
SCLK
Sample points
Last
MRST 1.Bit Bit 1.Bit
tSLSOI
tSLSOL tSLSOT tSLSOL
SLSOn
tSLSOACT
Last
MTSR Invalid 1.Bit Bit
Invalid 1.Bit
Data Frame
Slave Select Output Period
Note: This timing example is based on the following setup: CON.PH = 0; CON.PO = 1
MCT05786_mod
A slave select output period always starts after a serial write operation to register TB.
With a TB write operation, all timing parameters stored in register SSOTC as well as the
SSOC register are latched and remain valid for the consecutive transmission. Following
that, SLSOn becomes active (low) for a number of SCLK cycles (leading delay cycles)
before the first bit of the serial data stream occurs at MTSR. After the transmission of the
data frame, SLSOx remains active (low) for a number of SCLK cycles (trailing delay
cycles) before it becomes inactive again. This inactive state of SLSOn is valid at least for
a number of SCLK cycles (inactive delay cycles) before a new chip select period can be
started.
Note: When operating in Master Mode with CON.PH = 1 and sampling data from a slave
device that becomes enabled by an SLSOx output, a leading delay of at least one
leading delay clock cycle should be selected. The reason is that with CON.PH = 1,
the first SCLK edge already latches the first data bit at MRST.
The three parameters of a chip select period are controlled by bit fields in the Slave
Select Output Timing Control Register SSOTC. Each of these bit fields can contain a
value from 0 to 3 defining delay cycles of 0 to 3 multiples of the tSCLK shift clock period.
The three parameters are:
1. Number of leading delay cycles (tSLSOL = SSOTC.LEAD × tSCLK)
2. Number of trailing delay cycles (tSLSOT = SSOTC.TRAIL × tSCLK)
3. Number of inactive delay cycles (tSLSOI = SSSOTC.INACT × tSCLK)
If SSOTC.INACT = 00B and register TB has already been loaded with the data for the
next data frame, the next chip select period is started with its leading delay phase without
SLSOn going inactive. If, in this case, TB has not been loaded in time with the data for
the next data frame, SLSOx becomes inactive again.
SSOC.OENn SSOC.AOLn
Slave Select
Output
Timing Control 1
0: inactive
1
1: active
0 0 SLSOn
SSOTC 0
MCA05787
SCLK
tSLSOACT
SLSO7 with
LEAD = 11B
SLSO7 with
LEAD = 10B
SLSO7 with
LEAD = 01B
SLSO7 with
LEAD = 00B
Data Frame
Note: The timing is valid for clock polarity control bit CON.PO = 1.
MCT05788
CON.BEN
&
Set
Baud Rate Error
Set STAT.BE
EFM.SETBE
Clear MCA05789_mod
EFM.CLRBE
A Receive Error (Master or Slave Mode) is detected when a new data frame is
completely received, but the previous data was not read out of the receive buffer register
RB. This condition sets the error flag STAT.RE and, if enabled via CON.REN, sets the
error interrupt request line EIR. The old data in the receive buffer RB will be overwritten
with the new value and is irretrievably lost.
A Phase Error (Master or Slave Mode) is detected when the incoming data at pin MRST
(Master Mode) or MTSR (Slave Mode), sampled with the same frequency as the module
clock, changes between one cycle before and two cycles after the latching edge of the
shift clock signal SCLK. This condition sets the error status flag STAT.PE and, if enabled
via CON.PEN, the error interrupt request line EIR.
Note: When CON.PH = 1, the data output signal may be disturbed shortly when the
slave select input signal is changed after a serial transmission, resulting in a phase
error.
A Baud Rate Error (Slave Mode) is detected when the incoming clock signal deviates
from the programmed baud rate (shift clock) by more than 100%, meaning it is either
more than double or less than half the expected baud rate. This condition sets the error
status flag STAT.BE and, if enabled via CON.BEN, the EIR line. Using this error
detection capability requires that the slave’s shift clock generator is programmed to the
same baud rate as the master device. This feature detects false additional pulses or
missing pulses on the clock line (within a certain frame).
Note: If this error condition occurs and bit CON.AREN = 1, an automatic reset of the
SSC will be performed. This is done to re-initialize the SSC, if too few or too many
clock pulses have been detected.
Note: This error can occur after any transfer if the communication is stopped. This is due
to the fact that SSC supports back-to-back transfers for multiple transfers. In order
to handle this, the baud rate detection logic expects a next clock cycle immediately
for a new transfer after a finished transfer.
If baud rate error is enabled and the transmit buffer of the slave SSC is loaded with a
new value for the next data frame while the current data frame is not yet finished, the
slave SSC expects continuation of the clock pulses for the next data frame transmission
immediately after finishing the current data frame. Therefore, if the master (shift) clock is
not continued, the slave SSC will detect a baud rate error. Note that the master SSC
does not necessarily send out a continuous shift clock in the case that it’s transmit buffer
is not yet filled with new data or transmission delays occur.
A Transmit Error (Slave Mode) is detected when a transfer was initiated by the master
(shift clock becomes active), but the transmit buffer TB of the slave was not updated
since the last transfer. This condition sets the error status flag STAT.TE and, if enabled
via CON.TEN, the EIR line. If a transfer starts while the transmit buffer is not updated,
the slave will shift out the ‘old’ contents of the shift register, which is normally the data
received during the last transfer. This may lead to the corruption of the data on the
ID
Module Identification Register (08H) Reset Value: 0000 45XXH
31 16 15 8 7 0
0 MODNUM MODREV
r r r
PISEL
Port Input Select Register (04H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
MRI
0 STIP 0 SLSIS SCIS SRIS
S
r rw r rw rw rw rw
The operating modes of the SSC are controlled by the Control Register CON. This
register contains control bits for mode and error check selection.
CON
Control Register (10H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
A
EN MS 0 BEN PEN REN TEN LB PO PH HB BM
REN
rw rw r rw rw rw rw rw rw rw rw rw rw
The Status Register STAT contains status flags for error identification, the busy flag, and
a bit field that indicates the current shift counter status.
STAT
Status Register (28H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 BSY BE PE RE TE 0 BC
r rh rh rh rh rh r rh
The Error Flag Modification Register EFM is required for clearing or setting the four error
flags which are located in register STAT.
EFM
Error Flag Modification Register (2CH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SET SET SET SET CLR CLR CLR CLR
0
BE PE RE TE BE PE RE TE
w w w w w w w w r
Note: When the set and clear bits for an error flag are set at the same time during an
EFM write operation (e.g SETPE = CLRPE = 1), the error flag in STAT is not
affected.
The Slave Select Output Control Register controls the operation of the Slave Select
Output Generation Unit.
SSOC
Slave Select Output Control Register (18H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
OEN OEN OEN OEN OEN OEN OEN OEN AOL AOL AOL AOL AOL AOL AOL AOL
7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw
Note: The SSOC register content is latched by each TB register write operation and
remains latched during the consecutive serial transmission.
The Slave Select Output Timing Control Register controls the timing parameters of the
Slave Select Output Generation Unit.
SSOTC
Slave Select Output Timing Control Register
(1CH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SLS
0 O7 0 INACT TRAIL LEAD
MOD
r rw r rw rw rw
Note: The SSOTC register timing parameters are latched by each TB register write
operation and remain latched during a consecutive serial transmission.
The Baud Rate Timer Reload Register BR contains the 16-bit reload value for the baud
rate timer.
BR
Baud Rate Timer Reload Register (14H) Reset Value: 0000 0000H
31 16 15 0
0 BR_VALUE
r rw
The Receive FIFO Control Register RXFCON (only available in SSC0) contains control
bits and bit fields that determine the operating mode of the RXFIFO.
SSC0_RXFCON
SSC0 Receive FIFO Control Register (30H) Reset Value: 0000 0100H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RX
RXF RXF
0 RXFITL 0 TM
FLU EN
EN
r rw r rw w rw
The Transmit FIFO Control Register TXFCON (only available in SSC0) contains control
bits and bit fields that determine the operating mode of the RXFIFO.
SSC0_TXFCON
SSC0 Transmit FIFO Control Register (34H) Reset Value: 0000 0100H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TX
TXF TXF
0 TXFITL 0 TM
FLU EN
EN
r rw r rw w rw
The FIFO Status Register FSTAT (only available in SSC0) indicates the filling levels of
the Receive and Transmit FIFOs.
SSC0_FSTAT
SSC0 FIFO Status Register (38H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 TXFFL 0 RXFFL
r rh r rh
TB
Transmit Buffer Register (20H) Reset Value: 0000 0000H
31 16 15 0
0 TB_VALUE
r rw
RB
Receive Buffer Register (24H) Reset Value: 0000 0000H
31 16 15 0
0 RB_VALUE
r rh
MRSTA A2 MRST0
fSSC0 MRSTB
Master
Clock MTSR
Control fCLC0 A2 MTSR0
MTSRA
MTSRB
Slave
SSC0 MRST A2 SCLK0
Address Module
Decoder SCLKA
(Kernel)
Slave SCLKB
EIR 8-Stage RXFIFO SCLK
8-Stage TXFIFO
Master
Interrupt TIR SLSI1
Control RIR A2 SLSI0
Slave SLSI[7:2] 1)
SLSO0 A2 SLSO0
M/S Selected
SSC0_RDR
To SSC Enabled
SSC0_TDR SLSO1 A2 SLSO1
DMA Master
SLSO[7:2] P2.2 /
A2
Port 2 SLSO2
...
Each of the SSC modules is supplied by a separate clock control, interrupt control, and
address decoding logic. Two interrupt outputs can be used to generate DMA requests.
The SSC0 I/O lines are connected to dedicated pins. The SSC1 I/O lines are connected
to Port 2 and Port 6. The SLSOx outputs of SSC0 and SSC1 are wired as alternate
function to six I/O lines of Port 2. Two SLSOx outputs of SSC0 are connected to
dedicated pins. Note that only SSC0 contains an 8-stage Receive and Transmit FIFO.
SSC1 does not provide any FIFO functionality.
1
f SSCx = f SYS × --- with n = 1024 - FDR.STEP (20.2)
n
n
f SSCx = f SYS × ------------- with n = 0-1023 (20.3)
1024
Note: In SSC Master Mode, the maximum shift clock frequency is fSSCx/2. In SSC Slave
Mode, the maximum shift clock frequency is fSSCx/4.
Combined with the formulas of the baud rate generator (see Page 20-18) and the
fractional divider (see chapter “System Control Unit” of the TC1796 System Units User’s
Manual), the resulting serial data baud rate is defined by:
SYS f
Baud rate SSC = ----------------------------------------------------------------------------------------------------------------------------
- (20.4)
2 × ( BR.BR_VALUE + 1 ) × ( 1024 - FDR.STEP )
f SYS × FDR.STEP
Baud rate SSC = ------------------------------------------------------------------------------------
- with FDR.STEP = 0-1023 (20.5)
2 × ( BR.BR_VALUE + 1 ) × 1024
Note: Equation (20.2) and Equation (20.4) apply to normal divider mode of the
fractional divider (FDR.DM = 01B). Equation (20.3) and Equation (20.5) apply to
fractional divider mode (FDR.DM = 10B).
SSC0_CLC
SSC0_Clock Control Register (00H) Reset Value: 0000 0003H
SSC1_CLC
SSC1 Clock Control Register (00H) Reset Value: 0000 0003H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FS SB E SP DIS DIS
0
OE WE DIS EN S R
r rw w rw rw r rw
Note: After a hardware reset operation, the fCLCx clocks are disabled, and therefore also
the SSC modules are disabled (DISS set).
Note: Additional details of the clock control register functionality are described in section
“Clock Control Register CLC” on Page 3-24 of the TC1796 User’s Manual
System Units part (Volume 1).
Fractional Divider Register
The Fractional Divider Registers SSC0_FDR and SSC0_FDR control the clock rate of
the shift clock fSSC0 and fSSC1. Each SSC has its own fractional divider register.
SSC0_FDR
Fractional Divider Register (0CH) Reset Value: 0000 0000H
SSC1_FDR
SSC1 Fractional Divider Register (0CH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
DIS EN SUS SUS
0 RESULT
CLK HW REQ ACK
rwh rw rh rh r rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DM SC SM 0 STEP
rw rw rw r rw
Note: Further details of the fractional divider register functionality are described in
section “Fractional Divider Operation” on Page 3-29 of the TC1796 User’s
Manual System Units part (Volume 1).
selected as alternate function via the P2_IOCR0 and P2_IOCR4 registers. Additionally,
the logical AND combination of two SLSOx outputs with identical index “x” can be
connected as output to Port 2 (see Figure 20-19). Two SLSOx outputs of SSC0, SLSO0
and SLSO1, are connected to dedicated class A2 pins. These dedicated pins are always
outputs that are tri-stated when SSC0 is disabled (SSC0_CON.EN = 0).
SLSOx
SSC0 ALT1
&
x = 2-7 ALT3 Port 2.x
SLSOx
SSC1 ALT2
MCA05794
Table 20-4 SSC0 and SSC1 I/O Line Selection and Setup
Module Port Lines Input/Output Control Register Bits1) I/O
SSC0 MTSR0 SSC0_CON.MS = 0 SSC0_ Input
SSC0_CON.MS = 1 CON.EN = 1 Output
MRST0 SSC0_CON.MS = 1 Input
SSC0_CON.MS = 0 Output
SCLK0 SSC0_CON.MS = 0 Input
SSC0_CON.MS = 1 Output
MTSR0 – SSC0_ Tri-Stated
MRST0 CON.EN = 0
SCLK0
SLSI0 – – Input
Table 20-4 SSC0 and SSC1 I/O Line Selection and Setup (cont’d)
Module Port Lines Input/Output Control Register Bits1) I/O
SSC1 P6.4/MTSR1 P6_IOCR4.PC4 = 0XXXB Input
P6_IOCR4.PC4 = 1X01B Output
P6.5/MRST1 P6_IOCR4.PC5 = 0XXXB Input
P6_IOCR4.PC5 = 1X01B Output
P6.6/SCLK1 P6_IOCR4.PC6 = 0XXXB Input
P6_IOCR4.PC6 = 1X01B Output
P6.7/SLSI1 P6_IOCR4.PC7 = 0XXXB Input
Slave Select Outputs
SSC0 SLSO0 SSC0_CON.EN = 1 Output
SLSO1
SLSO0 SSC0_CON.EN = 0 Tri-Stated
SLSO1
SSC0 P2.2/SLSO2 P2_IOCR0.PC2 = 1X01B Output
SSC1 P2_IOCR0.PC2 = 1X10B
SSC0 & SSC1 P2_IOCR0.PC2 = 1X11B
SSC0 P2.3/SLSO3 P2_IOCR0.PC3 = 1X01B Output
SSC1 P2_IOCR0.PC3 = 1X10B
SSC0 & SSC1 P2_IOCR0.PC3 = 1X11B
SSC0 P2.4/SLSO4 P2_IOCR4.PC4 = 1X01B Output
SSC1 P2_IOCR4.PC4 = 1X10B
SSC0 & SSC1 P2_IOCR4.PC4 = 1X11B
SSC0 P2.5/SLSO5 P2_IOCR4.PC5 = 1X01B Output
SSC1 P2_IOCR4.PC5 = 1X10B
SSC0 & SSC1 P2_IOCR4.PC5 = 1X11B
SSC0 P2.6/SLSO6 P2_IOCR4.PC6 = 1X01B Output
SSC1 P2_IOCR4.PC6 = 1X10B
SSC0 & SSC1 P2_IOCR4.PC6 = 1X11B
SSC0 P2.7/SLSO7 P2_IOCR4.PC7 = 1X01B Output
SSC1 P2_IOCR4.PC7 = 1X10B
SSC0 & SSC1 P2_IOCR4.PC7 = 1X11B
1) Possible PCx bit field combinations see Table 20-5.
P2_IOCR0
Port 2 Input/Output Control Register 0(10H) Reset Value: 2020 2020H
31 28 23 20 15 12 7 4 0
rw r rw r rw r rw r
P2_IOCR4
Port 2 Input/Output Control Register 4(14H) Reset Value: 2020 2020H
31 28 23 20 15 12 7 4 0
rw r rw r rw r rw r
P6_IOCR4
Port 6 Input/Output Control Register 4(14H) Reset Value: 2020 2020H
31 28 23 20 15 12 7 4 0
rw r rw r rw r rw r
P2_PDR
Port 2 Pad Driver Mode Register (40H) Reset Value: 0000 0000H
31 22 20 18 16 0
PD PD
0 0 0 PD1 0
SLS1 SLS0
r rw r rw r rw r
P6_PDR
Port 6 Pad Driver Mode Register (40H) Reset Value: 0000 0000HH
31 22 20 18 16 0
PD PD PD
0 0 0 0 0 0
CANCD CANAB SSC1
r rw r rw r rw r rw r
TSRC
Transmit Interrupt Service Request Control Register
(F4H) Reset Value: 0000 0000H
RSRC
Receive Interrupt Service Request Control Register
(F8H) Reset Value: 0000 0000H
ESRC
Error Interrupt Service Request Control Register
(FCH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SET CLR
SRR SRE 0 TOS 0 SRPN
R R
w w rh rw r rw r rw
Note: Additional details on service request nodes and the service request control
registers are described on Page 14-3 of the TC1796 User’s Manual System Units
part (Volume 1).
Note: Further details on DMA handling and processing are described in Chapter 12 of
the TC1796 System Units User’s Manual (Volume 1).
MSC Applications
The MSC is a serial interface that is especially designed to connect external power
devices to the TC1796. The serial data transmission capability minimizes the number of
pins required to connect such external power devices. Parallel data information (coming
from the timer units) or command information is sent out to the power device via a high-
speed synchronous serial data stream (downstream channel). The MSC receives data
and status back from the power device via a low-speed asynchronous serial data stream
(upstream channel).
Figure 21-1 shows a typical TC1796 application in which an MSC interfaces controls two
power devices. Output data is provided by the GPTA modules.
TC1796
GPTA Data
Downstream
Modules
Channel
Clock Power
16 Select Device
Select 1
GPTA0
Data MSC
GPTA1
Upstream
Channel
16 Power
Data Device
LTCA2
2
MCA05795
21.1.1 Overview
The MSC interface provides a serial communication link typically used to connect power
switches or other peripheral devices. The serial communication link includes a fast
synchronous downstream channel and a slow asynchronous upstream channel.
Figure 21-2 shows a global view of the MSC interface signals.
fMSC
Clock
Control fCLC
FCLP
FCLN
Address SOP
Downstream
Decoder
Channel
SON
EN0
MSC
Interrupt SR[3:0] 4 Module EN1
Control (Kernel)
EN2
To DMA EN3
16
Upstream
ALTINL[15:0]
Channel
8
16 SDI[7:0]
ALTINH[15:0]
EMGSTOPMSC
MCB05796
Clock control, address decoding, and interrupt service request control are managed
outside the MSC module kernel. Service request outputs are able to trigger an interrupt
or a DMA request.
Features
• Fast synchronous serial interface to connect power switches in particular, or other
peripheral devices via serial buses
• High-speed synchronous serial transmission on downstream channel
– Serial output clock frequency: fFCL = fMSC/2
– Fractional clock divider for precise frequency control of serial clock fMSC
– Command, data, and passive frame types
– Start of serial frame: Software-controlled, timer-controlled, or free-running
– Programmable upstream data frame length (16 or 12 bits)
– Transmission with or without SEL bit
– Flexible chip select generation indicates status during serial frame transmission
– Emergency stop without CPU intervention
• Low-speed asynchronous serial reception on upstream channel
– Baud rate: fMSC divided by 4, 8, 16, 32, 64, 128, or 256
– Standard asynchronous serial frames
– Parity error checker
– 8-to-1 input multiplexer for SDI lines
– Built-in spike filter on SDI lines
Channel
ENC Control
ECI Control
FCL FCLP
TFI
FCLN
MUX MUX
ALTINH[15:0]
ALTINL[15:0]
31 16 15 0
31 16 15 0
MCB05797
The emergency stop input line EMGSTOPMSC is used to indicate an emergency stop
condition of a power device. In emergency case, shift register bits can be loaded bit-wise
from the downstream data register instead from the ALTINL and ALTINH buses.
Basic Definitions
Figure 21-4 shows the layout and definitions of a downstream frame. A downstream
frame is composed of an active phase and a passive phase. During the active phase,
data transmission takes place and during the passive phase no data is transmitted at
SO. The active phase is split into two parts: The SRL active phase in which the content
of the shift register low part SRL is transmitted, and the SRH active phase in which the
content of the shift register high part SRH is transmitted. At the beginning of the SRL and
SRH active phase, a selection bit (SELL) can be optionally inserted into the serial data
stream. In the frame shown in Figure 21-4, SELL is generated at the beginning of the
SRL active phase (not for the SRH active phase). The least significant bits of SRL and
SRH are sent out first.
FCL
Downstream Frame
MCT05798
Command Frames
A command frame has two active phase parts, SRL active phase and SRH active phase.
The command frame always starts with a high-level selection bit, independently whether
the selection bit insertion (as defined by bit DSC.ENSELL) is enabled or not. The number
of the bits transmitted during SRL and SRH active phases (except the selection bit) is
defined by bit field DSC.NBC. SRL and SRH are combined to a 32-bit value whose
length can be selected from 0 up to 32 bits. In other words, whenever bits of SRH are
transmitted, they are always preceded by the transmission of the complete SRL content.
During the active phase of a command frame, the enable output signal ENC becomes
active. The enable output signals ENL and ENH remain inactive.
The passive phase of a command frame always has a fixed length of 2 × tFCL. The
diagram shown in Figure 21-4 assumes that the FCL clock is only generated during the
active phase of the command frame (OCR.CLKCTRL = 0).
Command Frame
1)
ENC
FCL
Table 21-1 shows the programming of the bits to be transmitted and the resulting length
of the complete command frame.
Data Frames
A data frame has two active phase parts, SRL active phase and SRH active phase. The
number of bits that are transmitted can be programmed separately for each of these two
phases. Bit field DSC.NDBL determines the number of SRL bits that are transmitted
during the SRL active phase and DSC.NDBH determines the number of SRH bits that
are transmitted during the SRH active phase.
SRL and SRH active phases can start with a low-level selection bit when enabled by bits
DSC.ENSELL or DSC.ENSELH.
During the SRL active phase of a data frame, the enable output signal ENL becomes
active and during the SRH active phase of a data frame, the enable output signal ENH
becomes active. The enable output signal ENC remains inactive.
The length of the data frame’s passive phase is variable and is defined by bit field
DSC.PPD. It can be within a range of 2 × tFCL up to 31 × tFCL. The diagram shown in
Figure 21-5 assumes that the FCL clock is only generated during the active phase of the
data frame (OCR.CLKCTRL = 0).
Table 21-2, Table 21-3, and Table 21-4 show the definitions of the five data frame
parameters that determine the layout of the data frame.
Data Frame
1)
ENL
1)
ENH
Selection Bit
Selection Bit tFCL
FCL
The following formula determines the number of tFCL cycles of a data frame: All
parameters (bits and bit fields) are located in register DSC.
Note that in the formula above, PPD must be set to 2 when DSC.PPD ≤ 00010B.
DDH[x] DDL[x]
DSDSL DSC
SLx CP
2
00 1
0
ALTINL[x] 10 0 To SRL bit x
1
11
ESR
CP = 0: Load for Data Frame
ENLx & CP = 1: Load for Command Frame
EMGSTOPMSC
DCH[x] DCL[x]
32 16 15 0
DCH DCL x = 0-15
Four data sources can be selected for each SRL bit by using several control bits and one
control signal:
• ALTINL input line (non-inverted)
• ALTINL input line (inverted)
• Bit of DD.DDL (downstream data register)
• Bit of DC.DCL (downstream control register)
When SRL is loaded for data frame transmission (DSC.CP = 0), bit fields DSDSL.SLx
determine bit-wise which data is loaded into SRL bit x. The data source selection as
controlled by DSDSL.SLx will only be effective when EMGSTOPMSC is inactive (at low
level). When EMGSTOPMSC = 1 (active) during the load operation, all SRL[x] bits that
are enabled for the emergency stop feature (bit ESR.ENLx = 1) are loaded directly with
the corresponding bit DDL[x] of the downstream data register DD.
When SRL is loaded for command frame transmission (DSC.CP = 1), always the lower
16-bit part DCL of the downstream control register is loaded completely into SRL.
Table 21-5 summarizes all SRL data source selection capabilities (x = 0-15).
Triggered Mode
In Triggered Mode, command frames or data frames are sent out as a result of a
software event. When a frame transmission has been finished and no further frame
transmission has been requested, the downstream channel returns to idle state and
waits for the next frame transmission to be triggered by software.
When the Downstream Command Register DC is written, the command pending bit
DSC.CP becomes set and a command frame will be immediately started and sent out if
the downstream channel is idle. If a data or command frame is currently processed and
output, the command frame transmission is delayed, and then started when the active
downstream frame has been finished. The command pending bit DSC.CP becomes
cleared by hardware when the first bit of the command frame is sent out.
If the downstream channel is idle and the data pending bit DSC.DP is set by writing bit
ISC.SDP with 1, a data frame will be immediately started and sent out if the downstream
channel is idle. If a data frame or a command frame is currently processed and output,
the data frame transmission is delayed and started when the active downstream frame
has been finished. The data pending bit DSC.DP becomes cleared by hardware when
the first bit of the data frame is sent out.
A command frame always has priority over the data frame. This means that if both frame
pending bits are set (DSC.DP = DSC.CP = 1), the command frame will always be sent
first. Therefore, a pending data frame transmission will be delayed as long as no further
command frame transmission is running or requested.
Figure 21-8 is a flow diagram of the Triggered Mode. This diagram especially shows the
behavior of the data and command pending bits DSC.DP and DSC.CP. If both frame
pending bits are set (DSC.DP = DSC.CP = 1), the command frame will always be sent
first, followed by the data frame (assuming no further command frame has been
requested).
The type of the active frame that is currently processed and output is indicated by two
status flags: DSS.DFA is set during a data frame transmission and DSS.CFA is set
during a command frame transmission. Further, the downstream counter DSS.DC
indicates the number of shift clock periods that have been elapsed since the start of the
current frame.
In Triggered Mode, the shift register loading event as described in Section 21.1.2.2
occurs just before a command or data frame transmission is started.
Starting
Triggered Mode
(writing DSC.TM=0)
yes
DSC.CP = 1?
MCA05802
tDF tPTF
P
D PTF DF PTF PTF CF TF DF PTF PTF PTF DF PTF
1)
P
F PTF DF PTF PTF PTF CF TF DF PTF PTF DF PTF
1)
TRP TRP TRP TRP TRP TRP TRP TRP TRP TRP TRP TRP
PTF = Passive Time Frame 1) These passive time frames are shortened.
DF = Data Frame
CF = Command Frame
TRP = Time Reference Point MCT05803
Figure 21-9 Data Repetition Mode Frame Examples with DSS.NPTF = 0011B
Diagrams B to F in Figure 21-9 show the command frame insertion in Data Repetition
Mode.
In diagram B, a command frame has been requested during the first passive time frame
after the data frame, and is inserted at the next TRP. In diagram C and D, a command
frame has been requested during the second passive time frame, and is inserted at the
time reference point of the last nominal passive time frame.
When the length of a command frame has not the same length of the data frame (as in
diagrams B to F), a shortened passive time frame is inserted until the next TRP is
reached. This assures that the next data or normal passive time frame is again aligned
to a TRP.
Figure 21-10 is a flow diagram of the Data Repetition Mode. This diagram especially
shows the behavior of the data and command pending bits DSC.DP and DSC.CP. If both
frame pending bits are set (DSC.DP = DSC.CP = 1), the command frame will always be
sent first, followed by the data frame when the next TRP is reached (assuming no further
command frame has been requested).
When the last passive frame is transmitted, DSC.DP becomes set by hardware. This
triggers the start of a data frame when the next TRP is reached.
Starting Data
Repetition Mode
(writing DSC.TM=1)
no
TRP reached?
yes
yes
DSC.CP = 1?
MCA05804
0101B 0101 B
0100B
Passive Frame 0011B
0010B
Counter 0001B 0001B
0000 B 0000B
DSS.PFC
Transmitted
Frames PTF DF PTF PTF PTF PTF PTF DF PTF
TRP TRP TRP TRP TRP TRP TRP TRP TRP TRP
DCmax
SRL/SRH
Loading m+3 m+4
m m+1 m+2
State of 2 3
DSS.DC 0 1 tFCL
FCL
ENL
ENH
Passive
SRL Active Phase SRH Active Phase Phase
Downstream Frame
MCT05806
Figure 21-12 Shift Clock Counting: Data Frame with ENSELL = 1 and ENSELH = 0
When the selection bit for the SRL active frame is disabled (ENSELL = 0, see
Figure 21-13), the loading of the shift register SRL/SRH (and reset of the downstream
counter) occurs one FCL clock cycle before the first data bit SRL.0 is output. ENL is set
to high level with the beginning of the first data bit SRL.0.
DCmax
SRL/SRH
Loading m+4
m m+1 m+2 m+3
State of 2 3
DSS.DC 0 1 tFCL
FCL
ENL
ENH
Passive
SRL Active Phase SRH Active Phase Phase
Downstream Frame
MCT05807
Figure 21-13 Shift Clock Counting: Data Frame with ENSELL = 0 and ENSELH = 0
Upstream
fMSC RDI
Channel Interrupt
Control
MCB05808
MCT05809
The parity checking logic in the upstream channel also controls whether start bit and the
two stop bits of the upstream data frame are at correct logic level. If the start bit is not at
low level and the two stop bits are not at high level at the end of the frame reception, the
parity error flag UDx.PERR is set, too.
Receive
Enabled
UC 0 16 15 14 13 12 11 10 5 4 3 2 1 0
fBR
USR
URR
Programmable fBR
fMSC Clock Receive Buffer SI
Divider
MCA05811_mod
f
MSC
Baud rate MSC Upstream Channel = ----------
DF
- (21.2)
Table 21-6 Upstream Channel Divide Factor DF Selection & Baud Rate
USR.URR Divide Factor DF Baud Rate
000B reception disabled –
001B 4 fMSC/4
010B 8 fMSC/8
010B 16 fMSC/16
100B 32 fMSC/32
101B 64 fMSC/64
110B 128 fMSC/128
111B 256 fMSC/256
Note: With the USR.URR = 000B the upstream channel is disabled and data reception
is not possible.
The content of bit field USR.URR determines the operation of an internal sampling
reload counter that is clocked with fMSC. Figure 21-18 shows the operation of the
sampling counter at the beginning of an upstream frame with a divide factor DF of 8
(OCSR.URR = 010B is equal to DF = 8) which means eight sampling clocks per each
frame bit cell.
When the upstream channel is in idle state it waits for a falling edge (1-to-0 transition) at
SI. Therefore, the sample counter starts counting up and is reset when the selected
divide factor DF shown in Table 21-6 is reached. In the middle of the sampling counter’s
count range, the logic state at SI is evaluated and, in case of a data bit, latched in the
receive buffer’s shift register. With the reload of the sampling counter, the shift register
is shifted by one bit position.
SI Start Bit D0 D1
Reception
Enabled
Sampling
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2
Counter
fMSC
fBR
MSC Module
ENL EN0
Chip Select EN1
ENH
Output
ENC Control EN2
EN3
Downstream
Channel
FCLP
FCL Clock & Data FCLN
SO Output
Control SOP
SON
MCA05813
outputs EN[3:0]. This also makes it possible to connect more than one internal enable
signal (ENL, ENH, ENC) to one chip enable output ENx. Three bit fields in register OCR
(CSL, CSH, and CSC) determine which chip enable output becomes active on a valid
internal enable signal.
In the MSC, enable signals are high-level active signals. If required in a specific
application, all chip enable outputs ENx can be assigned for low-level active polarity by
setting bit OCR.CSLP.
OCR OCR
CSL CSLP
2
≥1
00
0
01 EN0
ENL
10 1
11
OCR
CSH ≥1
0
2
EN1
00 1
01
ENH
10
11
≥1
OCR 0
CSC EN2
1
2
00
01
ENC ≥1
10
0
11
EN3
1
MCA05814
At the MSC downstream channel, the internal serial clock output FCL and data output
line SO are available outside the MSC module as two signal pairs with inverted signal
polarity, FCLP/FCLN and SOP/SON. Both, clock and data outputs, are generated from
the module internal signals FCL and SO according to Figure 21-21.
OCR
CLP SLP
FCL 0
FCLP
1
0
FCLN
1
SO 0
SOP
1
0
SON
1
MCA05815
OCR OCR
ILP SDISEL
3
SDI 8
0 SDI[7:0]
SI
1
MCA05816
2 SDEDI Set
EDIE = 00, 11
Software
Last data bit shifted 01 Set ≥1 Data Frame
EDI
Interrupt
Hardware (to Int. Comp.)
First data bit shifted 10 Set MCA05817_mod
SDECI Set
Software
Set ≥1 ECI Command
End of a command Frame Interrupt
frame detected Hardware (to Int. Comp .)
Set MCA05818_mod
SDTFI Set
Software
Set ≥1 TFI Time Frame
Time Frame Interrupt
Finished Hardware (to Int. Comp.)
Set MCA05819_mod
2 SURDI Set
RDIE = 00
Software
Data is received 01 Set Data Frame
≥1 EDI
Data is received and Interrupt
10 (to Int. Comp .)
not equal 00 H Hardware
Data is received in UD 3 11 Set
MCA05820_mod
ICR
EDIP
2
≥1
00 Service
Request
Data Frame EDI 01 Output
Interrupt 10 SR0
11
ICR
ECIP
2
≥1
00 Service
Command Request
ECI 01 Output
Frame
Interrupt 10 SR1
11
ICR
TFIP
2
≥1
00 Service
Request
Time Frame TFI 01 Output
Interrupt 10 SR2
11
ICR
RDIP
2
≥1
00
Service
Request
Receive Data RDI 01 Output
Interrupt 10 SR3
11
MCA05821
ID
Module Identification Register (008H) Reset Value: 0028 C0XXH
31 16 15 8 7 0
r r r
USR
Upstream Status Register (10H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0 UC
r rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
P
0 URR UFT
CTR
r rw rw rw
The Downstream Control Register DSC is used to control the operation mode and frame
layout of the downstream channel transmission. It also contains the two pending status
bits.
DSC
Downstream Control Register (14H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0 PPD 0 NBC
r rw r rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EN EN
DS
SEL SEL NDBH NDBL DP CP TM
DIS
H L
rh rw rw rw rw rh rh rw
Note: The rw bits in the DSC register are buffered in a shadow buffer at the start of a
corresponding frame transmission.
The Downstream Status Register DSS contains counter bit fields, status bits, and
indicates the number of passive time frames.
DSS
Downstream Status Register (18H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0 CFA DFA 0 DC
r rh rh r rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 NPTF 0 PFC
r rw r rh
The bit fields of the Downstream Select Data Low Register DSDSL determine the data
source for each bit in shift register SRL.
DSDSL
Downstream Select Data Source Low Register
(24H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
rw rw rw rw rw rw rw rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw rw rw rw rw rw rw rw
The bit fields of the Downstream Select Data Source High Register DSDSR determine
the data source for each bit in shift register SRL.
DSDSH
Downstream Select Data Source High Register
(28H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
rw rw rw rw rw rw rw rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw rw rw rw rw rw rw rw
The Emergency Stop Register ESR determines which bits of SRL and SRH are enabled
for emergency operation.
ESR
Emergency Stop Register (2CH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
ENH ENH ENH ENH ENH ENH ENH ENH ENH ENH ENH ENH ENH ENH ENH ENH
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ENL ENL ENL ENL ENL ENL ENL ENL ENL ENL ENL ENL ENL ENL ENL ENL
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw
The Interrupt Control Register ICR holds the interrupt enable bits and interrupt pointers
of all four MSC interrupts.
ICR
Interrupt Control Register (40H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw rw rw r rw rw r rw rw rw
The Interrupt Status Register ISR holds the interrupt status flags that indicate an
interrupt occurrence in downstream and upstream channels.
ISR
Interrupt Status Register (44H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
r rh rh rh rh
The Interrupt Set Clear Register ISC is used to set or clear the MSC interrupt flags
located in the Interrupt Status Register ISR. Reading ISC always returns 0000 0000H.
ISC
Interrupt Set Clear Register (48H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
S S S S S S S
0
DDIS CP DP URDI DTFI DECI DEDI
r w w w w w w w
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
C C C C C C C
0
DDIS CP DP URDI DTFI DECI DEDI
r w w w w w w w
Note: When the ISC register is written with both bits set (clear and set bit) for a specific
interrupt flag, the clear operation takes place and the set operation is ignored.
The Output Control Register OCR determines the MSC input/output signal polarities, the
chip select output signal assignment, and the serial output clock generation.
OCR
Output Control Register (4CH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0 SDISEL
r rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CLK
CS
0 CSC CSH CSL CTR 0 ILP SLP CLP
LP
L
r rw rw rw rw r rw rw rw rw
DD
Downstream Data Register (1CH) Reset Value: 0000 0000H
31 16 15 0
DDH DDL
rw rw
DC
Downstream Command Register (20H) Reset Value: 0000 0000H
31 16 15 0
DCH DCL
rw rw
The four Upstream Data Registers UDx store the content (data, addresses, received and
calculated parity bit, parity error bit) of a received upstream channel data frame.
UDx (x = 0-3)
Upstream Data Register x (30H+x*4H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
P
0 IPF LABF C P V
ERR
r rh rh rh w rh rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 DATA
r rh
fMSC0 FCLP
C FCLP0A
Clock
Control fCLC0 FCLN
C FCLN0
SOP
C SOP0A
Address SON
C SON0
Decoder
Downstream
Channel
A2 P9.8 / FCLP0B
MSC0 A2 P9.7 / SOP0B
Interrupt SR[1:0]
Module
Control (Kernel) EN0
A2 P5.4 / EN00
Port 5
EN1 &
To DMA SR[3:2] A2 P9.6 / EN01
Port 9
16 EN2 Control
ALTINL[15:0] A2 P9.5 / EN02
(from GPTA) EN3
16 A2 P9.4 / EN03
ALTINH[15:0]
Channel
SDI[0]1) P5.5 /
Upstr.
A2
EMGSTOPMSC SDI0
(from SCU)
SR15 (from CAN)
FCLP
C FCLP1A
fMSC1 FCLN
Clock C FCLN1
Control fCLC1 SOP
C SOP1A
SON
C SON1
Downstream
Address
Channel
16 A2
ALTINH[15:0] SDI1
MCA05825
The following two formulas define the frequency of fMSC0 or fMSC1 (x = 1, 0):
1
f MSCx = f SYS × --- with n = 1024 - MSCx.FDR.STEP (21.3)
n
n
f MSCx = f SYS × ------------- with n = 0-1023 (21.4)
1024
1
Baud rate MSCx = f SYS × -------------------------------------------------------------------------------- (21.5)
2 × ( 1024 - MSCx.FDR.STEP )
MSCx.FDR.STEP
Baud rate MSCx = f SYS × ----------------------------------------------- (21.6)
2 × 1024
1
Baud rate MSCx = f SYS × ------------------------------------------------------------------------------------- (21.7)
DF × ( 1024 - MSCx.FDR.STEP )
MSCx.FDR.STEP
Baud rate MSCx = f SYS × ----------------------------------------------- (21.8)
DF × 1024
Equation (21.3), Equation (21.5), and Equation (21.7) are valid for normal divider
mode (MSCx.FDR.DM = 01B). Equation (21.4), Equation (21.6), and Equation (21.8)
are valid for fractional divider mode (MSCx.FDR.DM = 10B).
CLC
Clock Control Register (00H) Reset Value: 0000 0003H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FS SB E SP DIS DIS
0
OE WE DIS EN S R
r rw w rw rw r rw
Note: After a hardware reset operation, the fCLCx and fMSCx clocks are switched off and
the MSC modules are disabled (DISS set).
2. Additional details of the clock control register functionality are described in section
“Clock Control Register CLC” on Page 3-24 of the TC1796 User’s Manual System
Units part (Volume 1).
FDR
Fractional Divider Register (0CH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
DIS EN SUS SUS
0 RESULT
CLK HW REQ ACK
rwh rw rh rh r rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DM SC SM 0 STEP
rw rw rw r rw
Note: Further details of the fractional divider register functionality are described in
section “Fractional Divider Operation” on Page 3-29 of the TC1796 User’s
Manual System Units part (Volume 1).
Table 21-10 MSC0 and MSC1 I/O Line Selection and Setup
Module Port Lines Input/Output Control I/O
Register Bits1)
MSC0 P5.4 / EN00 P5_IOCR4.PC4 = 1X11B Output
2)
P5.5 / SDI0 P5_IOCR4.PC5 = 0XXXB Input
P9.4 / EN03 P9_IOCR4.PC4 = 1X11B Output
P9.5 / EN02 P9_IOCR4.PC5 = 1X11B Output
P9.6 / EN01 P9_IOCR4.PC6 = 1X11B Output
P9.7 / SOP0B P9_IOCR4.PC7 = 1X11B Output
P9.8 / FCLP0B P9_IOCR8.PC8 = 1X11B Output
3)
MSC1 P5.6 / EN10 P5_IOCR4.PC6 = 1X11B Output
2)
P5.7 / SDI1 P5_IOCR4.PC7 = 0XXXB Input
P9.0 / EN12 P9_IOCR8.PC0 = 1X11B Output
P9.1 / EN11 P9_IOCR8.PC1 = 1X11B Output
P9.2 / SOP1B P9_IOCR8.PC2 = 1X11B Output
P9.3 / FCLP1B P9_IOCR8.PC3 = 1X11B Output
1) Possible Px bit field combinations see Table 21-11.
2) For the upstream channel serial data inputs, additionally bit fields MSC0_OCR.SDISEL (for SDI0) and
MSC1_OCR.SDISEL (for MSC1) must be set to 000B.
3) Chip enable output 3 (EN3) of the MSC1 module is not connected in the TC1796.
P5_IOCR4
Port 5 Input/Output Control Register 4 (14H) Reset Value: 2020 2020H
31 28 23 20 15 12 7 4 0
rw r rw r rw r rw r
P9_IOCR0
Port 9 Input/Output Control Register 0 (10H) Reset Value: 2020 2020H
31 28 23 20 15 12 7 4 0
rw r rw r rw r rw r
P9_IOCR4
Port 9 Input/Output Control Register 4 (14H) Reset Value: 2020 2020H
31 28 23 20 15 12 7 4 0
rw r rw r rw r rw r
P9_IOCR8
Port 9 Input/Output Control Register 8 (18H) Reset Value: 0000 0020H
31 7 4 0
0 PC8 0
r rw r
P5_PDR
Port 5 Pad Driver Mode Register (40H) Reset Value: 0000 0000H
31 30 28 26 24 0
PD PD PD PD
0 0 0 0 0
MSC1 MSC0 ASC1 ASC0
r rw r rw r rw r rw r
P9_PDR
Port 9 Pad Driver Mode Register (40H) Reset Value: 0000 0000H
31 22 20 18 16 2 0
PD PD
0 0 0 PD0
MSC1 MSC0
r rw r rw r rw
GPTA ALTINL[15:0]
Control
MSC0
ALTINH[15:0]
Data
GPTA0
GPTA-to-MSC
Data Multiplexer ALTINL[15:0]
GPTA1
ALTINH[7:0]
Data MSC1
LTCA2
ALTINH[15:8]
0
MCA05826
SRC1
Service Request Control Register 1 (F8H) Reset Value: 0000 0000H
SRC0
Service Request Control Register 0 (FCH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SET CLR
SRR SRE 0 TOS 0 SRPN
R R
w w rh rw r rw r rw
Note: Additional details on service request nodes and the service request control
registers are described on Page 14-3 of the TC1796 User’s Manual System Units
part (Volume 1).
transmission once the bus returns to idle state. Therefore, the same identifier can be
sent in a Data Frame only by one node in the system. There must not be more than one
node programmed to send Data Frames with the same identifier.
Standard message identifier have a length of 11 bits. CAN specification 2.0B extends the
message identifier lengths to 29 bits, the extended identifier.
CAN protocol to the “in-bit-response” group of protocols. The recessive ACK delimiter
bit, which must not be overwritten by a dominant bit, completes the Acknowledge Field.
Seven recessive End-of-Frame (EOF) bits finish the Data Frame. Between any two
consecutive frames, the bus must remain in the recessive state for at least 3 bit times
(called Inter Frame Space). If after the Inter Frame Space, no other nodes attempt to
transmit the bus remains in idle state with a recessive level.
Recessive Level
Bus Idle 1 11 1 1 1 4 0 - 64 15 1 1 1 7 3 Bus Idle
Dominant Level
Recessive Level
Bus Idle 1 1 1 1 1 18 1 2 4 0 - 64 15 1 1 1 7 3 Bus Idle
Dominant Level
Extended Data Frame
MCT05827
Recessive Level
Bus Idle 1 11 1 1 1 4 15 1 1 1 7 3 Bus Idle
Dominant Level
Recessive Level
Bus Idle 1 11 1 1 18 1 2 4 15 1 1 1 7 3 Bus Idle
Dominant Level
Extended Remote Frame
MCT05828
Recessive Level
Bus Idle 6 8 Bus Idle
Dominant Level
Recessive Level
Bus Idle 6 8 Bus Idle
Dominant Level
Error Frame of "Error Passive" Node
MCT05829
Sample
Point
MCA05830
Basic Cycle
as sending every basic cycle, sending every second basic cycle, or sending only once
within the matrix cycle.
22.2 Overview
This section describes the serial communication module called MultiCAN
(CAN = Controller Area Network) with its Time-Triggered Extension module (called
TTCAN). The MultiCAN module contains four independent CAN nodes, representing
four serial communication interfaces.
TXDC0
CAN
Node 0 RXDC0
INT_O
Interrupt [15:0]
Control CAN Control
Scheduler
ECTT[7:1]
Schedule Timing Data Memory
Features
• Compliant with ISO 11898
• CAN functionality according to CAN specification V2.0 B active
• Dedicated control registers for each CAN node
• Data transfer rates up to 1 Mbit/s
• Flexible and powerful message transfer control and error handling capabilities
• Advanced CAN bus bit timing analysis and baud rate detection for each CAN node
via a frame counter
• Full-CAN functionality: A set of 128 message objects can be individually
– Allocated (assigned) to any CAN node
– Configured as transmit or receive object
– Set up to handle frames with 11-bit or 29-bit identifier
– Identified by a timestamp via a frame counter
– Configured to remote monitoring mode
• Advanced acceptance filtering
– Each message object provides an individual acceptance mask to filter incoming
frames.
– A message object can be configured to accept standard or extended frames or to
accept both standard and extended frames.
– Message objects can be grouped into four priority classes for transmission and
reception.
TTCAN Features
• Full support of basic cycle and system matrix functionality
• Support of reference messages level 1 and level 2
• Usable as time master
• Arbitration windows supported in time-triggered mode
• Global time information available
• CAN node 0 can be configured either for event-driven or time-triggered mode
• Built-in scheduler mechanism and a timing synchronization unit
• Write protection for scheduler timing data memory
• Timing-related interrupt functionality
• Parity protection for scheduler memory
Node Bitstream
Control Processor
Unit
CAN CAN CAN CAN Bit Error
Node 0 Node 1 Node 2 Node 3 Frame Timing Handling
Counter Unit Unit
Message Controller
Interrupt List
Message
Control Control
RAM
Logic Logic
Address Decoder
CAN Nodes
Each CAN node consists of several sub-units.
• Bitstream Processor
The Bitstream Processor performs data, remote, error and overload frame
processing according to the ISO 11898 standard. This includes conversion between
the serial data stream and the input/output registers.
• Bit Timing Unit
The Bit Timing Unit determines the length of a bit time and the location of the sample
point according to the user settings, taking into account propagation delays and
phase shift errors. The Bit Timing Unit also performs re-synchronization.
Message Controller
The Message Controller handles the exchange of CAN frames between the CAN nodes
and the message objects that are stored in the Message RAM. The Message Controller
performs several functions:
• Receive acceptance filtering to determine the correct message object for storing of a
received CAN frame
• Transmit acceptance filtering to determine the message object to be transmitted first,
individually for each CAN node
• Transfer contents between message objects and the CAN nodes, taking into account
the status/control bits of the message objects
• Handling of the FIFO buffering and gateway functionality
• Aggregation of message-pending notification bits
List Controller
The List Controller performs all operations that lead to a modification of the double-
chained message object lists. Only the list controller is allowed to modify the list
structure. The allocation/deallocation or reallocation of a message object can be
requested via a user command interface (command panel). The list controller state
machine then performs the requested command autonomously.
Interrupt Control
The general interrupt structure is shown in Figure 22-8. The interrupt event can trigger
the interrupt generation. The interrupt pulse is generated independently of the interrupt
flag in the interrupt status register. The interrupt flag can be cleared by software by
writing a 0 to it.
If enabled by the related interrupt enable bit in the interrupt enable register, an interrupt
pulse can be generated at one of the 16 interrupt output lines INT_Om of the MultiCAN
module. If more than one interrupt source is connected to the same interrupt node
pointer (in the interrupt node pointer register), the requests are combined to one
common line.
Clear Interrupt
Writing 0 INP
Flag
Set
Interrupt
Enable To INT_O0
≥1 To INT_O1
Other Interrupt
.....
Sources on the
same INP To INT_O15
MCA05834_mod
Module Kernel
Register
File
TTCAN
Scheduler
MCA05835
1 Bit Time
TSeg1 TSeg2
TSync TProp Tb1 Tb2
Sync.
Seg
1 Time Quantum ( tq)
Sample Point Transmit Point
MCT05836
To compensate phase shifts between clocks of different CAN controllers, the CAN
controller must synchronize on any edge from the recessive to the dominant bus level.
If the hard synchronization is enabled (at the start of frame), the bit time is restarted at
the synchronization segment. Otherwise, the re-synchronization jump width TSJW defines
the maximum number of time quanta, a bit time may be shortened or lengthened by one
re-synchronization. The value of SJW is defined by bit field NBTRx.SJW.
TSJW = (SJW + 1) × tq
TSeg1 ≥ TSJW + Tprop
TSeg2 ≥ TSJW
The maximum relative tolerance for fCAN depends on the Phase Buffer Segments and
the re-synchronization jump width.
A valid CAN bit timing must be written to the CAN Node Bit Timing Register NBTR before
clearing the INIT bit in the Node Control Register, i.e. before enabling the operation of
the CAN node.
The Node Bit Timing Register may be written only if bit CCE (Configuration Change
Enable) is set in the corresponding Node Control Register.
bus arbitration procedure and continues with the frame transmission when the bus was
found in idle state. While the data transmission is running, the Bitstream Processor
continuously monitors the I/O line. If (outside the CAN bus arbitration phase or the
acknowledge slot) a mismatch is detected between the voltage level on the I/O line and
the logic state of the bit currently sent out by the transmit shift register, a CAN error
interrupt request is generated, and the error code is indicated by the Node x Status
Register bit field NSRx.LEC.
The data consistency of an incoming frame is verified by checking the associated CRC
field. When an error has been detected, a CAN error interrupt request is generated and
the associated error code is presented in the Node x Status Register NSRx.
Furthermore, an Error Frame is generated and transmitted on the CAN bus. After
decomposing a faultless frame into identifier and data portion, the received information
is transferred to the message buffer executing remote and Data Frame handling,
interrupt generation and status processing.
NSRx NCRx
Correct Message
Object Transfer TXOK TRIE
NIPRx
Transmit ≥1
TRINP
Receive
RXOK
NSRx
NSRx NCRx
LEC LECIE
NIPRx
3
CAN Error LECINP
NCRx
NSRx
EWRN ≥1 ALIE
NIPRx
BOFF
ALINP
List Length Error
NSRx
List Object Error
ALERT
LLE LOE
NSRx NSRx
NFCRx NFCRx
CFCOV CFCIE
NIPRx
Frame Counter
Overflow/Event CFCINP
MCA05837
22.3.6.1 Basics
The message objects of the MultiCAN module are organized in double-chained lists,
where each message object has a pointer to the previous message object in the list as
well as a pointer to the next message object in the list. The MultiCAN module provides
eight lists. Each message object is allocated to one of these lists. In the example in
Figure 22-12, the three message objects (3, 5, and 16) are allocated to the list with
index 2 (List Register LIST2).
MCA05838
indicated by PPREV = 5). PNEXT of the last message object also points to the message
object itself because the last message object has no successor (in the example, object 3
is the last message object in the list, indicated by PNEXT = 3).
Bit field MOCTRn.LIST indicates the list index number to which the message object is
currently allocated. The message object of the example are allocated to list 2. Therefore,
all LIST bit fields for the message objects assigned to list 2 are set to LIST = 2.
Unallocated
CAN CAN CAN CAN
List
Node 0 Node 1 Node 2 Node 3
Elements
Last Object Last Object Last Object Last Object Last Object
in List 0 in List 1 in List 2 in List 3 in List 4
MultiCAN Module
MCA05839
Table 22-2 gives an overview on the available panel commands while Table 22-6 on
Page 22-63 describes the panel commands in more detail.
A panel command is started by writing the respective command code into the Panel
Control Register bit field PANCTR.PANCMD (see Page 22-62). The corresponding
command arguments must be written into bit fields PANCTR.PANAR1 and
PANCTR.PANAR2 before writing the command code, or latest along with the command
code in a single 32-bit write access to the Panel Control Register.
With the write operation of a valid command code, the PANCTR.BUSY flag is set and
further write accesses to the Panel Control Register are ignored. The BUSY flag remains
active and the control panel remains locked until the execution of the requested
command has been completed. After a reset, the list controller builds up list 0. During
this operation, BUSY is set and other accesses to the CAN RAM are forbidden. The CAN
RAM can be accessed again when BUSY becomes inactive.
Note: The CAN RAM is automatically initialized after reset by the list controller in order
to ensure correct list pointers in each message object. The end of this CAN RAM
initialization is indicated by bit PANCTR.BUSY becoming inactive.
In case of a dynamic allocation command that takes an element from the list of
unallocated objects, the PANCTR.RBUSY bit is also set along with the BUSY bit
(RBUSY = BUSY = 1). This indicates that bit fields PANAR1 and PANAR2 are going to
be updated by the list controller in the following way:
1. The message number of the message object taken from the list of unallocated
elements is written to PANAR1.
2. If ERR (bit 7 of PANAR2) is set to 1, the list of unallocated elements was empty and
the command is aborted. If ERR is 0, the list was not empty and the command will be
performed successfully.
The results of a dynamic allocation command are written before the list controller starts
the actual allocation process. As soon as the results are available, RBUSY becomes
inactive (RBUSY = 0) again, while BUSY still remains active until completion of the
command. This allows the user to set up the new message object while it is still in the
process of list allocation. The access to message objects is not limited during ongoing
list operations. However, any access to a register resource located inside the RAM
delays the ongoing allocation process by one access cycle.
As soon as the command is finished, the BUSY flag becomes inactive (BUSY = 0) and
write accesses to the Panel Control Register are enabled again. Also, the “No Operation”
command code is automatically written to the PANCTR.PANCMD field. A new command
may be started any time when BUSY = 0.
All fields of the Panel Control Register PANCTR except BUSY and RBUSY may be
written by the user. This makes it possible to save and restore the Panel Control Register
if the Command Panel shall be used within independent (mutually interruptible) interrupt
service routines. If this is the case, any task that uses the Command Panel and that may
interrupt another task that also uses the Command Panel should poll the BUSY flag until
it becomes inactive and save the whole PANCTR register to a memory location before
issuing a command. At the end of the interrupt service routine, the task should restore
PANCTR from the memory location.
Before a message object that is allocated to the list of an active CAN node shall be
moved to another list or to another position within the same list, bit MOCTRn.MSGVAL
(“Message Valid”) of message object n must be cleared.
Internal
CAN Bus
NPCR0.LBM
0 External
CAN CAN Bus 0
Node 0 1
NPCR1.LBM
0 External
CAN CAN Bus 1
Node 1 1
NPCR2.LBM
0 External
CAN CAN Bus 2
Node 2 1
NPCR3.LBM
0 External
CAN CAN Bus 3
Node 3 1
MCA05840
Synchronization Analysis
The bit time synchronization is monitored if NFCRx.CFSEL = 010B. The time between
the first dominant edge and the sample point is measured and stored in the NFCRx.CFC
bit field. The bit timing synchronization offset may be derived from this time as the first
edge after the sample point triggers synchronization and there is only one
synchronization between consecutive sample points.
Synchronization analysis can be used, for example, for fine tuning of the baud rate
during reception of the first CAN frame with the measured baud rate.
Identifier of
Received Frame 0 = Bit match
Bitwise 1 = No match
XOR
Identifier of
Message Object
&
MSGVAL
TXRQ
0 = Object will not be transmitted
1 = Object is requested for transmission
TXEN0
TXEN1
MCA05842
MOSTATn MOFCRn
TXPND RXPND OVIE TXIE RXIE MMC
= 0010B
= 0001B MOIPRn
Message n
≥1
Transmitted TXINP
&
Message n
FIFO full
&
MOIPRn
≥1
Message n RXINP
Received
0 1 0 1 0 1 0 1 0 = transmit event
1 = receive event
31
1 MSB D
. . . . . . . .
4 E
0 M
U
4 X
3:0
0
3 2 1 0
31 MPSEL 0
Allocation Case 1
In this allocation case, bit field MCR.MPSEL = 0000B (see Page 22-66). The location
selection consists of 2 parts:
• The upper three bits of MOINPRn.MPN (MPN[7:5]) select the number k of a Message
Pending Register MSPNDk in which the pending bit will be set.
• The lower five bits of MOINPRn.MPN (MPN[4:0]) select the bit position (0-31) in
MSPNDk for the pending bit to be set.
Allocation Case 2
In this allocation case, bit field MCR.MPSEL is taken into account for pending bit
allocation. Bit field MCR.MPSEL makes it possible to include the interrupt request node
pointer for reception (MOIPRn.RXINP) or transmission (MOIPRn.TXINP) for pending bit
allocation in such a way that different target locations for the pending bits are used in
receive and transmit case. If MPSEL = 1111B, the location selection operates in the
following way:
• At a transmit event, the upper 3 bits of TXINP determine the number k of a Message
Pending Register MSPNDk in which the pending bit will be set. At a receive event,
the upper 3 bits of RXINP determine the number k.
• The bit position (0-31) in MSPNDk for the pending bit to be set is selected by the
lowest bit of TXINP or RXINP (selects between low and high half-word of MSPNDk)
and the four least significant bits of MPN.
General Hints
The Message Pending Registers MSPNDk can be written by software. Bits that are
written with 1 are left unchanged, and bits which are written with 0 are cleared. This
makes it possible to clear individual MSPNDk bits with a single register write access.
Therefore, access conflicts are avoided when the MultiCAN module (hardware) sets
another pending bit at the same time when software writes to the register.
Each Message Pending Register MSPNDk is associated with a Message Index Register
MSIDk (see Page 22-71) which indicates the lowest bit position of all set (1) bits in
Message Pending Register k. The MSIDk register is a read-only register that is updated
immediately when a value in the corresponding Message Pending Register k is changed
by software or hardware.
MSGVAL
Bit MSGVAL (Message Valid) in the Message Object n Status Register MOSTATn is the
main switch of the message object. During the frame reception, information is stored in
the message object only when MSGVAL = 1. If bit MSGVAL is cleared by the CPU, the
MultiCAN module stops all ongoing write accesses to the message object. Now the
message object can be re-configured by the CPU with subsequent write accesses to it
without being disturbed by the MultiCAN.
RTSEL
When the CPU re-configures a message object during CAN operation (for example
clears MSGVAL, modifies the message object and sets MSGVAL again), the following
scenario can occur:
1. The message object wins receive acceptance filtering.
2. The CPU clears MSGVAL to re-configure the message object.
3. The CPU sets MSGVAL again after re-configuration.
4. The end of the received frame is reached. As MSGVAL is set, the received data is
stored in the message object, a message interrupt request is generated, gateway and
FIFO actions are processed etc.
After the re-configuration of the message object (after step 3 above) the storage of
further received data may be undesirable. This can be achieved through bit
MOCTRn.RTSEL (Receive/Transmit Selected) that makes it possible to disconnect a
message object from an ongoing frame reception.
When a message object wins the receive acceptance filtering, its RTSEL bit is set by the
MultiCAN module to indicate an upcoming frame delivery. The MultiCAN module checks
RTSEL whether it is set on successful frame reception to verify that the object is still
ready for receiving the frame. The received frame is then stored in the message object
(along with all subsequent actions such as message interrupts, FIFO & gateway actions,
flag updates) only if RTSEL = 1.
When a message object is invalidated during CAN operation (clearing bit MSGVAL),
RTSEL should be cleared before setting MSGVAL again (latest with the same write
access that sets MSGVAL) to prevent the storage of a frame that belongs to the old
RXEN
Bit MOSTATn.RXEN enables a message object for frame reception. A message object
can receive CAN messages from the CAN bus only if RXEN = 1. The MultiCAN module
evaluates RXEN only during receive acceptance filtering. After receive acceptance
filtering, RXEN is ignored and has no further influence on the actual storage of a received
message in a message object.
Bit RXEN enables the “soft phase out” of a message object: after clearing RXEN, a
currently received CAN message for which the message object has won acceptance
filtering is still stored in the message object but for subsequent messages the message
object no longer wins receive acceptance filtering.
no Object wins
acc. filtering?
Time
yes Milestones
RTSEL := 1
1
no CAN rec.
successful?
yes
no MSGVAL & no
MSGVAL =1?
RTSEL =1?
yes yes
RXUPD := 1 RXUPD := 1
2
yes
TXRQ := 1 in this
DIR =1?
or in foreign objects
no
yes
NEWDAT =1? MSGLST := 1
no
NEWDAT := 1
RXUPD := 0
RXPND := 1
4
yes
RXIE =1? MSGLST := 1
no
Done
MCA05845
RTSEL
When a message object has been identified to be transmitted next after transmission
acceptance filtering, bit MOCTRn.RTSEL (Receive/Transmit Selected) is set.
When the message object is copied into the internal transmit buffer, bit RTSEL is
checked, and the message is transmitted only if RTSEL = 1. After the successful
transmission of the message, bit RTSEL is checked again and the message
postprocessing is only executed if RTSEL = 1.
For a complete re-configuration of a valid message object, the following steps should be
executed:
1. Clear MSGVAL bit
2. Re-configure the message object while MSGVAL = 0
3. Clear RTSEL and set MSGVAL
Clearing RTSEL ensures that the message object is disconnected from an
ongoing/scheduled transmission and no message object processing (copying message
to transmit buffer including clearing NEWDAT, clearing TXRQ, time stamp update,
message interrup, etc.) within the old context of the object can occur after the message
object becomes valid again, but within a new context.
NEWDAT
When the contents of a message object have been transferred to the internal transmit
buffer of the CAN node, bit MOSTATn.NEWDAT (New Data) is cleared by hardware to
indicate that the transmit message object data is no longer new.
When the transmission of the frame is successful and NEWDAT is still cleared (if no new
data has been copied into the message object meanwhile), TXRQ (Transmit Request) is
cleared automatically by hardware.
If, however, the NEWDAT bit has been set again by the software (because a new frame
should be transmitted), TXRQ is not cleared to enable the transmission of the new data.
Copy Message to
internal transmit buffer
yes
no
RTSEL = 1?
yes
Request transmission
of internal buffer on
CAN bus
NEWDAT := 0 2
Transmission no
successful?
yes
MSGVAL & no
RTSEL =1?
yes
no
NEWDAT = 1? TXRQ := 0
yes
no
TXIE =1?
yes 3
Issue interrupt
Done
MCA05846
Message Reception
When a received message stored in a message object is overwritten by a new received
message, the contents of the first message are lost and replaced with the contents of the
new received message (indicated by MSGLST = 1).
If SDT is set (Single Data Transfer Mode activated), bit MSGVAL of the message object
is automatically cleared by hardware after the storage of a received Data Frame. This
prevents the reception of further messages.
After the reception of a Remote Frame, bit MSGVAL is not automatically cleared.
Message Transmission
When a message object receives a series of multiple remote requests, it transmits
several Data Frames in response to the remote requests. If the data within the message
object has not been updated in the time between the transmissions, the same data can
be sent more than once on the CAN bus.
In Single Data Transfer Mode (SDT = 1), this is avoided because MSGVAL is
automatically cleared after the successful transmission of a Data Frame.
After the transmission of a Remote Frame, bit MSGVAL is not automatically cleared.
generated whenever the CUR pointer reaches the value of the SEL pointer. Thus SEL
makes it possible to detect the end of a predefined message transfer series or to issue
a warning interrupt when the FIFO becomes full.
PPREV = f[n-1]
PNEXT
Slave Object fn
..
..
PPREV
PPREV = f[i-1]
PNEXT
PNEXT = f[i+1]
TOP = fn Slave Object fi
CUR = fi
..
BOT = f1 ..
PNEXT = f3
Slave Object f2
PPREV
PNEXT = f2
Slave Object f1
MCA05847
Figure 22-21 FIFO Structure with FIFO Base Object and n FIFO Slave Objects
The gateway operates equivalent for the reception of Data Frames (source object is
receive object, i.e. DIR = 0), as well as for the reception of Remote Frames (source
object is transmit object).
Pointer to Destination
Message Object
CUR
Copy if IDCSource = 1
Identifier + IDE Identifier + IDE
Copy if DLCCSource = 1
DLC DLC
Copy if DATCSource = 1
Data Data
Set if GDFSSource = 1
TXRQ
Set
NEWDAT
Source
Message Object Set
TXRQ
MMC = 0100B
Destination
Message Object
MCA05848
ID
Module Identification Register (008H) Reset Value: 002B C0XXH
31 16 15 8 7 0
r r r
PANCTR
Panel Control Register (1C4H) Reset Value: 0000 0301H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
PANAR2 PANAR1
rwh rwh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RBU BUS
0 PANCMD
SY Y
r rh rh rwh
Panel Commands
A panel operation consists of a command code (PANCMD) and up to two panel
arguments (PANAR1, PANAR2). Commands that have a return value deliver it to the
PANAR1 bit field. Commands that return an error flag deliver it to bit 31 of the Panel
Control Register, this means to bit 7 of PANAR2.
The Module Control Register MCR contains basic settings to determine the operation of
the MultiCAN module.
MCR
Module Control Register (1C8H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
MPSEL 0
rw r
The Interrupt Trigger Register ITR is used to trigger interrupt requests on each interrupt
output line by software.
MITR
Module Interrupt Trigger Register (1CCH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
IT
LIST0
List Register 0 (100H) Reset Value: 007F 7F00H
LISTk (k = 1-7)
List Register k (100H+k*4H) Reset Value: 0100 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
EMP
0 SIZE
TY
r rh rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
END BEGIN
rh rh
Message Notifications
When a message object n generates an interrupt request upon the transmission or
reception of a message, then the request is routed to the interrupt output line selected
by the bit fields MOIPRn.TXIPND or MOIPRn.RXIPND of the message object n. As there
are more message objects than interrupt output lines, an interrupt routine typically
processes requests from more than one message object. Therefore, a priority selection
mechanism is implemented in the MultiCAN module to select the highest priority object
within a collection of message objects.
The Message Pending Register MSPNDk contains the pending interrupt notification of
list k.
MSPNDk (k = 0-7)
Message Pending Register k (120H+k*4H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
PND
rwh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PND
rwh
Each Message Pending Register has a Message Index Register MSIDk associated with
it. The Message Index Register MSIDk shows the active (set) pending bit with lowest bit
position within groups of pending bits.
MSIDk (k = 0-7)
Message Index Register k (140H+k*4H) Reset Value: 0000 0020H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 INDEX
r rh
The Message Index Mask Register MSIMASK selects individual bits for the calculation
of the Message Pending Index. The Message Index Mask Register is used commonly
for all Message Pending registers and their associated Message Index registers.
MSIMASK
Message Index Mask Register (1C0H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
IM
rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
IM
rw
NCRx (x = 0-3)
Node x Control Register (200H+x*100H) Reset Value: 0000 0001H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SUS CAL CAN LEC
0 CCE 0 ALIE TRIE INIT
EN M DIS IE
r rw rw rw r rw rw rw rw rwh
The Node Status Register NSRx reports errors as well as successfully transferred CAN
frames.
NSRx (x = 0-3)
Node x Status Register (204H+x*100H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SUS BOF EWR ALE RXO TXO
0 LOE LLE LEC
ACK F N RT K K
r rh rwh rwh rh rh rwh rwh rwh rwh
The four interrupt pointers in the Node Interrupt Pointer Register NIPRx select one of the
sixteen interrupt outputs individually for each type of CAN node interrupt. See also
Page 22-27 for more CAN node interrupt details.
NIPRx (x = 0-3)
Node x Interrupt Pointer Register
(208H+x*100H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw rw rw rw
The Node Port Control Register NPCRx configures the CAN bus transmit/receive ports.
NPCRx can be written only if bit NCRx.CCE is set.
NPCRx (x = 0-3)
Node x Port Control Register (20CH+x*100H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 LBM 0 RXSEL
r rw r rw
The Node Bit Timing Register NBTRx contains all parameters to setup the bit timing for
the CAN transfer. NBTRx may be written only if bit NCRx.CCE is set.
NBTRx (x = 0-3)
Node x Bit Timing Register (210H+x*100H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0 FTX
r rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw rw rw rw rw
The Node Error Counter Register NECNTRx contains the CAN receive and transmit
error counter as well as some additional bits to ease error analysis. NECNTx can be
written only if bit NCRx.CCE is set.
NECNTx (x = 0-3)
Node x Error Counter Register (214H+x*100H) Reset Value: 0060 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
LEIN LET
0 EWRNLVL
C D
r rh rh rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TEC REC
rwh rwh
The Node Frame Counter Register NFCRx contains the actual value of the frame
counter as well as control and status bits of the frame counter.
NFCRx (x = 0-3)
Node x Frame Counter Register (218H+x*100H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
CFC CFC
0 0 CFMOD CFSEL
OV IE
r rwh rw r rw rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CFC
rwh
MOCTR0
Message Object 0 Control Register (061CH) Reset Value: 0100 0000H
MOCTR127
Message Object 127 Control Register (15FCH) Reset Value: 7F7E 0000H
MOCTRn (n = 1-126)
Message Object n Control Register
(0061CH+n*20H)
Reset Value: ((n+1)*01000000H)+((n-1)*00010000H)
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
SET SET SET SET SET SET SET SET SET SET SET
SET
0 TX TX TX RX RT MSG MSG NEW RX TX RX
DIR
EN1 EN0 RQ EN SEL VAL LST DAT UPD PND PND
w w w w w w w w w w w w w
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RES RES RES RES RES RES RES RES RES RES RES
RES
0 TX TX TX RX RT MSG MSG NEW RX TX RX
DIR
EN1 EN0 RQ EN SEL VAL LST DAT UPD PND PND
w w w w w w w w w w w w w
The MOSTATn is a read-only register that indicates message object list status
information such as the number of the current message object predecessor and
successor message object, as well as the list number to which the message object is
assigned.
MOSTAT0
Message Object 0 Status Register (061CH) Reset Value: 0100 0000H
MOSTAT127
Message Object 127 Status Register (15FCH) Reset Value: 7F7E 0000H
MOSTATn (n = 1-126)
Message Object n Status Register
(061CH+n*20H)
Reset Value: ((n+1)*01000000H)+((n-1)*00010000H)
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
PNEXT PPREV
rh rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TX TX TX RX RTS MSG MSG NEW RX TX RX
LIST DIR
EN1 EN0 RQ EN EL VAL LST DAT UPD PND PND
rh rh rh rh rh rh rh rh rh rh rh rh rh
The Message Object Interrupt Pointer Register MOIPRn holds the message interrupt
pointers, the message pending number, and the frame counter value of message
object n.
MOIPRn (n = 0-127)
Message Object n Interrupt Pointer Register
(0608H+n*20H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
CFCVAL
rwh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw rw rw
The Message Object Function Control Register MOFCRn contains bits to select and to
configure the function of message object n. It also holds the CAN data length code.
MOFCRn (n = 0-127)
Message Object n Function Control Register
(0600H+n*20H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
FRR
MSC DLC STT SDT RMM 0 OVIE TXIE RXIE
EN
rwh rwh rw rw rw rw rw rw rw rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DAT DLC ID GDF
0 0 MMC
C C C S
rw rw rw rw rw rw rw
MOFGPRn (n = 0-127)
Message Object n FIFO/Gateway Pointer Register
(0604H+n*20H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
SEL CUR
rw rwh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TOP BOT
rw rw
Message Object n Acceptance Mask Register MOAMRn contains the mask bits for the
acceptance filtering of message object n.
MOAMRn (n = 0-127)
Message Object n Acceptance Mask Register
(060CH+n*20H) Reset Value: 3FFF FFFFH
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
MID
0 AM
E
rw rw rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
AM
rw
Message Object n Arbitration Register MOARn contains the CAN identifier of message
object n.
MOARn (n = 0-127)
Message Object n Arbitration Register
(0618H+n*20H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
PRI IDE ID
rw rwh rwh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID
rwh
Table 22-12 Transmit Priority of Msg. Objects Based on CAN Arbitration Rules
Settings of Arbitrarily Chosen Message Comment
Objects A and B,
(A has higher transmit priority than B)
A.MOAR[28:18] < B.MOAR[28:18] Messages with lower standard identifier
(11 bit standard identifier of A less than have higher priority than messages with
11 bit standard identifier of B) higher standard identifier. MOAR[28] is the
most significant bit (MSB) of the standard
identifier. MOAR[18] is the least significant
bit of the standard identifier.
A.MOAR[28:18] = B.MOAR[28:18] Standard Frames have higher transmit
A.MOAR.IDE = 0 (send Standard Frame) priority than extended frames with equal
B.MOAR.IDE = 1 (send Extended Frame) standard identifier.
A.MOAR[28:18] = B.MOAR[28:18] Standard Data Frames have higher
A.MOAR.IDE = B.MOAR.IDE = 0 transmit priority than Standard Remote
A.MOCTR.DIR = 1 (send Data Frame) Frames with equal identifier.
B.MOCTR.DIR = 0 (send Remote Fame)
A.MOAR[28:0] = B.MOAR[28:0] Extended Data Frames have higher
A.MOAR.IDE = B.MOAR.IDE = 1 transmit priority than Extended Remote
A.MOCTR.DIR = 1 (send Data Frame) Frames with equal identifier.
B.MOCTR.DIR = 0 (send Remote Frame)
A.MOAR[28:0] < B.MOAR[28:0] Extended Frames with lower identifier
A.MOAR.IDE = B.MOAR.IDE = 1 have higher transmit priority than
(29-bit identifier) Extended Frames with higher identifier.
MOAR[28] is the most significant bit (MSB)
of the overall identifier (standard identifier
MOAR[28:18] and identifier extension
MOAR[17:0]). MOAR[0] is the least
significant bit (LSB) of the overall identifier.
Message Object n Data Register Low MODATAL contains the lowest four data bytes of
message object n. Unused data bytes are set to zero upon reception and ignored for
transmission.
MODATALn (n = 0-127)
Message Object n Data Register Low
(0610H+n*20H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
DB3 DB2
rwh rwh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DB1 DB0
rwh rwh
Message Object n Data Register High MODATAH contains the highest four data bytes
of message object n. Unused data bytes are set to zero upon reception and ignored for
transmission.
MODATAHn (n = 0-127)
Message Object n Data Register High
(0614H+n*20H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
DB7 DB6
rwh rwh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DB5 DB4
rwh rwh
LREFM LREFMFR
16 7
Reference REFM REFMFR
Message
Correctly
Transferred
16 7
SYNM SYNMFR
Frame_Sync
(SOF)
16 7 LTUR
LT LTFR
16 16 10 10
Increment 10
Adder TUR
by 1
New
Basic
Nominal CAN Cycle
Bit Time
TTCAN Level
NTU Timer Control TURADJ
tq
fCAN MCA05851
Note: Register LTUR is used for the internal automatic calculation of the new TURADJ
value. It is not visible for the user.
In TTCAN level 1, the LT counter is incremented once per CAN bit time. The fractional
part LTFR of the local time and the TUR are not taken into account.
In TTCAN level 2, the LT is extended by its fractional part LTFR. The TUR value is added
to the LTFR value with the update period tupd in order to generate a new LT value. If an
overflow occurs (carry active) after an addition of LTFR and TUR, the value of LT is
incremented by 1. As a result, the value of LT can change only in steps of 1, whereas
the value of LTFR changes in steps of TUR.
In order to cover a wide range of CAN baud rates with the same counting range of the
local timer, the counting can take place every CAN time quantum tq (tupd = tq). If another
resolution of the NTU is desired, the local time generation can also be based on the clock
fCAN, divided by a programmable factor that is independent from the CAN bit timing.
After the update period tupd has elapsed N times, the difference in local time dt has
elapsed to: dt = TURR.TUR/1024 × N × tupd.
message, the captured value becomes the reference mark REFM. The REFM value of
the previous reference mark is stored in LREFM.
The cycle time is still incremented while the reference message is received. After the end
of the correctly received reference message, the cycle time takes the value
corresponding to the length of this reference message. As a result, the cycle time seems
to start from zero each time a reference message starts (= with each new basic cycle).
6
Scheduler CSM
Reference Message
Cycle
Correctly Transferred 6
Control Unit BCC
MCA05852
16 7 16 7
Subtract
16 7
Add
Any 16 7
Frame_Sync 16 7
LT LTFR LOF LOFFR
For Transmission of Ref. Msg.
MCA05853
Due to possible variations of the LOF values from one reference mark to the other, the
current global time may contain discontinuities. In order to get a smooth (continuous)
behavior, a SW filter can be used for receiving nodes. The global time can be calculated
as shown below:
• Local Time + Local Offset or
• Cycle Time + Reference Mark + Local Offset
New Matrix
TTCNT
Cycle
Control
Interrupt Equal ?
Request
EXPTT
TTOF
TTUF ≥1
&
Transmit Trigger
Error Interrupt
TTIEN
MCA05854
Reference message
transferred correctly
or reset by software
STE = 1 ≥1
ETSSEL ETESEL ETM
0 000 00
ECTT1 001 01
0
.... ...
10 Reset
ECTT7 111 ETREV 1
11
Set
TRMC0 000
&
Valid RME Last transmit window reached
entry found TRMCx
Transmit enable No other message can be started ≥1 Send
window closed Reference
Message
Reset
NIG
Set/Reset
by SW
MCA05855
Figure 22-29 External Trigger Generation an Transmit Trigger for the Reference
Message
22.6.1 Overview
The message transmission and reception of the time-triggered part TTCAN is controlled
by a scheduler mechanism. This scheduler is based on the cycle time and delivers the
time marks. The time marks are defined by the time mark entries TMEx. Whenever a
time mark is reached, programmable actions (defined by scheduler memory instruction
entries INSTRxy) can take place. Typical instructions include, for example, starting the
transmission of a message, checking if a message has been received, opening or
closing arbitration windows, or generating interrupts.
Scheduler Memory
.....
INSTRn0 Update MSC
TMEn Update WTE
.....
INSTR21 Transmit Triggers
Scheduler
INSTR20 Instruction
Unit ARB
TME2
..... Interrupts
INSTR11
.... INSTR10 Reference
Message
TME1 Trigger TRMCx
MUX Scheduler
Addressing
TM n
16 BCC
Scheduler
Equal ? Cycle
Control Unit
16 CSM
REFM
MCA05856
Scheduler Memory
STPTR0 = STPTR0
Start Pointer to the End Address
first entry of each .....
of the Scheduler
Basic Cycle = TME1 Memory
BCE
INSTRnz
.....
INSTRn0
TMEn
.....
INSTR30
TME3
Scheduler Entries
INSTR2y
for TTCAN of
..... CAN Node 0
INSTR21
INSTR20
TME2
INSTR1x
.....
INSTR11
INSTR10
TME1
MCA05857
Therefore, the first entry read after BCE is STPTR0 in order to obtain the address where
TME1 is located.
The general transmit trigger control for the message objects to be transmitted when a
time mark is reached is performed by the message objects themselves. In order to
increase the flexibility, the result of the acceptance filtering done with the message
objects can be overruled by control entries. A reference message can be transmitted
only when the CAN node is enabled as time master.
Note: The number of scheduler entries following a time mark should not exceed the
number of 10. In order to minimize the required accesses to the scheduler memory
by the scheduler control part, the user should set up the system carefully.
TME
Time Mark Entry
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
IEN IEN IEN IEN
0 0 0 1 0 ARBM REC REC TRA TRA INP
F1 F0 F1 F0
rw rw rw rw r rw rw rw rw rw rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TMV
rw
Note: The interrupt settings given by the time mark entry can be overruled by a
subsequent valid interrupt control entry. The settings are valid until the next time
mark is reached. For the time after the next time mark, the settings read from the
next time mark entry become valid.
ICE
Interrupt Control Entry
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
IEN IEN IEN IEN
0 0 1 0 0 REC REC TRA TRA INP
F1 F0 F1 F0
rw rw rw rw r rw rw rw rw rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 MCYCLE 0 CYCLE
r rw r rw
Note: The interrupt settings of a valid interrupt control entry overrule the previously
stored interrupt settings for the next time mark. As a result, the use of more than
one valid interrupt control entry between two time mark entries should be avoided.
Arbitration Entry
The arbitration entry is defined as follows:
ARBE
Arbitration Entry
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0 0 1 1 0 ARBM 0
rw rw rw rw r rw r
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 MCYCLE 0 CYCLE
r rw r rw
Note: The arbitration settings of a valid arbitration entry overrule the previously stored
arbitration settings for the next time mark. As a result, the use of more than one
valid arbitration entry between two time mark entries should be avoided.
TCE
Transmit Control Entry
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
ALT TR
0 1 0 0 0 TCEMSGNR
MSG EN
rw rw rw rw r rw rw rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 MCYCLE 0 CYCLE
r rw r rw
Note: The message transmit settings of a valid transmit control entry overrule the
previously stored transmit settings and may also overrule the transmit acceptance
filtering of the message objects for the next time mark (depending on bit
ALTMSG). As a result, the use of more than one valid transmit control entry
between two time mark entries should be avoided.
RCE
Receive Control Entry
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
CH
0 1 0 1 0 RCEMSGNR
EN
rw rw rw rw r rw rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 MCYCLE 0 CYCLE
r rw r rw
Note: The settings of a valid receive control entry overrule the previously stored
information. As a result, the use of more than one valid receive control entry
between two time mark entries should be avoided.
3. If no receive control entry has been found valid for the current time window, the
reception and storage of messages depends only on the message object receive
acceptance filtering. Only message objects receiving messages with a valid receive
control entry modify their MSC bit field accordingly. The MSC bit field of a receiving
object is not modified without a valid receive control entry.
RME
Reference Message Entry
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0 1 1 0 GM 0
rw rw rw rw rw r
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TMV
rw
Note: This entry is taken into account for a time master. In the case that more valid
reference message entries are detected, the settings of the previously found
reference message entries are overruled by a subsequent one.
If the TTCAN node is not configured as time master and the scheduler reads an RME, a
configuration error is generated.
While the system is in the synchronization state, an RME entry with GM = 1 is taken into
account.
BCE
Basic Cycle End Entry
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0 1 1 1 GM 0
rw rw rw rw rw r
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TMV
rw
Note: The BCE determines the end of the scheduler entries in the scheduler memory
when the system is normally synchronized. When the time mark of this entry is
reached, the TTCAN node will automatically enter the Configuration Mode. It will
continue with the first time mark when a reference message has been correctly
transferred on the CAN bus.
While the system is in the synchronization state, a BCE entry with GM = 1 is also taken
into account.
Collect Collect
Instructions Instructions
Arbitration Arbitration
automatically cleared when the time mark is reached). As a result, this interrupt
indicates that a (no) message has been sent /received in the time window between
the time marks n-1 and n.
• Receive Control Entry:
Valid receive control information (CHEN, RCEMSGNR) controls the storage of a
message in the time window between the time marks n-1 and n.
• Arbitration Entry:
Valid arbitration information (ARBM) determines the behavior of the time window
starting with the time mark n.
• Transmit Control Entry:
Valid transmit control information (TREN, ALTMSG, TCEMSGNR) defines a
message to be transmitted after the time mark n. The transmission start is possible
while the transmit enable window is active for an exclusive window or for a short
(single) arbitration window or for the end of a merged arbitration window. For a
merged (long) arbitration window, the transmission can start during the complete
time window.
• Reference Message Entry:
not used in this time window
• Basic Cycle End Entry:
not used in this time window
The TMV value collected after time mark n-1 will become the new compare value for the
time mark n.
The value of CYCTMR.CSM equals the time mark number of the last time mark reached
(CSM = n after time mark n has been reached). The value of CYCTMR.BCC is number
of the current basic cycle. This information is needed to correctly set up the scheduler
entries (bit fields CYCLE, MCYCLE) and the message objects (bit fields CYCLE,
MCYCLE, COLUMN, MCOLUMN).
transfer of a reference message does not modify these flags). As a result, this
interrupt indicates that a (no) message has been sent /received in the last time
window of the basic cycle. The ICE for the last time window of a basic cycle must be
written into the scheduler memory after the entry TME1.
• Receive Control Entry:
Valid receive control information (CHEN, RCEMSGNR) collected during the last time
window of a basic cycle controls the storage of a message in the last time window
(not applicable to reference message). The RCE for the last time window of a basic
cycle must be written into the scheduler memory after the entry TME1.
• Arbitration Entry:
Valid arbitration information (ARBM) determines the behavior of the time window
starting with the time mark 1. This entry must be written into the scheduler memory
after the entry TME1.
• Transmit Control Entry:
Valid transmit control information (TREN, ALTMSG, TCEMSGNR) defines a
message to be transmitted after the time mark 1. The transmission start is possible
while the transmit enable window is active for an exclusive window or for a short
(single) arbitration window. For a merged (long) arbitration window, the transmission
can start during the complete time window. This entry must be written into the
scheduler memory after the entry TME1.
• Reference Message Entry:
The time mark value of a valid RME is defining the compare value for the reference
time mark. When this reference time mark plus the reference trigger offset is reached,
a reference message will be sent out (depending on the gap state of the system).
This entry must be written into the scheduler memory before a valid entry BCE.
• Basic Cycle End Entry:
The time mark value of a valid BCE is defining the compare value for the watch trigger
event. When this time value is reached, a watch trigger event can be generated
(depending on the gap state of the system). A valid BCE always finishes the
scheduler entries for each TTCAN node.
Before the reference message has been correctly received:
The value of CYCTMR.CSM equals the time mark number of the last time mark reached
(CSM = n after time mark n has been reached). The value of CYCTMR.BCC is number
of the current basic cycle. This information is needed to correctly set up the scheduler
entries RCE and ICE (bit fields CYCLE, MCYCLE).
After the reference message has been correctly received, but the time mark 1 has not
yet been reached:
The value of CYCTMR.CSM is 0. The value of CYCTMR.BCC is number of the new
basic cycle. This information is needed to correctly set up the scheduler entries ARBE
and TCE (bit fields CYCLE, MCYCLE) and the message objects (bit fields CYCLE,
MCYCLE, COLUMN, MCOLUMN).
As a result, the ICE and the RCE describing the reception / transmission of a message
in the last time window of a basic cycle lead to actions (interrupts, etc.) when time mark 1
is reached.
EOF
MCA05859
scheduler entries are then closed again with a BCE with GM = 0 (e.g. with a longer timing
value as a time-out criteria for a missing synchronization event).
• TME2
• RCE, ICE (CSM = 1, BCC = m)
• TCE, ARBE (CSM = 1, BCC = m)
• TME3
• RCE, ICE (CSM = 2, BCC = m)
• TCE, ARBE (CSM = 2, BCC = m)
• TMEn
• RCE, ICE (CSM = n-1, BCC = m)
• TCE, ARBE (CSM = n-1, BCC = m)
22.7.1 Configuration
After a reset operation, the TTCAN extension must be configured. The Configuration
Mode is entered automatically after reset or can be initiated through software by writing
TTFMR.CFGMEL = 01B. The Configuration Mode can be left only by software by writing
TTFMR.CFGMEL = 10B. The status flag TTSR.CFGM indicates whether or not the
Configuration Mode is active. This flag is automatically set when the corresponding CAN
node turns off its clock (disable request).
In Configuration Mode of the TTCAN node (CAN node 0 in TC1796), the following
actions must be performed, as indicated, by software or hardware:
For all nodes:
• The local time, the global time, and the cycle time are set to 0 (hardware).
• Transmission or reception of messages of TTCAN node is not possible, because the
results of the acceptance filtering are not enabled (hardware).
• An appropriate TUR value must be written to bit field TURR.TURADJ (software). This
value is automatically transferred to TURR.TUR (hardware).
• The scheduler memory entries must be initialized (software).
• The TTCAN control information (ID of reference message, etc.) and the TTCAN node
itself must be set up completely and enabled for CAN message transfer (software).
• After the complete configuration (software), TTFMR.CFGMEL must be set to 10B
(software).
• The local time starts after leaving the Configuration Mode (hardware).
• The synchronization phase is entered automatically when the Configuration Mode is
left (hardware). This is indicated by bit field TTSR.SYNCS = 01B (hardware).
• For time masters, the transmission of the reference messages is scheduled as in a
gap while the TTCAN node is in the “synchronizing” state. The scheduler entries
RME with GM = 1 are taken into account only while the TTCAN node is in the “in
schedule” state.
• For time masters and for time slaves, the scheduler entries BCE with GM = 1 are
taken into account only while the TTCAN node is in the “in schedule” state.
• Another entry (except EOS) than an RME or a BCE has been found after the first
RME.
• A reference message object is not valid when it is requested for transmission.
transfers of reference messages, the external trigger generation should be switched off
in this case.
TTIRR TTIER
NBC NMC NBCIE
New Basic
2 Cycle Interrupt
0 00
TTINPR
New Basic Cycle 01
NBCINP
New Matrix Cycle 10
0 11
TTIRR
SYNCSC MSRC ERRSC
TTSR
ERRS
2
State Change ≥1
2 Notification
MSR State Change Interrupt
2
SYNCS State Change
TTINPR
NOTIFINP
SYNCSCIE MSRCIE ERRSCIE
TTIER
Last Reference Message
≥1
indicates next-is-Gap
Last Reference Message
indicates Discontinuity
TTIRR TTIER
TENWER TENWERIE
Transmit Enable
Window Error ≥1
Interrupt
TTIRR TTIER
TTOF TTUF TTERIE
Transmit Overflow
≥1
Trigger
Error Underflow
Interrupt
TTIRR TTIER
IWTE WTE WTEIE
≥1 Error
Watch Trigger
Interrupt
Event Interrupt
TTINPR
TTIRR TTIER
ERRINP
AWDERR AWDIE
Application
Watchdog
Interrupt
TTIRR TTIER
Configuration Error ≥1
Error Type 2
Error Type 1
EOS Entry Read
TTIRR
TURERR
TURR
Time Unit Ratio Register (290H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
LT
TUR 0 LTDIV VAL
CS
rh r rw rw rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ADJ
TURADJ 0
EN
rwh r rwh
LTR
Local Time Register (280H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
LT
rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LTFR 0
rh r
SYNMR
Synchronization Mark Register (284H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
SYNM
rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SYNMFR 0
rh r
Note: If the CAN node is time master, the contents of register SYNMR are used as timing
data transferred in the reference message.
REFMR
Reference Mark Register (288H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
REFM
rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
REFMFR 0
rh r
LREFMR
Last Reference Mark Register (28CH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
LREFM
rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LREFMFR 0
rh r
CYCTMR
Cycle Time Register (294H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0 CSM 0 BCC
r rh r rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CYCTM
rh
LOR
Local Offset Register (298H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
LOF
rwh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
NEW
LOFFR 0 DISC
DISC
rwh r rh rh
Note: Register LOR can be written by software only if the CAN node is the current time
master or in Configuration Mode; otherwise, the write action is not taken into
account. Because the written local offset is only taken into account for the
transmission of the reference message, bit DISC is set automatically.
GMR
Global Mark Register (29CH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
GM
rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GMFR 0
rh r
LGMR
Last Global Mark Register (2A0H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
LGM
rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LGMFR 0
rh r
Note: The difference between the actual global mark and the last one can be used to
determine the value required for the TURR.TUR update (not for the actual time
master).
AWDR
Application Watchdog Register (2A4H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 AWDV
r rwh
The application watchdog event occurs when the value of AWDV is decremented and
reaches zero. When writing 0 to AWDV by software, the application watchdog is
switched off without generating an application watchdog event.
TTCR
Time Trigger Control Register (2C0H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
rw rw r rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TT
0 TMPRIO 0 ETM ETSSEL ETESEL TTM
LVL
r rw r rw rw rw rw rw
TTCFGR
Time Trigger Configuration Register (2C4H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
TTCNT RTO
rh rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EXPTT 0 IRO
rw r rw
The Time Trigger Status Register TTSR contains the time trigger status information that
does not lead directly to interrupt events.
TTSR
Time Trigger Status Register (2C8H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
ETR
0 ETR NIG 0 MSCMAX 0 MSCMIN
EV
r rh rh rh r rh r rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
REC TRA TM CFG REF
ARB EFF EFI 0 SYNCS MSR ERRS
F F PC M TRG
rh rh rh rh rh rh rh rh r rh rh rh
TTCAN status bits/flags can be modified when executing a write operation to the Time
Trigger Flag Modification Register TTFMR.
TTFMR
Time Trigger Flag Modification Register
(2CCH) Reset Value: 0000 0001H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ETR
0 STE NIGSR CFGMEL
EVR
r w w w w
The Time Trigger Interrupt Request Register TTIRR contains the time trigger status
information related to interrupt events. Note that all bits in TTIRR can be cleared by
software by writing 0 to it. Writing a 1 to the bits has no effect.
TTIRR
Time Trigger Interrupt Request Register
(2D0H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
TUR CFG
0
ERR ERR
r rwh rwh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SER SER SYN MSR ERR AWD I TT TT TEN
DISC WFE EOS WTE NBC NMC
R2 R1 CSC C SC ERR WTE OF UF WER
rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh
TTIER
Time Trigger Interrupt Enable Register
(2D4H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
NOT SYN MSR ERR TT TEN
SE AWD WTE NBC
0 IF CSC C SC 0 ER WER
IE IE IE IE
IE IE IE IE IE IE
r rw rw rw rw rw rw rw r rw rw rw
TTINPR
Time Trigger Interrupt Node Pointer Register
(2D8H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
r rw rw rw
STPTR0
Scheduler Start Pointer Node 0 Register
(17FCH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 STPTR
r rw
The TMV bit fields in the scheduler timing status registers monitor the time mark
information for the start of the next time window after the instruction collection phase of
the scheduler (collected from the TME, RME or BCE entries).
STSRL
Scheduler Timing Status Register Low
(2F0H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
BCETMV
rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RMETMV
rh
STSRH
Scheduler Timing Status Register High
(2F4H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
TCEMSGNR RCEMSGNR
rh rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TMETMV
rh
The bits in the scheduler instruction status register monitor the information during and
after the instruction collection phase of the scheduler. These values will become valid
when the next time mark is reached.
SISR
Scheduler Instruction Status Register
(2F8H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
BCE RME TME ARB ICE TCE RCE
0
V V V V V V V
r rh rh rh rh rh rh rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
IEN IEN IEN IEN
TR CH
ICF GM ARBM ALTMSG REC REC TRA TRA INP
EN EN
F1 F0 F1 F0
rh rh rh rh rh rh rh rh rh rh rh
Note: This register is reset at the start of a new instruction collection phase.
fCAN
MultiCAN Module Kernel P6.15 /
Clock A2
Control fCLC TXDCAN3
TXDC3
CAN P6.14 /
RXDC3 A2
Node 3 RXDCAN3
Address P6.13 /
Decoder Message TXDC2 A2
CAN TXDCAN2
Object Node 2 RXDC2
Linked P6.12 /
Buffer A2
List Port 6 RXDCAN2
DMA Control TXDC1
128 CAN Control P6.11 /
Objects Node 1 RXDC1 A2
INT_O TXDCAN1
Interrupt [3:0] P6.10 /
TXDC0 A2
Control CAN RXDCAN1
INT_O RXDC0
Node 0 P6.9 /
[15:4]
A2
TXDCAN0
INT_ P6.8 /
LTCA2 O15 A2
CAN Control RXDCAN0
GPTA1
Timing Control and Synchronization
GPTA0 ECTT3 ECTT1 P1.3 /
A1
REQ3
Scheduler ECTT2 P7.5 /
ECTT4 A1
ScheduleTiming DataMemory REQ7
SCU
Ext.Req.
ECTT5 Time-Triggered Extension TTCAN
Unit
MCA05864
fCLC
MCA05866
1
f CAN = f SYS × --- with n = 1024 - CAN_FDR.STEP (22.1)
n
n
f CAN = f SYS × ------------- with n = 0-1023 (22.2)
1024
Equation (22.1) applies to normal divider mode (CAN_FDR.DM = 01B) of the fractional
divider. Equation (22.2) applies to fractional divider mode (CAN_FDR.DM = 10B).
Note: The CAN module is disabled after reset. In general, after reset, the module control
clock fCLC must be switched on (writing to register CAN_CLC) before the
frequency of the module timer clock fCAN is defined (writing to register CAN_FDR).
CAN_CLC
CAN Clock Control Register (000H) Reset Value: 0000 0003H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FS SB E SP DIS DIS
0
OE WE DIS EN S R
r rw w rw rw r rw
Note: Additional details on the clock control register functionality are described in section
“Clock Control Register CLC” on Page 3-24 of the TC1796 User’s Manual
System Units part (Volume 1).
Note: In disabled state, no registers of the CAN module can be read or written except
the CAN_CLC register.
The fractional divider register allows the programmer to control the clock rate of the
module timer clock fCAN.
FDR
Fractional Divider Register (00CH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
DIS EN SUS SUS
0 RESULT
CLK HW REQ ACK
rwh rw rh rh r rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DM SC SM 0 STEP
rw rw rw r rw
Note: Additional details on the fractional divider register functionality are described in
section “Fractional Divider Operation” on Page 3-29 of the TC1796 User’s
Manual System Units part (Volume 1).
P6_IOCR8
Port 6 Input/Output Control Register 8(18H) Reset Value: 2020 2020H
31 28 23 20 15 12 7 4 0
rw r rw r rw r rw r
P6_IOCR12
Port 6 Input/Output Control Register 12(1CH) Reset Value: 2020 2020H
31 28 23 20 15 12 7 4 0
rw r rw r rw r rw r
PCx Coding
P6_PDR
Port 6 Pad Driver Mode Register (40H) Reset Value: 0000 0000H
31 30 28 27 26 24 23 22 20 19 18 16 15 0
PD PD PD
0 0 0 0 0 0
CAN23 CAN01 SSC1
r rw r rw r rw r rw r
4-bit
Interrupt
Pointer Interrupt Output Control
4
≥1
0000 .. .. Interrupt
.. 16 147 .. Request
Interrupt .. .
Source .. Outputs Inputs .. Output
. ..
INT_Om
1111
16
148
16 ≥1
TTCAN INT_O0
16
148
16
≥1
16 INT_O1
CAN
Node 16
0
16
..
.. ..
.. ..
.. ..
..
16 ..
..
16
Interrupt ..
CAN ..
Node 16 Wiring ..
3 Matrix ..
16 ..
..
..
16 ..
Message ..
Object 16
0
..
.. 148
.. ≥1
16 INT_O14
Message
Object 16 148
127 ≥1
INT_O15
Register 16
MITR
MCA05867
CAN_SRCm (m = 0-15)
CAN Service Request Control Register m
(0FCH-m*4H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SET CLR
SRR SRE 0 TOS 0 SRPN
R R
w w rh rw r rw r rw
Note: Additional details on service request nodes and the service request control
registers are described in section “Service Request Nodes” on Page 14-3 of the
TC1796 User’s Manual System Units part (Volume 1).
Some of the sixteen interrupt outputs of the MultiCAN module can be used to trigger
operations in the DMA controller and the GPTA module.
+F000 5FFFH
+F000 5800H
TTCAN
Scheduler
+F000 5600H Memory
MultiCAN
Registers
+F000 4300H
MultiCAN + FCH
Interrupt Service Request
Registers
..
Control Registers 0 - 15
+ C0H
+F000 4100H
Fractional Divider Register + 0CH
General Module Module Identification Reg. + 08H
Control Registers
F000 4000H Clock Control Register + 00H
MCA05868_mod
Figure 22-42 Complete MultiCAN Module Register Address Map with TTCAN
Controller 1 Controller 2
CPU CPU
MCA05869
Transfer Window
A Transfer Window is an address space in the address map of the transmitting controller.
Transfer Windows are typically assigned to a fixed address space (base address and
size). The Transfer Windows are the logical data inputs for the MLI transmitter. Data
write actions via MLI are initiated by a write access to a Transfer Window, whereas data
read actions are started by a read access from a Transfer Window.
Each MLI module supports up to four independent Transfer Windows, one for each pipe.
In the implementation of a specific device, a Transfer Window can appear at several
locations in the address map. Here, each Transfer Window can be accessed at two
different address ranges with two different window sizes (one 64 Kbyte and one 8 Kbyte
area for each Transfer Window), leading to:
• Four Small Transfer Windows STW with 8 Kbyte address range each and
• Four Large Transfer Windows LTW with 64 Kbyte address range each
If the address areas of the four small transfer windows together form a 64 Kbyte address
range (aligned to its size), then a single MLI pipe can pass through a device with several
MLI modules before being split up in a target device into 4 independent Remote
Windows.
Remote Window
A Remote Window is an area in the address space of the receiving controller. Remote
Window parameters (base address and size) of the receiving controller are
programmable by the transmitting microcontroller by MLI transfers, independently for
each pipe. Each Remote Window of a receiving controller is related to specific Transfer
Window of the transmitting controller.
The Remote Windows are the logical data outputs of the MLI receiver. If enabled, the
MLI module can automatically execute the requested data transfer to/from the defined
address location in the Remote Window. If the automatic data handling is disabled, the
offset and the data are available in the MLI receiver registers and have to be handled by
software. Remote windows can not be accessed by read or write accesses by software
of the Remote Controller (either the data is automatically transferred or it is located in
receiver registers).
Pipe
A pipe defines the logical connection between a Transfer Window in the transmitting
controller and the associated Remote Window in the receiving controller. The MLI
protocol supports four independent pipes.
Frame
A frame is a contiguous set of bits forming a message sent by an MLI transmitter to an
MLI receiver.
A Normal Frame is a frame used for data exchange between a transmitting and a
receiving controller (read request and write data from a Local Controller to a Remote
Controller, as well as the answer to a read request back to the Local Controller). Base
address copy frames are also considered as Normal Frames.
A Command Frame contains information about the receiver setting or triggers actions
in the MLI receiver.
Offset
The offset is an address distance relative to the base address of the Transfer Window in
the transmitting controller and the base address of the Remote Window in the receiving
controller. For example, a write access to the 10th byte of the Transfer Window is
transferred to a write to the 10th byte of the Remote Window.
The offset of a write access to a Transfer Window is also called write offset, whereas a
read offset is related to a read access from a Transfer Window.
Address Complete
MLI Module MLI Module
Space Address
Space
Write
Transfer 1)
Read Transmitter Receiver
Window
Remote
Window
Interrupt 2)
Receiver Transmitter
introduced into the data stream back to the Local Controller (Answer Frame). Then, the
CPU in the Local Controller is informed by an MLI event that the requested data is now
available and can be read.
MCA05872
The location of a Transfer Window (base address and size) in the Local Controller is
always fixed in a specific product device. Remote windows can be freely moved and
located within the address space of the receiving controller. They are used to overlay
address ranges of peripheral modules or internal memories.
Buffer Size =
31 BS0-1 0 BS0
Area 0 2
Base Address 0 0 ….. 0
Pipe 0 Remote Window 0
31 BS1-1 0
Buffer Size =
Area 1 2 BS1
Base Address 1 0 ….. 0
Buffer Size =
31 BS3-1 0 BS3
Area 3 2
Base Address 3 0 ….. 0
Pipe 3 Remote Window 3
MLI_Rwindow_BAC
Figure 23-5 shows the generation of the complete Remote Window address without
address prediction. The variable address part can be transferred as offset by a write or
a Read Frame, or it can be predicted in case of regular address modifications, whereas
the fixed part of the address is defined by the upper bits of the base address.
In case of address prediction, the variable address part is internally calculated and taken
as lower address bits of the target address (the upper address bits are given by the
Remote Window’s base address).
MLI Transmitter
BSx-1 0
MLI Receiver
Transfer Offset
Window
Pipe x 1) 31 BSx 0
MLI_Rwindow _offs
Address Match
Prediction Address
Predicted Offset Prediction
31 BSx 0 Current Offset
MLI_Rwindow_pred
Answer Frame
Receiver Transmitter
MCA05877
FC PN P
FC = Frame Code
PN = Pipe Number
P = Parity MCA05878
Header
0 1 2 3 4 31 32 35 36
0 0 PN Base Address (28-bit ) BS P
MCA05879_mod
More details on the Copy Base Address Frame handling of the MLI module are
described on Page 23-26.
Header
0 1 2 3 4 12+m
0 1 PN m-Bit Offset Address 8-Bit Data P
Header
0 1 2 3 4 20+m
0 1 PN m-Bit Offset Address 16-Bit Data P
Header
0 1 2 3 4 36+m
0 1 PN m-Bit Offset Address 32-Bit Data P
MCA05880_mod
Header
0 1 2 3 4 11 12
1 1 PN 8-Bit Data P
Header
0 1 2 3 4 19 20
1 1 PN 16-Bit Data P
Header
0 1 2 3 4 35 36
1 1 PN 32-Bit Data P
MCA05884_mod
Header
0 1 2 3 4 6+m
0 1 PN m-Bit Offset Address DW P
MCA05881_mod
More details on the Discrete Read Frame handling of the MLI module are described on
Page 23-32.
Header
0 1 2 3 4 5 6
1 1 PN DW P
MCA05885_mod
Header
0 1 2 3 4 7 8
1 0 PN CMD P
MCA05882_mod
More details on the Command Frame handling of the MLI module are described on
Page 23-39.
Header
0 1 2 3 4 11 12
1 0 PN 8-Bit Data P
Header
0 1 2 3 4 19 20
1 0 PN 16-Bit Data P
Header
0 1 2 3 4 36 37
1 0 PN 32-Bit Data P
MCA05883_mod
Controller 1 Controller 2
MCA05873_mod
with propagation delays in the range of some shift clock cycles and to avoid the closed-
loop delay limitations of an SPI connection.
In a full handshake, each edge of the handshake signals has a defined meaning and the
sequence of edges is clearly specified.
As a result, the propagation delays do not directly limit the MLI baud rate. Therefore, the
points in time when a signal is generated, when it is visible on the physical interface line,
or when it is evaluated have to be considered independently. This is done by defining 3
different names for a signal, referring to the 3 significant locations:
• The place where it is generated, also in relation to the generation clock edge
• The physical interface line where it can be observed
• The place where it is evaluated, also in relation to the evaluation clock edge
If a Local Controller should be connected to more than one Remote Controller, the
transmitter signals CLK and DATA can be used as broadcast signals (parallel connection
to the Remote Controllers), whereas the handshake signals VALID and READY have to
be established as independent signal pairs for each device. As a result, a Local
Controller only needs one CLK and one DATA output, but an individual set of READY
and VALID handshake signals for each Remote Controller. Please note that Read
Frames and Answer Frames are based on an established connection between a Local
and a Remote Controller (because the Answer Frame is the only frame sent back to the
Local Controller). Therefore, switching between several Remote Controllers can only be
done while no read request is pending in the Local Controller. If no Read Frames are
used by the Local Controller, frames can be sent out in parallel to all Remote Controllers
if their READY signals are all respected.
If a Remote Controller should be connected to several Local Controllers, it may have
several DATA and CLK inputs in addition to the READY-VALID signal sets. Please note
that an active switching of a Remote Controller between several Local Controllers
requires that all Local Controllers have the information which connection is active.
In any case, switching between Local and Remote Controllers is not allowed while frame
transmission is in progress.
too. This check is used as life-sign of the receiver and the MLI transmitter can detect
whether the receiver is able to react in-time to the transmitter actions (see also
Chapter 23.1.3.4).
TCLK
TREADY
TVALID
TDATA FC P
MCT05874_mod
transmitter automatically sends the last frame again after a parity error indication.
Optionally, this MLI event can activate a service request output.
TCLK
TREADY
TVALID
TDATA FC P
MCT05875_mod
TCLK
TREADY
Non-acknowledge
Error
TVALID
MCT05876_mod
TPxBAR is written
TPxSTATR.BS := TPxBAR.BS
TCBAR.ADDR := TPxBAR.ADDR
TRSTATR.PN := x
TRSTATR.BAV := 1
TREADY = 1
Parity check & acknowledge frame
MCA05888_mod
Transmitting Controller
The transmission of a Copy Base Address Frame is started after a transmitter pipe x
base address registers TPxBAR has been written, triggering the following actions for
pipe x.
• Bit field TPxBAR.BS (4-bit coded buffer size) is loaded into bit field TPxSTATR.BS
• Bit field TPxBAR.ADDR (28 most significant base address bits) is loaded into bit field
TCBAR.ADDR.
• Status bit field TRSTATR.PN is updated with the pipe number x (for example x = 2
when TP2BAR has been written).
• Status flag TRSTATR.BAV (base address valid) becomes set.
• The transmission of a Copy Base Address Frame with the two buffered parameters
TCBAR.ADDR and TPxSTATR.BS is started for pipe x (if the corresponding pipe is
idle and TREADY = 1).
• Status flag TRSTATR.BAV (in the transmitting controller) is cleared after the Copy
Base Address Frame has been finished and correctly acknowledged by the MLI
receiver of the receiving controller.
• MLI event status flag TISR.NFSIx (Normal Frame Sent event in pipe x) is set and a
service request output is activated if enabled by TIER.NFSIEx = 1.
Note: After the transfer of a Copy Base Address Frame the optimized mode will be
suppressed automatically by hardware for the next two data frames. This ensures
a correct offset prediction afterwards.
Receiving Controller
When a Copy Base Address Frame for pipe x has been received correctly and
acknowledged, the following actions are executed in the MLI receiver.
• The received 28 most significant address bits are written into the receiver pipe x base
address register bit field RPxBAR.ADDR. This bit field determines the base address
of the pipe x Remote Window.
• The received 4-bit coded buffer size is stored in the receiver pipe x status register bit
field RPxSTATR.BS. This bit field determines the number of variable address bits for
the offset (determining the size) of the pipe x Remote Window.
• The information about the received frame type (= 00B for Copy Base Address Frame)
is written into the receiver control register bit field RCR.TF.
• MLI event status flag RISR.NFRI (Normal Frame Received event) is set and a service
request output is activated if enabled by RIER.NFRIE = 01B or 10B.
TPxAOFR.AOFF := Offset
TPxDATAR.DATA:= Data
TPxSTATR.DW := Width
TRSTATR.DVx := 1
yes
TCR.NO = 1 ? Send "Write Offset and
Data Frame" of pipe x
no
Parity check & acknowledge frame
Address Prediction:
Calculate TPxSTATR.AP RADRR.ADDR, RPxBAR.ADDR :=
and TPxSTATR.OP RPxBAR modified by Offset
Send "Optimized Write
yes Frame" of pipe x
TPxSTATR.OP = 0 ?
no Parity check & acknowledge frame
RADRR.ADDR, RPxBAR.ADDR :=
RPxBAR.ADDR + RPxSTATR.AP
TREADY = 1
RDATAR.DATA := Data
RCR.DW := Detected data
TRSTATR.DVx := 0 width
TISR.NFSIx := 1 RCR.TF := 10B
RIER.NFRI := 1
Normal Frame
Sent x Event Normal Frame
Received Event
MCA05890_mod
Transmitting Controller
In the transmitting controller, a write operation to a location within a Transfer Window
delivers the address, the data, and the data size to the transmitter and triggers the
following actions in the MLI transmitter.
• The 16 least significant address bits of the Transfer Window write access are stored
in TPxAOFR.AOFF as write offset address. In case of a an access to a Small
Transfer Window, also 16 bits are stored, but the higher bits are not taken into
account.
• The data of the write access to the Transfer Window is stored in TPxDATAR.DATA.
• The data width of the write access to the Transfer Window (8-bit, 16-bit, or 32-bit) is
stored in bit field TPxSTATR.DW.
• Status flag TRSTATR.DVx (data valid) is set, indicating that the pipe contains valid
data for transmission.
• If the address prediction method is disabled (TCR.NO = 1), the transmission of a
Write Offset and Data Frame is started as soon as the MLI transmitter is idle, no
higher priority frames are pending, and TREADY = 1.
If the address prediction method is enabled (TCR.NO = 0), a Write Offset and Data
Frame is started only if an address prediction is not possible (indicated by
TPxSTATR.OP = 0). If TPxSTATR.OP = 1, an address prediction is possible in the
MLI transmitter (and the MLI receiver) and an Optimized Write Frame can be started.
The address prediction method used is described on Page 23-45.
• Status flag TRSTATR.DVx is cleared by hardware and MLI event status flag
TISR.NFSIx (Normal Frame Sent event in pipe x) is set (and a service request output
is activated if enabled by TIER.NFSIEx = 1) after the Write Frame has been finished
and correctly acknowledged by the MLI receiver.
The number m of offset address bits that are transmitted at a Write Offset and Data
Frame is determined by the size of the Remote Window in the receiving controller that
has been previously initialized by the transmission of a Copy Base Address Frame.
Parameter m is referring to bit field TPxSTATR.BS (and RPxSTATR.BS) and can be in
the range of 1 to 16 bits.
m = TPxSTATR.BS
x = Pipe Number MCA05880
Header TPxDATAR.DATA[7:0]
0 1 2 3 4 11 12
Header TPxDATAR.DATA[15:0]
0 1 2 3 4 19 20
Header TPxDATAR.DATA[31:0]
0 1 2 3 4 35 36
Receiving Controller
After a Write Frame has been received correctly and acknowledged, the following
actions are automatically executed in the MLI receiver:
• In the case of a Write Offset and Data Frame:
The result of the internal address prediction is not taken into account. The received
offset address is added to the base address of the pipe x Remote Window and the
result is stored in RPxBAR.ADDR. It is also stored in RADDR.ADDR and represents
the destination address in the receiving controller where data should be written to.
In the case of an Optimized Write Frame:
The result of the internal address prediction is taken into account. The next address
in the receiving controller where data should be written to is calculated by adding the
detected receiver address prediction value RPxSTATR.AP to the actual address
stored in RPxBAR.ADDR and the result is stored in RPxBAR.ADDR and in
RADDR.ADDR.
• The received data is written into the receiver data register RDATAR (right aligned,
unused bits are 0).
• The detected data width of the received data is written into bit field RCR.DW.
• The information about the received frame type (= 10B for a Write Frame) is written
into bit field RCR.TF.
• MLI event status flag RISR.NFRI (Normal Frame Received event) is set and an SR
output line is activated if enabled by RIER.NFRIE = 01B or 10B.
After these actions related to the reception of a Write Frame by the receiving controller,
the data that has been received from the transmitting controller is ready to be written into
the Remote Window related to the receiving pipe.
This write operation can be executed in two ways:
• RCR.MOD = 0: Automatic Data Mode is disabled.
In this mode, a bus master of the receiving controller, typically a CPU, is informed by
a Normal Frame received event RISR.NFRI (a service request output is activated if
RIER.NFRIE = 10B) to transfer the received write data from the MLI receiver to the
Remote Window. Therefore, it must read the data from RDATAR, together with width
RCR.DW and the address stored in RADRR and write it to the indicated address
location.
• RCR.MOD = 1: Automatic Data Mode is enabled.
In this mode, the MLI module automatically writes the received write data to the
Remote Window. This automatic action is controlled by a move engine block in the
MLI receiver. It also sets event status flag RISR.MEI (move engine event when the
access is terminated). A service request output is activated if enabled by
RIER.MEIE = 1.
The write operation to the Remote Window is executed only if the write address is
within an enabled access protection range. If the address range is disabled for the
write address, the automatic write action does not take place and event status flag
RISR.MPEI (memory protection error) is set and a service request output is activated
no yes
RCR.MOD = 1 ?
TPxAOFR.AOFF := Offset
TPxSTATR.DW := Width
TRSTATR.DVx := 1
TRSTATR.RPx := 1
yes
TCR.NO = 1 ? Send "Discrete Read
Frame" of pipe x
no
Parity check & acknowledge frame
Address Prediction:
Calculate TPxSTATR.AP RADRR.ADDR, RPxBAR.ADDR :=
and TPxSTATR.OP RPxBAR modified by Offset
Send "Optimized Read
yes Frame" of pipe x
TPxSTATR.OP = 0 ?
no Parity check & acknowledge frame
TRSTATR.DVx := 0
TISR.NFSIx := 1 RCR.DW := Width
TSTATR.APN := x
Normal Frame RCR.TF := 01B
Sent Event RISR.NFRI := 1
Parity check & acknowledge frame Read Data from Remote Window
RDATAR.DATA := Read Data (see separate figure)
RCR.DW := Width
RCR.TF := 11B
TRSTATR.RPx := 0
RISR.NFRI := 1 TREADY = 1
Local Controller
A read operation from a location within a Transfer Window x of the Local Controller
delivers a dummy value as result of the read action and triggers the transmission of a
Read Frame. The dummy value of the initial read action should be ignored and the
software has to wait for the reception of the Answer Frame to get the desired data.
• The 16 least significant address bits of the Transfer Window read access are stored
in TPxAOFR.AOFF as read offset address. In case of a an access to a Small Transfer
Window, also 16 bits are stored, but the higher bits are not taken into account.
• The data width of the Transfer Window read access (8-bit, 16-bit, or 32-bit) is stored
in bit field TPxSTATR.DW.
• Status flag TRSTATR.DVx (data valid) is set.
• Status flag TRSTATR.RPx (read pending) is set. This bit is cleared by hardware
when an Answer Frame has been received correctly.
• If the address prediction method is not enabled (TCR.NO = 1), transmission of a
Discrete Read Frame is started. If the address prediction method is enabled
(TCR.NO = 0), a Discrete Read Frame is started only if an address prediction is not
possible (indicated by TPxSTATR.OP = 0). If TPxSTATR.OP = 1, an address
prediction is possible and an Optimized Read Frame is started.
• Status flag TRSTATR.DVx is cleared by hardware and MLI event status flag
TISR.NFSIx (Normal Frame Sent event in pipe x) is set (and a service request output
is activated if enabled by TIER.NFSIEx = 1) after the Read Frame has been finished
and correctly acknowledged by the MLI receiver of the Remote Controller.
The number m of offset address bits that are transmitted at a Discrete Read Frame is
determined by the (coded) size of the Remote Window in the Remote Controller that has
been previously initialized by the transmission of a Copy Base Address Frame.
Parameter m is stored in bit field TPxSTATR.BS (and RPxSTATR.BS) and can be in the
range of 1 to 16 bits.
After a completed transmission of a Read Frame, the Local Controller expects the
reception of an Answer Frame. The Answer Frame is introduced with the highest priority
into the data flow of the transmitter of the Remote Controller.
TPxSTATR.DW
Header TPxAOFR.AOFF
0 1 2 3 4 6+m
m = TPxSTATR.BS
x = Pipe Number
DW = Data Width MCA05881
TPxSTATR.DW
0 1 2 3 4 5 6
1 1 x DW P
Header
DW = Data Width
x = Pipe Number
MCA05885
Remote Controller
After a Read Frame has been correctly received and acknowledged, the following
actions are executed in the MLI receiver of the Remote Controller:
• In the case of a Discrete Read Frame:
The result of the address prediction is not taken into account. The received offset
address is added to the base address of the pipe x Transfer Window (stored in
RPxBAR.ADDR). The result of this addition is stored in RADRR.ADDR and also in
RPxBAR.ADDR and represents the destination address in the Remote Controller
from where data should be read.
In the case of an Optimized Read Frame:
The result of the address prediction is taken into account. The next address in the
Remote Controller where data should be read is calculated by adding the detected
receiver address prediction value RPxSTATR.AP to the actual address stored in
RPxBAR.ADDR. The result of this addition is stored in RADRR.ADDR and also in
RPxBAR.ADDR and represents the destination address in the Remote Controller
from where data should be read.
• The transmitted data width DW is written into bit field RCR.DW.
• The information about the received frame type (= 01B for a Read Frame) is written
into bit field RCR.TF.
• MLI event status flag RISR.NFRI (Normal Frame Received event) is set and a service
request output is activated if enabled by RIER.NFRIE = 01B or 10B.
After correct reception of a Read Frame by the Remote Controller, the data requested
by the Local Controller can be read by the Remote Controller and sent back to the Local
Controller in form of an Answer Frame.
This read operation can be executed in two ways:
• RCR.MOD = 0:
Automatic Data Mode is disabled. In this mode, a bus master of the Remote
Controller, typically a CPU, is informed by a Normal Frame received event to read the
requested read data and transfer it to the MLI receiver. Therefore, it must read data
with width RCR.DW from the address stored in RADRR and write the data into
TDRAR.DATA.
• RCR.MOD = 1:
Automatic Data Mode is enabled. In this mode, the move engine of the MLI
automatically reads the data from the Remote Window and sets event status flag
RISR.MEI (move engine access terminated). A service request output is activated if
enabled by RIER.MEIE = 1.
The read operation from the Remote Window is executed only if the read address is
within an enabled access protection range. If no address range is enabled for the
actual read address, the automatic read action is not executed by the move engine,
event status flag RISR.MPEI (memory protection error) is set and a service request
output is activated if enabled by RIER.MPEIE = 1. In the interrupt handler routine, a
bus master (e.g. CPU or PCP) must then take care of the remote window read
operation and the data transfer to TDRAR.
• After TDRAR.DATA has been updated, status flag TRSTATR.AV of the Remote
Controller is set and the transmission of an Answer Frame is started.
no yes
RCR.MOD = 1 ?
Write to TDRAR.DATA
TRSTATR.AV := 1
MLI_RFHRS
• The TRSTATR.RPx flags are cleared. In future versions, it is intended to clear only
the flag belonging to pipe x.
• The received data is written into the receiver data register RDATAR.
If 8 data bits are received, they are duplicated to all 4 bytes in RDATAR.
If 16 data bits are received, they are duplicated to both half-words in RDATAR.
• The detected data width of the received data is written into bit field RCR.DW.
• The received Pipe Number x represents the answer Pipe Number and is written into
bit field TSTATR.APN.
• The information about the received frame type (= 11B for an Answer Frame) is written
into bit field RCR.TF.
• MLI event status flag RISR.NFRI (Normal Frame Received event) is set and a service
request output is activated if enabled by RIER.NFRIE = 01B or 10B.
• The content of RADRR becomes invalid.
• The data that has been previously requested from the Remote Controller by a Read
Frame is now available in RDATAR and can be read by a bus master (e.g. the CPU)
of the Local Controller.
• If an Answer Frame is received while the corresponding TRSTATR.RPx bit is 0, the
reception is declared as unintended and a Discarded Read Answer event is
generated (see Page 23-60).
Header TDRAR.DATA[7:0]
0 1 2 3 4 11 12
Header TDRAR.DATA[15:0]
0 1 2 3 4 19 20
Header TDRAR.DATA[31:0]
0 1 2 3 4 36 37
PN = TSTATR.APN MCA05883
Non-Acknowledge handshake. If the received data has been read out, frame
execution and reception continue normally.
TCMDR.CMDPx is
written
TRSTATR.CV := 1
Interrupt Command
Frame Event
Pipe x: RISR.CFRIx := 1
Command Frame
Received Event
MCA05889_mod
Transmitting Controller
The transmission of a Command Frame is initiated by writing one of the four pipe x
related command code bit fields in register TCMDR.CMDPx, triggering the following
actions:
• Status flag TPxSTATR.CVx (command valid) is set and the Command Frame
transmission is started using x as pipe number PN and the command code stored in
TCMDR.CMDPx as parameters.
• TRSTATR.CVx is cleared after the Command Frame has been finished and correctly
acknowledged by the MLI receiver of the Remote Controller.
• MLI event status flag TISR.CFSIx (Command Frame Sent event in pipe x) is set and
a service request output is activated if enabled by TIER.CFSIEx = 1.
Receiving Controller
Depending on the pipe x related command code that is transmitted by a Command
Frame, different actions are triggered in the receiving controller. Table 23-5 describes
the actions that are transmitted by a Command Frame and that cause a specific control
task in the MLI receiver.
• The received PN value is checked and the corresponding control actions are
executed according to Table 23-5.
• Independent of the received Pipe Number, event status flag RISR.CFRIx (Command
Frame Received event in pipe x) is set and a service request output is activated if
enabled by RIER.CFRIEx = 1.
If a Command Frame is received for pipe 2 with command code 1111B, the BRKOUT
output signal of the MLI module becomes activated if it is enabled by bit RCR.BEN = 1.
If disabled by RCR.BEN = 0, signal BRKOUT will not be activated. The usage of
BRKOUT is implementation-specific and can be used, for example, to generate a break
condition in the on-chip debug support logic or trigger other functions.
Transmitting Controller
The MLI transmitter counts the detected parity error conditions and generates a parity
error event if a programmable number (max. 16) of parity error conditions has occurred.
A parity error condition is indicated to the transmitter by the receiver after the
transmission of a frame (see Page 23-23). The transmitter parity error condition is
detected when the TREADY signal is sampled at low level within a programmable
number (TCR.MDP = maximum delay for parity errors) of TCLK clock cycles after
TVALID has been de-asserted to low.
If a transmitter parity error condition is detected, the MLI transmitter sets the parity error
flag TSTATR.PE and also decreases the maximum parity error counter TCR.MPE by 1.
The maximum parity error counter of the transmitter TCR.MPE determines the number
of transmit parity error conditions that can be still detected until a transmitter parity error
event is generated. If a transmitter parity error condition is detected and TCR.MPE is
becoming 0 or while it is 0, a transmitter parity error event is generated by setting bit
TISR.PEI (see Figure 23-39 on Page 23-58) and an SRx output line is activated if
enabled by TIER.PEIE = 1. After a transmitter parity error event occurred, TCR.MPE can
be set again by software to a value greater 0001B. Otherwise, each additional transmitter
parity error condition will generate a parity error event.
The transmitter parity error flag TSTATR.PE is cleared by hardware when a correct
frame transmission and TREADY has been sampled with 1 within the ready delay time.
It can be cleared by software by writing a 1 to bit SCR.CTPE. If for example, each
transmitter parity error condition should generate a transmitter parity error event,
TCR.MPE should be set to 0000B. The software can check for accumulated parity error
conditions by reading TCR.MPE or TISR.PEI, for the status of the latest received frame,
it can check TSTATR.PE.
TCR.MDP
TCLK
With parity
TREADY error indication
TVALID
TDATA P
MLI_PEIT
Receiving Controller
The receiver always checks the parity bit of a received frame for even parity. A receiver
parity error condition is detected if the received parity bit does not match with the
internally calculated one. If no receiver parity error condition is found after the reception
of a frame, RREADY is immediately set to 1, otherwise RREADY is kept at 0 until a
defined number of RCLK cycles (determined by bit field RCR.DPE = delay for parity
error) has been elapsed. Then, RREADY is asserted high.
If a receiver parity error condition is found, the MLI receiver sets the parity error flag
RCR.PE and additionally decreases the maximum parity error counter of the receiver
RCR.MPE by 1. The maximum parity error counter RCR.MPE determines the number of
receiver parity error conditions that can be still detected until a receiver parity error event
is generated. If a receiver parity error condition is detected and RCR.MPE is becoming
0 or while it is already 0, a receiver parity error event is generated by setting bit RISR.PEI
(see Figure 23-43 on Page 23-61) and a service request output is activated if enabled
by RIER.PEIE = 1. After a receiver parity error event has occurred, RCR.MPE can set
again by software to a value greater 0001B. If, for example, each receiver parity error
condition should generate a receiver parity error event, RCR.MPE can be programmed
to 0000B or 0001B.
The receiver parity error flag RCR.PE is cleared by hardware if a correct frame
transmission has occurred. RCR.PE can be cleared by software by writing a 1 to bit
SCR.CRPE.
The receiver parity error flag RCR.PE is cleared by hardware after a correct frame
reception. It can be cleared by software by writing a 1 to bit SCR.CRPE. The software
can check for accumulated parity error conditions by reading RCR.MPE or RISR.PEI, for
the status of the latest received frame, it can check RCR.PE.
The delay for parity error bit field RCR.DPE is a read-only bit field in the receiver that
updated by hardware if a Command Frame for pipe 1 is received. With this frame type,
the transmitting controller transfers a value for RCR.DPE to the receiving controller
during the setup phase of the MLI connection.
RCR.DPE
RCLK
RVALID
RDATA P
MLI_PEIR
Transmitting Controller
If the address prediction method is enabled (TCR.NO = 0), the MLI transmitter compares
the offset of each Transfer Window read or write access with the offset of the previous
access to the same Transfer Window (stored in TPxAOFR.AOFF). The result of this
comparison is stored in two’s complement representation in TPxSTATR.AP (limited to 9
bits, otherwise prediction is not possible). Between the accesses to a specific window,
other windows can be accessed without disturbing the prediction.
If the offset differences are identical in at least two consecutive accesses to the same
Transfer Window, an address prediction is possible (flag TPxSTATR.OP becomes set)
and optimized frames can be sent to the receiving controller for this pipe. If the offset
difference of a next access to the same Transfer Window does not match the calculated
value in TPxSTATR.AP, flag TPxSTATR.OP is cleared and address prediction is not
possible. In this case, a Normal Frame for writing or reading (Write Offset and Data
Frame or Discrete Read Frame) is started.
Receiving Controller
The MLI receiver operates with an address prediction method equivalent to the MLI
transmitter. This means that after receiving at least two consecutive Write Offset and
Data Frames and/or Discrete Read Frames that include address information, the MLI
receiver is able to follow the address prediction method used by the MLI transmitter.
Each received offset is compared in the MLI receiver with the offset of the previously
received frame of the same pipe. The result of this comparison is stored in two’s
complement representation in RPxSTATR.AP (limited 9 bits).
If an optimized frame is received by the MLI receiver, it calculates the next address by
adding the value stored in RPxSTATR.AP to the contents of the receiver address
register RADRR.
In case of a Write Offset and Data Frame or a Discrete Read Frame (m offset bits), the
receiver address registers RADRR and RPxBAR are always loaded with an updated
address. This address is calculated by replacing the lowest m bit positions in RPxBAR
with the received offset value. In this case, the address delta value stored in
RPxSTATR.AP is not taken into account. The programmed size of the Remote Window
and the number m of offset bits are given by RPxSTATR.BS. The bit positions
RPxBAR[31:m] are kept constant, whereas the bit positions RPxBAR[m-1:0] are
replaced.
TREADY[D:A] 4
TVALID[D:A] 4
Fract . MLI I/O
Divider Transmitter Control TDATA
fSYS
TCLK
fML I Port
BRKOUT MLI Module
Control
RCLK[D:A] 4
SR[7:0] RREADY[D:A] 4
Move MLI I/O
Engine Receiver Control RVALID[D:A] 4
RDATA[D:A] 4
MCB05870_mod
1) Other services (e.g. an automatic boot sequence or a boot routine) can change the OICR setting. Differing
values are then indicated in the corresponding implementation chapter.
TVPA
TVEA &
0
TVALIDA
1
TVPB
TVEB &
0
TVALIDB
1
TVALID TVPC
TVEC &
0
TVALIDC
1
MLI
Transmitter TVPD
TVED &
0
TVALIDD
1
MLI Transmitter
I/O Control Logic TDP
TDATA 0
TDATA
1
TCP
TCE &
0
TCLK TCLK
1
2
TRE TRP TRS
00 TREADYA
& 01 TREADYB
TREADY 0
10 TREADYC
1
11 TREADYD
Note: All control bits shown in this figure are located in register OICR .
MCA05886_mod
RRPA
0
RREADYA
1
RRS
RRPB
2
0
RREADYB
00 1
01
RREADY RRPC
10
11 0
RREADYC
1
RRPD
MLI 0
RREADYD
Receiver 1
MLI Receiver 2
RDP RDS
I/O Control
Logic 00 RDATAA
01 RDATAB
0
RDATA 10 RDATAC
1
11 RDATAD
2
RCE RCP RCS
00 RCLKA
& 01 RCLKB
RCLK 0
10 RCLKC
1
11 RCLKD
2
RVE RVP RVS
00 RVALIDA
& 01 RVALIDB
RVALID 0
10 RVALIDC
1
11 RVALIDD
Note: All control bits shown in this figure are located in register OICR .
MCA05887
RREADYA
RVALIDA
MLI
RDATAA Receiver
RCLKA
MLI_TRmulti
Another possibility to connect several MLI modules is a ring structure, with (at least) one
dedicated pipe per device. This leads to a structure where the Local Controller’s
transmitter is connected to the receiver of Remote Controller X, the transmitter of
Remote Controller X to the receiver of Remote Controller Y, and the transmitter of
Remote Controller Y to the Local Controller’s receiver.
This structure supports autonomous data generation and transfer in both Remote
Controllers, for example to transfer data generated in a Remote Controller to the Local
Controller without using Read Frames. In a ring structure, the Read Frame handling
should be avoided. It is possible for the Local Controller to access both Remote
Controllers independently. For example, the Remote Window of pipe x covers the
address range of Remote Controller X, whereas pipe y targets the Transfer Window y of
Remote Controller X. In Remote Controller Y, the pipe y targets the available address
range. If the Local Controller issues a Write Frame on pipe x, the Remote Controller X is
addressed. In case of a Write Frame on pipe y, the Remote Controller Y is targeted,
passing through a Transfer Window of Remote Controller X. The two remaining pipes
could be used for Write Frames issued by Remote Controller X (passing through a
Transfer Window of Remote Controller Y) and by Remote Controller Y.
Interrupt Registers
The MLI event sources are controlled by several registers (for transmitter see
Page 23-105, for receiver see Page 23-117). The register name prefixes “T” and “R”
indicate if a register is assigned to the MLI transmitter or to the MLI receiver.
TINPR GINTR
Node Pointer SIMLI0
SR0
3 OR-Gate
≥1
000
001 To SR1 OR-Gate
010 To SR2 OR-Gate Service
Transmitter Request
011 To SR3 OR-Gate
Event with own Output
100 To SR4 OR-Gate
Node Pointer 101 To SR5 OR-Gate SR0
110 To SR6 OR-Gate
111
MLI Receiver
4
..
0000
..
Interrupt ..
0001 To SR1 OR-Gate .
Command 0010 To SR2 OR-Gate
Frame Event 0011 To SR3 OR-Gate
Receiver Interrupts
RINPR GINTR
Node Pointer SIMLI7
SR7
3 OR-Gate
000
≥1
001 To SR1 OR-Gate
010 To SR2 OR-Gate Service
Receiver Event Request
with own Node
011 To SR3 OR-Gate
100 To SR4 OR-Gate Output
Pointer SR7
101 To SR5 OR-Gate
110 To SR6 OR-Gate
111
MCA05904_mod
Note: The number of SRx outputs of an MLI module and their connection to other
modules depends on the implementation of the MLI module in the specific product.
Set
Parity 3
Error To SR0
Event To SR1
≥1 .
.
.
.
TISR Software TIER . .
Clear To SR6
TEI TEIR TEIE
Parity/ To SR7
Set Time-out
Time-out Error
Error Event
Event MCA05896_mod
Set
Command 3
Frame Sent in ≥1 To SR0
Pipe 0 Event CFSI0 Control Logic To SR1
. .
. .
. .
Command To SR6
Frame Sent in CFSI1 Control Logic
To SR7
Pipe 1 Event
Command
Command
Frame Sent
Frame Sent in CFSI1 Control Logic
Pipe 2 Event Event
Command
Frame Sent in CFSI3 Control Logic
Pipe 3 Event MCA05898_mod
Set 3
To SR0
Discarded To SR1
. .
Read Answer . .
. .
Event To SR6
To SR7
MCA05899_mod
Set
Memory 3
Protection To SR0
Error Event To SR1
≥1 .
.
.
.
RISR Software RIER . .
Clear To SR6
PEI PEIR PEIE
Memory To SR7
Set Protection/
Parity Error
Parity Error Event
Event MCA05900_mod
Set 2 3
Normal Frame
Correctly
Received
Event To SR0
RISR Software RIER To SR1
Clear .
.
..
MEI MEIR 0 . .
To SR6
Move Engine Set To SR7
Access
Correctly Normal
Frame
Terminated
Received
Event
Event MCA05901_mod
Set 2
To SR0
Interrupt
To SR1
Command
Frame Event To SR2
To SR3
MCA05903_mod
RINPR
RISR Software RIER
CFRIP
Clear
CFRI0 CFRIR0 CFRIE0
3
Set
Command 3
Frame Received ≥1 To SR0
in Pipe 0 Event CFRI0 Control Logic To SR1
. .
. ..
.
Command To SR6
Frame Received CFRI1 Control Logic
To SR7
in Pipe 1 Event
Command Command
Frame Received CFRI2 Control Logic Frame
in Pipe 2 Event Received
Command Event
Frame Received CFRI3 Control Logic
in Pipe 3 Event MCA05902_mod
fML I fML I /2
fSYS FDIV Transmitter TCLK
Receiver RCLK
MLI
Registers
MLI_baudrate
1
fMLI = fSYS × (23.1)
1024 - FDR.STEP
STEP
fMLI = fSYS × (23.2)
1024
The baud rate of MLI transmissions equals fTCLK, that is defined by the frequency of clock
signal fMLI divided by 2 to create the 50% duty cycle of the shift clock signal TCLK. The
signal TCLK toggling with each period of fMLI, a jitter due to fractional dividing is
propagated to TCLK.
fMLI
fTCLK = (23.3)
2
MLI_init_sequence
To initialize and to operate the MLI, the following items should be taken into account:
• Connection setup (see Page 23-68)
• Local Controller transmitter and pipe setup (see Page 23-69)
• Remote Controller receiver setup (see Page 23-69)
• Remote Controller transmitter and Local Controller receiver setup (see Page 23-70)
• Delay adjustment (see Page 23-71)
• Connection to DMA mechanism (see Page 23-73)
• Connection of MLI to SPI (see Page 23-73)
Transfer Window and a new data frame is sent back to the Local Controller. The MLI
move engine in the Local Controller’s receiver can be used to write the received data
to a defined location, e.g. to a memory location. Test software in the Local Controller
can check for correct setup, data consistency, MLI event handling, and correct
address handling in the Local and the Remote Controllers.
TCLK
TVALID
Loop Delay
RREADY
RDC 0 1 2 n-1 n
also to be handled by the SPI module. In order to minimize the number of different
frames, it is recommended to restrict the possibility to program different buffer sizes, the
use of Read Frames or Command Frames. In order to simplify the data handling by an
SPI module, the parity generation could be skipped for frames received by the SPI
module and an error detection mechanism on an upper software layer could be
implemented. For frames sent by an SPI module, the parity bit has to be calculated and
sent correctly. Otherwise, the MLI receiver will discard the received frame.
ID
Module Identification Register (08H) Reset Value: 0025 C0XXH
31 16 15 8 7 0
r r r
The fractional divider register allows the programmer to control the clock rate and period
of the module clocks fMLI0 and fMLI0. The period of fMLIx can be either 1/STEP or a fraction
of STEP/1024 (for any value of STEP from 0 to 1023) of clock fMLI. Each MLI has its own
fractional divider.
FDR
Fractional Divider Register (0CH) Reset Value: 03FF 43FFH
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
DIS EN SUS SUS
0 RESULT
CLK HW REQ ACK
rwh rw rh rh r rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DM SC SM 0 STEP
rw rw rw r rw
Note: Additional details on the fractional divider register functionality are described in
section “Clock Control Register CLC” on Page 3-24 of the TC1796 User’s
Manual System Units part (Volume 1).
SCR
Set Clear Register (94H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
C C C C C C
0 0
NAE TPE RPE AV BAV MOD
w w w w w w w w
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
C C C C C C C C S S S S S
0
CV3 CV2 CV1 CV0 DV3 DV2 DV1 DV0 MOD CV3 CV2 CV1 CV0
w w w w w w w w w w w w w w
The Global Interrupt Set Register GINTR is a write only register (always reads 0) that
allows each of the service request outputs SRx to be activated under software control
(see Page 23-56).
GINTR
Global Interrupt Set Register (B0H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SI SI SI SI SI SI SI SI
0
MLI7 MLI6 MLI5 MLI4 MLI3 MLI2 MLI1 MLI0
r w w w w w w w w
The Output Input Control Register OICR determines the functionality of the MLI
transmitter and MLI receiver I/O control logic.
The bits in this register are automatically overwritten after a reset with a value given in
the implementation chapter (see Page 23-127). Furthermore, the connection table of the
MLI module signals is given there.
OICR
Output Input Control Register (B4H) Reset Value: 1000 8000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
RRP RRP RRP RRP
RDP RDS RCE RCP RCS RVP RVS RRS
D C B A
rw rw rw rw rw rw rw rw rw rw rw rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TVP TVP TVP TVP TVE TVE TVE TVE
RVE TDP TCP TCE TRE TRP TRS
D C B A D C B A
rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw
AER
Access Enable Register (B8H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
AEN AEN AEN AEN AEN AEN AEN AEN AEN AEN AEN AEN AEN AEN AEN AEN
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
AEN AEN AEN AEN AEN AEN AEN AEN AEN AEN AEN AEN AEN AEN AEN AEN
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw
The Access Range Register ARR determines size and number of the address sub-range
n (n = 0-3).
Note: See Page 23-46 for bit field definitions and Page 23-141 for the TC1796-specific
address range and address range extension definitions.
ARR
Access Range Register (BCH) Reset Value: 0000 0000H
31 29 28 24 23 21 20 16 15 13 12 8 7 5 4 0
rw rw
TCR
Transmitter Control Register (10H) Reset Value: 0000 0110H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw rw rw rwh rwh r rw rw rw
TSTATR
Transmitter Status Register (14H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
r rh rh rh rh
TPxSTATR (x = 0-3)
Transmitter Pipe x Status Register
(18H+4H*x) Reset Value: 0000 0000H
31 17 16 15 6 5 4 3 0
O
0 AP DW BS
P
r rh rh rh rh
The Transmitter Command Register TCMDR contains the command codes that are used
during Command Frame transmission. Each time one of the CMDPx bit fields is written,
a Command Frame transmission is triggered. Independent of the transferred command
code value, a Command Frame transmitted event can be generated in the transmitter for
each pipe and a Command Frame received event for each pipe in the receiver,
respectively.
TCMDR
Transmitter Command Register (28H) Reset Value: 0000 0000H
31 28 27 24 23 20 19 16 15 12 11 8 7 4 3 0
r rw r rw r rw r rw
The Transmitter Receiver Status Register TRSTATR contains read-only flags that
indicate the status of MLI operations.
TRSTATR
Transmitter Receiver Status Register
(2CH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
r rh rh rh rh rh rh rh rh rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
r rh rh rh rh rh rh r
TPxDATAR (x = 0-3)
Transmitter Pipe x Data Register (40H+4H*x) Reset Value: 0000 0000H
31 0
DATA
rh
The Transmitter Data Read Answer Register TDRAR contains the read data for the
transmission of an Answer Frame.
TDRAR
Transmitter Data Read Answer Register
(50H) Reset Value: 0000 0000H
31 0
DATA
rwh
The write-only Transmitter Pipe x Base Address Register TPxBAR represents the 28-bit
pipe x Remote Window base address and the Remote Window size that is transmitted
to the receiving controller via a Copy Base Address Frame.
TPxBAR (x = 0-3)
Transmitter Pipe x Base Address Register
(54H+4H*x) Reset Value: 0000 0000H
31 4 3 0
ADDR BS
w w
The Transmitter Pipe x Address Offset Register TPxAOFR is a read-only register that
stores the offset address that has been used by the last read or write access to a
Transfer Window of pipe x.
TPxAOFR (x = 0-3)
Transmitter Pipe x Address Offset Register
(30H+4H*x) Reset Value: 0000 0000H
31 16 15 0
0 AOFF
r rh
The Transmitter Copy Base Address Register TCBAR contains the 28-bit pipe x Remote
Window base address of the latest write access to TPxBAR.ADDR.
TCBAR
Transmitter Copy Base Address Register
(64H) Reset Value: 0000 0000H
31 4 3 0
ADDR 0
rh r
TIER
Transmitter Interrupt Enable Register (98H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
TE PE CFS CFS CFS CFS NFS NFS NFS NFS
0
IR IR IR3 IR2 IR1 IR0 IR3 IR2 IR1 IR0
r w w w w w w w w w w
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TE PE CFS CFS CFS CFS NFS NFS NFS NFS
0
IE IE IE3 IE2 IE1 IE0 IE3 IE2 IE1 IE0
r rw rw rw rw rw rw rw rw rw rw
The Transmitter Interrupt Status Register TISR contains all MLI event (or interrupt) flags
of the MLI transmitter. These flags can be cleared by software when writing the
appropriate bits in the TIER register; they are not cleared by hardware.
TISR
Transmitter Interrupt Status Register (9CH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TE PE CFS CFS CFS CFS NFS NFS NFS NFS
0
I I I3 I2 I1 I0 I3 I2 I1 I0
r rh rh rh rh rh rh rh rh rh rh
The Transmitter Interrupt Node Pointer Register TINPR contains the node pointers for
the MLI transmitter events.
TINPR
Transmitter Interrupt Node Pointer Register (A0H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0 PTEIP 0 CFSIP
r rw r rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
r rw r rw r rw r rw
RCR
Receiver Control Register (68H) Reset Value: 0100 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
RCV
0 0 BEN MPE
RST
r rw r rw rwh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rh rh rh rh rh rh rh
The Receiver Pipe x Status Register RPxSTATR indicates the coded buffer size which
represents the Remote Window Size of 2 Bytes to 64KBytes and the address prediction
factor that has been calculated for pipe x in the receiving controller.
RPxSTATR (x = 0-3)
Receiver Pipe x Status Register (7CH+4H*x) Reset Value: 0000 0000H
31 16 15 6 5 4 3 0
0 AP 0 BS
r rh r rh
RDATAR
Receiver Data Register (90H) Reset Value: 0000 0000H
31 0
DATA
rh
The Receiver Pipe x Base Address Register RPxBAR is a read-only register that
contains the complete target address in the Remote Window of pipe x.
RPxBAR (x = 0-3)
Receiver Pipe x Base Address Register
(6CH+4H*x) Reset Value: 0000 0000H
31 0
ADDR
rh
The Receiver Address Register RADRR is a read-only register storing the complete
address of the most recently (or currently) targeted Remote Window.
RADRR
Receiver Address Register (8CH) Reset Value: 0000 0000H
31 0
ADDR
rh
RIER
Receiver Interrupt Enable Register (A4H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
DRA MPE PE ICE CFR CFR CFR CFR ME NFR
0
IR IR IR R IR3 IR2 IR1 IR0 IR IR
r w w w w w w w w w w
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DRA M CFR CFR CFR CFR NFR
0 PEIE ICE
IE PEIE IE3 IE2 IE1 IE0 IE
r rw rw rw rw rw rw rw rw rw
The Receiver Interrupt Status Register RISR contains all event (interrupt) flags of the
MLI receiver. These flags can be cleared by software when writing the appropriate bits
in the RIER register; they are not cleared by hardware.
RISR
Receiver Interrupt Status Register (A8H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CFR CFR CFR CFR ME NFR
0 DRAI MPEI PEI IC
I3 I2 I1 I0 I I
r rh rh rh rh rh rh rh rh rh rh
The Receiver Interrupt Node Pointer Register RINPR contains the node pointers for the
MLI receiver events.
RINPR
Receiver Interrupt Node Pointer Register
(ACH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
r rw r rw r rw r rw
TCLK
A1 P1.3 / TREADY0B
TREADYA
TREADYB A2 P1.4 / TCLK0
Transmitter
TREADYD
fMLI0 A1 P1.5 / TREADY0A
TVALIDA
Clock
Control fDMA TVALIDB A2 P1.6 / TVALID0A
TVALIDD
TDATA A2 P1.7 / TDATA0
Address
Decoder RCLKA Port 1 A1 P1.8 / RCLK0A
RCLKB Control
MLI0 A2 P1.9 / RREADY0A
Module RCLKD
Interrupt SR[3:0]
(Kernel) RREADYA A1 P1.10 / RVALID0A
Control
RREADYB
A1 P1.11 / RDATA0A
Receiver
SR[7:4] RREADYD
To DMA
RVALIDA A1 P1.13 / RCLK0B
RVALIDB
BRKOUT A1 P1.14 / RVALID0B
Cerberus RVALIDD
RDATAA A1 P1.15 / RDATA0B
RDATAB
RDATAD A2 P5.4 / RREADY0B
Port 5
Control
A2 P5.6 / TVALID0B
MCA05906
fMLI1 TCLK
Clock TREADYA
Control fDMA A2 P8.0 / TCLK1
Transmitter
TREADYD
TVALIDA A1 P8.1 / TREADY1A
Address TVALIDD
Decoder A2 P8.2 / TVALID1A
TDATA
MLI1 RCLKA A2 P8.3 / TDATA1
SR[1:0] Module Port 8
Interrupt RCLKD Control
(Kernel)
Control RREADYA A1 P8.4 / RCLK1A
Receiver
SR[3:2] RREADYD
Not A2 P8.5 / RREADY1A
Connected RVALIDA
SR[7:4] A1 P8.6 / RVALID1A
To DMA RVALIDD
RDATAA
A1 P8.7 / RDATA1A
BRKOUT RDATAD
Cerberus
MCA05907
DMA Clock
fSYS Control
fD MA (= fC L C)
(DMA_CLC)
MLI 0_FDR MLI 1_FDR
fML I0 fML I1
MLI0 MLI1
Module Module
Kernel Kernel
MCA05909_mod
Combined with the baud rate as derived in the MLI module (see Equation (23.1) on
Page 23-65) and the MLIx_FDR fractional divider setup, the resulting MLI baud rate is
defined by:
fDMA 1
Baud rate MLIx = ----------------- × --- with n = 1024 - FDR.STEP (23.4)
2 n
fDMA n
Baud rate MLIx = × ------------- with n = 0-1023
----------------- (23.5)
2 1024
Table 23-11 MLI0 and MLI1 I/O Line Selection and Setup
Module Port Lines Input/Output Control I/O
Register Bits
MLI0 P1.3 / TREADY0B P1_IOCR0.PC3 = 0XXXB1) Input
MLI0_OICR.TRE = 1
MLI0_OICR.TRP = X2)
MLI0_OICR.TRS = 01B
P1.4 / TCLK0 P1_IOCR4.PC4 = 1X01B1) Output
MLI0_OICR.TCE = 1
MLI0_OICR.TCP = X2)
P1.5 / TREADY0A P1_IOCR4.PC5 = 0XXXB1) Input
MLI0_OICR.TRE = 1
MLI0_OICR.TRP = X2)
MLI0_OICR.TRS = 00B
P1.6 / TVALID0A P1_IOCR4.PC6 = 1X01B1) Output
MLI0_OICR.TVEA = 1
MLI0_OICR.TVPA = X2)
P1.7 / TDATA0 P1_IOCR4.PC7 = 1X01B1) Output
MLI0_OICR.TDP = X2)
Table 23-11 MLI0 and MLI1 I/O Line Selection and Setup (cont’d)
Module Port Lines Input/Output Control I/O
Register Bits
MLI0 P1.8 / RCLK0A P1_IOCR8.PC8 = 0XXXB1) Input
MLI0_OICR.RCE = 1
MLI0_OICR.RCP = X2)
MLI0_OICR.RCS = 00B
P1.9 / RREADY0A P1_IOCR8.PC9 = 1X01B1) Output
MLI0_OICR.RRS = 00B
MLI0_OICR.RRPA = X2)
P1.10 / RVALID0A P1_IOCR8.PC10 = 0XXXB1) Input
MLI0_OICR.RVE = 1
MLI0_OICR.RVP = X2)
MLI0_OICR.RVS = 00B
P1.11 / RDATA0A P1_IOCR8.PC11 = 0XXXB1) Input
MLI1_OICR.RDP = X2)
MLI1_OICR.RDS = 00B
P1.13 / RCLK0B P1_IOCR12.PC13 = 0XXXB1) Input
MLI0_OICR.RCE = 1
MLI0_OICR.RCP = X2)
MLI0_OICR.RCS = 01B
P1.14 / RVALID0B P1_IOCR12.PC14 = 0XXXB1) Input
MLI0_OICR.RVE = 1
MLI0_OICR.RVP = X2)
MLI0_OICR.RVS = 01B
P1.15 / RDATA0B P1_IOCR12.PC15 = 0XXXB1) Input
MLI1_OICR.RDP = X2)
MLI1_OICR.RDS = 01B
P5.4 / RREADY0B P5_IOCR4.PC4 = 1X10B1) Output
MLI0_OICR.RRS = 01B
MLI0_OICR.RRPB = X2)
P5.6 / TVALID0B P5_IOCR4.PC6 = 1X10B1) Output
MLI0_OICR.TVEB = 1
MLI0_OICR.TVPB = X2)
Table 23-11 MLI0 and MLI1 I/O Line Selection and Setup (cont’d)
Module Port Lines Input/Output Control I/O
Register Bits
MLI1 P8.0 / TCLK1 P8_IOCR0.PC0 = 1X11B1) Output
MLI1_OICR.TCE = 1
MLI1_OICR.TCP = X2)
P8.1 / TREADY1A P8_IOCR0.PC1 = 0XXXB1) Input
MLI1_OICR.TRE = 1
MLI1_OICR.TRP = X2)
MLI1_OICR.TRS = 00B
P8.2 / TVALID1A P8_IOCR0.PC2 = 1X11B1) Output
MLI1_OICR.TVEA = 1
MLI1_OICR.TVPA = X2)
P8.3 / TDATA1 P8_IOCR0.PC3 = 1X11B1) Output
MLI1_OICR.TDP = X2)
P8.4 / RCLK1A P8_IOCR4.PC4 = 0XXXB1) Input
MLI1_OICR.RCE = 1
MLI1_OICR.RCP = X2)
MLI1_OICR.RCS = 00B
P8.5 / RREADY1A P8_IOCR4.PC5 = 1X11B1) Output
MLI1_OICR.RRS = 00B
MLI1_OICR.RRPA = X2)
P8.6 / RVALID1A P8_IOCR4.PC6 = 0XXXB1) Input
MLI1_OICR.RVE = 1
MLI1_OICR.RVP = X2)
MLI1_OICR.RVS = 00B
P8.7 / RDATA1A P8_IOCR4.PC7 = 0XXXB1) Input
MLI1_OICR.RDP = X2)
MLI1_OICR.RDS = 00B
1) Possible PCx bit field combinations see Table 23-12.
2) With polarity control bit = 0, normal polarity is selected. With polarity control bit = 1, inverted polarity is
selected.
P1_IOCR0
Port 1 Input/Output Control Register 0
(10H) Reset Value: 2020 2020H
31 28 27 24 23 20 19 16 15 12 11 8 7 4 3 0
rw r rw r rw r rw r
P1_IOCR4
Port 1 Input/Output Control Register 4(14H) Reset Value: 2020 2020H
31 28 27 24 23 20 19 16 15 12 11 8 7 4 3 0
rw r rw r rw r rw r
P1_IOCR8
Port 1 Input/Output Control Register 8(18H) Reset Value: 2020 2020H
31 28 27 24 23 20 19 16 15 12 11 8 7 4 3 0
rw r rw r rw r rw r
P1_IOCR12
Port 1 Input/Output Control Register 12(1CH) Reset Value: 2020 2020H
31 28 27 24 23 20 19 16 15 12 11 8 7 4 3 0
rw r rw r rw r rw r
P5_IOCR4
Port 5 Input/Output Control Register 4(14H) Reset Value: 2020 2020H
31 28 27 24 23 20 19 16 15 12 11 8 7 4 3 0
rw r rw r rw r rw r
P8_IOCR0
Port 8 Input/Output Control Register 0(10H) Reset Value: 2020 2020H
31 28 27 24 23 20 19 16 15 12 11 8 7 4 3 0
rw r rw r rw r rw r
P8_IOCR4
Port 8 Input/Output Control Register 4(14H) Reset Value: 2020 2020H
31 28 27 24 23 20 19 16 15 12 11 8 7 4 3 0
rw r rw r rw r rw r
P1_PDR
Port 1 Pad Driver Mode Register (40H) Reset Value: 0000 0000H
31 23 22 20 19 18 16 15 8 7 5 4 3 0
PDSYS PD PD1
0 0 0 PD0
CLK MLI0 0
r rw r rw r rw rw
P5_PDR
Port 5 Pad Driver Mode Register (40H) Reset Value: 0000 0000H
31 30 28 27 26 24 23 22 20 19 18 16 15 0
PD PD PD PD
0 0 0 0 0
MSC1 MSC0 ASC1 ASC0
r rw r rw r rw r rw r
P8_PDR
Port 8 Pad Driver Mode Register (40H) Reset Value: 0000 0000H
31 19 18 16 15 4 3 0
PD
0 0 PD0
MLI1
r rw r rw
The coding of bit fields SIZE1 and SLICE1 for the SRAM sub-range access protection
(with address translation from E800 to C000) are coded as shown in Table 23-17.
GPTA0 GPTA1
Clock Generation Unit Clock Generation Unit
FPC0 DCM0 FPC0 DCM0
FPC1 PDL0 FPC1 PDL0
FPC2 DCM1 FPC2 DCM1
DIGITAL DIGITAL
FPC3 PLL FPC3 PLL
DCM2 DCM2
FPC4 PDL1 FPC4 PDL1
FPC5 DCM3 FPC5 DCM3
fGPTA
fGPTA Clock Distribution Unit Clock Distribution Unit
Clock
Conn.
Signal Signal
Clock Bus
Clock Bus
I/O Line
I/O Line Sharing Unit I/O Line Sharing Unit Sharing Unit
Interrupt
Interrupt Sharing Unit Interrupt Sharing Unit Sharing Unit
MCB05910
Figure 24-1 General Block Diagram of the GPTA Modules in the TC1796
Address
Decoder Global
Timers
SR[37:00]
Interrupt
Interrupt Sharing Unit
Control
MCB05911
GPTA 4 4 PDL
Signal Inp.
3 X
GPTA 4
Signal Inp.
Inputs
SOT1 F0 PDL0
Control
FPC1 SOL1 PLL
Logic B0 PDL1
Clock
GPTA 4
Signal Inp.
Inputs M
SOT2 U DCM1
X
FPC2 SOL2
Clock
3
Int. PLL
Clock
GPTA 4 Outputs
Signal Inp.
Inputs PDL1
SOT3
FPC3 SOL3 M
U DCM2
Clock
3 X
GPTA 4
Signal Inp.
Inputs
SOT4 F0 PDL2 8
Control Clock
FPC4 CDU
SOL4 Logic B0 PDL3 Bus
Clock
GPTA 4
Signal Inp.
Inputs M
SOT5 U DCM3
X
FPC5 SOL5
Ext.
Clock
3
PLL
Clock
Inputs
CLK1 / CLK2 / CLK3
MCA05912
FPCCTRk
≥
IPS
3
SINk0 FPCSTAT
SOTk
SINk1 REGk FPC
Edge
Control SOLk
SINk2 Detect RE
Pin SIN Logic
SINk3 Select FE
SINk4 = fGPTA
SINk5 = SOLk-1 FEGk
fGPTA FPCSTAT
CINk0 = fGPTA
CINk1
Clock CIN
CINk2 Select
CINk3 FPCCTRk 3
2
CLK RTG MOD
MCA05913
FPC Registers
The following registers are assigned to the filter and prescaler cells FPCk (k = 0-5):
• FPCSTAT = Filter and Prescaler Cell Status Register (see Page 24-155)
• FPCCTRk = Filter and Prescaler Cell Control Register k (see Page 24-156)
• FPCTIMk = Filter and Prescaler Cell Timer Register k (see Page 24-158)
compensated or uncompensated PLL clock or can be the PLL clock of the other GPTA
module. The uncompensated PLL clock is useful in applications in which bursts (due to
acceleration) might disturb the filter function.
With a prescaled GPTA module clock, very long time filter time periods can be achieved.
fGPTA
FPC Input
SINk
FPC Trigger
Output SOTk
FPC Level
Output SOLk
MCT05914
Figure 24-5 FPC Output Splitting into Trigger and Level Information
Signal Input
SIN
Timer Threshold
Timer Value
FPCCTRk.TIM
Level Output
SOLk
Trigger Output
SOTk
FPCSTAT.REGk
MCT05915
Figure 24-6 FPC Delayed Debounce Filter Algorithm with Timer Decrement
Signal Input
SIN
Timer Threshold
Timer Value
FPCCTRk.TIM
Level Output
SOLk
Trigger Output
SOTk
FPCSTAT.FEGk
must be cleared
by software
FPCSTAT.REGk
MCT05916
Figure 24-7 FPC Delayed Debounce Filter Algorithm with Timer Reset
The total signal delay from input to output depends on the programmed compare register
value, the number of high-frequency pulses (glitches) during the filter operating time, and
the timer behavior in case of a glitch (decrement or reset).
The FPC Delayed Debounce Filter Mode is selected by:
• FPCCTRk.MOD = 000B
Signal Input
SIN
Edge Inhibition
Timer Threshold
Timer Value
FPCCTRk.TIM
Level Output
SOLk
Trigger Output
SOTk
FPCSTAT.REGk
MCT05917
Note: During the last clock cycle of edge inhibition time (where timer value is equal to
the compare value) an input signal glitch will be filtered but the corresponding
glitch status flag in register FPCSTAT is not set.
The Immediate Debounce Filter can be enabled only for one edge, either rising or falling.
In this case, the signal output follows the signal input value immediately after the timer
threshold of the filtered edge is reached, without re-starting the timer (see Figure 24-9).
Signal Input
SIN
Edge Inhibition
Timer Threshold
Timer Value
FPCCTRk.TIM
Level Output
SOLk
Trigger Output
SOTk
FPCSTAT.REGk
MCT05918
Figure 24-9 FPC Immediate Debounce Filter Algorithm on Rising Edge only
The FPC Immediate Debounce Filter Modes are selected by:
• FPCCTRk.MOD = 001B: Immediate Debounce Filter Mode on both edges
• FPCCTRk.MOD = 010B: Immediate Debounce Filter Mode on rising edge only,
no filtering on falling edge.
• FPCCTRk.MOD = 011B: Immediate Debounce Filter Mode on falling edge only,
no filtering on rising edge.
Signal Input
SINk
Total Signal Delay Edge Inhibition
Timer Threshold
Timer Value
FPCCTRk.TIM
Level Output
SOLk
FPCSTAT.REGk
MCT05919
Prescaler Mode
In Prescaler Mode, the input signal is sampled and analyzed with fGPTA. The FPC control
unit counts each rising (or falling) edge of the input signal. When the timer value matches
the compare value:
• one GPTA module clock pulse is generated at the trigger output signal SOTk and
level output signal SOLk
• the timer FPCTIMk.TIM is reset to 0000H
Figure 24-11 shows a divide-by-6 operation using the FPC in Prescaler Mode with
trigger on rising edge selected.
Signal Input
SINk
Level/Trigger
Outputs
SOLk/SOTk
MCT05920
2
FPC0 2
≥1 Mux DCM0
Phase F0 PDLCTR
2 Discrimation
FPC1 B0 ERR0 MUX0 TSE0
Logic
PDL0 Set
2
2 Mux DCM1
FPC2
PDL0
PDL1
PDL Bus
PDL2
PDL3
2
FPC3 2
≥1 Mux DCM2
Phase F1 PDLCTR
2 Discrimation
FPC4 B1 ERR1 MUX1 TSE1
Logic
PDL1 Set
2
2 Mux DCM3
FPC5
MCB05921
! Means not
Re Means rising edge
Fe Means falling edge
Forward ReS1*!S2 + S1*ReS2 + FeS1*S2 + !S1*FeS2
Backward ReS1*S2 + !S1*ReS2 + FeS1*!S2 + S1*FeS2
Position Forward_Counter - Backward_Counter
S1
Forward_Counter S2
Backward_Counter
Forward
S2
Backward
S1 S1
S2
Forward
Backward
MCT05922
Jitter Jitter
S1
S2
Forward
Backward
MCT05923
! Means not
Re Means rising edge
Fe Means falling edge
Forward ReS1*!S2*S3 + FeS3*S1*!S2 + ReS2*S1*!S3
+ FeS1*S2*!S3 + ReS3*!S1*S2 + FeS2*!S1*S3
Backward ReS1*S2*!S3 + FeS3*!S1*S2 + ReS2*!S1*S3
+ FeS1*!S2*S3 + ReS3*S1*!S2 + FeS2*S1*!S3
Error The input signal states S1*S2*S3 and !S1*!S2*!S3 are not allowed
Position Forward_Counter - Backward_Counter
Forward_Counter
Backward_Counter
S2
00 01 11 10 00 01 11 10
0 3 4 5 3 4 5
S1 S3
S3 1 1 2 6 1 2 6
1 2 3 4 5 6 1 2 1 6 5 4 3 2 1 6
S1 S1
S2 S2
S3 S3
Forward Forward
Backward Backward
MCT05924
DCMTIMk
TIM (Timer)
24
DCMCAVk Rising Edge
Service Request
CAV (Capture)
Falling Edge
DCMCOVk Service Request
COV (Capt./Comp) Compare
Service Request
=
CE
Signal 2 Event
Input DCM Control Unit Output
MCA05925
The DCM unit inputs are connected to the PDL outputs. Depending on the configuration
of the associated PDL cell, the DCM units can also be driven by an FPC directly (as
shown in Figure 24-12):
• DCM0 is driven by FPC0 or PDL0 angular velocity signal,
• DCM1 is driven by FPC2 or PDL0 error signal,
• DCM2 is driven by FPC3 or PDL1 angular velocity signal,
• DCM3 is driven by FPC5 or PDL1 error signal.
When the driving FPCs and PDL cells are programmed in feed-through mode, an
external port pin signal as selected by the FPC input multiplexer can be directly
processed by a DCM cell.
The duty cycle of the DCM unit signal input can be determined by measuring its period
length and the width of its low or high state. For this purpose, several operations can be
started on an signal input edge:
• Reset Timer
The local timer can be reset on rising, falling, or both edges of the signal input line as
selected via control bits DCMCTRk.RZE (for rising edge) and DCMCTRk.FZE (for
falling edge). After a reset timer event, the timer is continuously incremented by the
GPTA module clock fGPTA until the next reset condition occurs. If no reset timer event
is enabled, the timer operates in Free-Running Timer Mode, repeatedly counting
from its lower limit (000000H) to its upper limit (FFFFFFH).
• Capture
The current timer value is stored in the capture register DCMCAV on the rising edge
(DCMCTR.RCA = 1) or falling edge (DCMCTRk.RCA = 0) of the signal input line.
The current timer value is stored in the capture/compare register DCMCOV on the
opposite signal edge as selected by DCMCTRk.RCA and if enabled by bit
DCMCTRk.OCA = 1. With DCMCTRk.OCA = 0 the capture/compare register
DCMCOV is not affected.
• Edge Service Request and Interrupt Request
On a rising input signal edge of the DCMk unit (k = 0-3) the service request flag
SRS0.DCM0kR is set. Additionally, a service request signal is triggered if bit
DCMCTRk.RRE = 1. A falling input signal edge sets the service request flag
SRS0.DCM0kF. An interrupt request generation on this edge is triggered if bit
DCMCTRk.FRE = 1. Both edges of the signal input line initiate an interrupt request
when both bits, DCMCTRk.FRE and DCMCTRk.RRE, are set. The interrupt on signal
input edges is disabled if both bits are cleared.
• Hardware Generated Output Pulse
A single fGPTA clock pulse is generated on the DCM output line if enabled by control
register bit DCMCTRk.RCK (rising edge at signal line) and/or DCMCTRk.FCK (falling
edge at signal line) and an appropriate edge is detected at the input.
The 0% or 100% duty cycle exception (no edge or only one edge detected) can be
handled by a limit checking option. The expected input signal’s maximum period
length (measured in fGPTA clock ticks) can be loaded into the capture/compare
register DCMCOV that is continuously compared with the timer value. When the timer
is incremented up to the limit stored in capture/compare register, the service request
flag SRS0.DCM0xC is set. If the compare service request is enabled (control register
bit DCMCTRk.CRE = 1), an interrupt request is generated.
• Software Generated Output Pulse
If the software intends to compensate an input pulse backlog, bit DCMCTRk.QCK
should be set to 1. This immediately triggers a single clock pulse generation on the
DCM output signal line.
SRSS0 (write)
Set SRSS0 (read)
DCM0kR
SRSR0 (read ) DCMCTRk
DCM0kR RRE
SRSC0 (write)
Clear Set
DCM0kR
SRSS0 (write)
Set SRSS0 (read)
DCM0kF
SRSR0 (read ) DCMCTRk
DCM0kF FRE
SRSC0 (write)
Clear Set
DCM0kF
Compare event
DCMkCSR
occurred
MCA05926_mod
PLL Signal
PLLCTR Uncompensated PLL Signal
REN & Service Request
MUX PLLMTI PLLREV
2
MTI (Microtick Value) REV (Reload Value)
DCM0
16 24
DCM1 Input PLL Load
DCM2 MUX Control
Logic PLLCNT PLLSTP 2-Complement
DCM3
CNT (Microtick Counter) STP (Step Value)
16
PLLDTR
Sign Bit
DTR (Delta Value) MUX
24
ADD Unit
MCB05927
SRSS0 (write)
Set SRSS0 (read )
PLL
SRSR0 (read) PLLCTR
PLL REN
SRSC0 (write)
Clear Set
PLL
PLLCNT = 0 PLLSR
MCA05928_mod
PLL Input
Signal
PLL Output
Signal
9 9 9
8 8
7 7
6 6 6
5 5
4 4
3 3 3
2 2
PLLDTR 1 1
Content 0 0
-1 -1 -1 Ticks
-2 -2
-3 -3 MCT05929_mod
fGPTA
PLL Output of 3 3 3 6
a Conventional PLL
PLL Output of 4 4 4 3
the GPTA PLL
MCT05930_mod
The length of the current input signal period has been underestimated by a certain
number of fGPTA clock periods. This deficit could be added to the calculated length
of the next input signal period.
The PLL can continue to operate with the old input signal period length estimation,
but the number of output pulses to be generated during the next input clock period
may be decreased by the surplus of output pulses initiated during the last signal
period.
Steady State
Input Signal
Decelerated
Input Signal
Microtick Counter
AEN = 1
Time
Compensated
Signal_Output
AEN = 1 0 1 2 3 4 5 6 7 8 9 A B C D E F 0 1
Microtick Counter
AEN = 0
Time
Compensated
Signal Output
AEN = 0 0 1 2 3 4 5 6 7 8 9 A B C D E F 0 1 2 3 4 5
Uncompensated
Signal Output
AEN = x 0 1 2 3 4 5 6 7 8 9 A B C D E F 0 1 2 3 4 5
MCT05931_mod
– Compensation by Software
After disabling the Automatic End Mode, the PLL generates fewer output pulses
than calculated during one input signal period. Several algorithm can be
implemented to compensate for the lack of generated output pulses:
The length of the current input signal period has been overestimated by a certain
number of fGPTA clock periods. This deficit should be subtracted from the calculated
length of the next input signal period.
The PLL can continue to operate with the old input signal period length estimation,
but the number of output pulses to be generated during the next input clock period
may be increased by the lack of output pulses initiated during the last signal period.
Steady State
Input Signal
Accelerated
Input Signal
Microtick Counter
AEN, PEN = 1
Time
Signal_Output
AEN, PEN = 1
0 1 2 3 4 5 6 7 8 9 A B CDEF 0 1
Microtick Counter
AEN = 0
Time
Signal Output
AEN = 0
0 1 2 3 4 5 6 7 8 9 A B C D E F 0 1 2 3 4 5
MCT05932_mod
CLK0
PLLCLK CLK1
PLL PLLCLK CKBCTR
uncomp. 4
DFA02
fGPTA 14
÷ 2DFA02 0-13
14
CLK2
DCM3 15
CKBCTR
2
DFA03
DCM2 0
1 CLK3
2
ext. PLLCLK uncomp.
3
ext. PLLCLK Clock
CKBCTR Bus
4
DFA04
15
÷ 2DFA04 0-14 CLK4
DCM1
15
CLK5
DCM0 CKBCTR
4
DFA06
15
÷ 2DFA06 0-14 CLK6
SOT1
FPC1 15
CKBCTR
4
DFA07
15
÷ 2DFA07 0-14 CLK7
SOT4
FPC4 15
CKBCTR
3
DFALTC
8 LTCPRE
÷ 2DFALTC 0-7
MCB05933
GT Interrupt Control
Each of the GTs is able to generate a service request output signal SQTk. This signal is
controlled as shown in Figure 24-26. On a GTk timer overflow, the service request flag
GT0k is always set. The service request output SQTk is activated only if it is enabled by
the enable bit GTCTRk.REN. Additional information about service request and interrupt
handling is given in section “Interrupt Sharing Unit (IS)” on Page 24-112.
SRSS0 (write)
Set SRSS0 (read )
GT0k
SRSR0 (read ) GTCTRk
GT0k REN
SRSC0 (write)
Clear Set
GT0k
P4
T P3
P2
P1
Infinite Counter
Reloaded Counter
Time
MCT05936
programmed and then the window is split into two windows, the “After” window and the
“Before” window (Figure 24-28). If the timer lies in the “After” window at the time of
programming the threshold, the event is performed immediately. If it lies in the “Before”
window, the event will happen later when the timer reaches the threshold T. The “Before”
window refers to a “prediction range”, and the “After” window refers to the “history buffer”.
From a practical point of view, once the value T is determined, it is necessary to calculate
the observation window (position and width). Before updating the value T, the application
must ensure that the observation window was entered but has not yet been left.
The width of the observation window cannot exceed the timer period. To support
reloaded counters where the overflow can occur within the observation window, a
signed comparison is performed.
Before After
Observation Window
MCT05937
T
Unsigned T
T
Compare
B A B A B A
T
Signed T
T
Compare
B A B A B A
T: Threshold
B: Before Ideal case where the timer period is a power of 2
A: After MCT05938
Before After
MCT05939
Should be After!!!
MCT05940
Comparator Window
A comparison of the previous figures shows that the position of the observation window
with respect to T is dependent on the value of T itself. That means the user, before
updating the comparator with T, needs to calculate the observation window as a function
of T. To avoid this calculation, a core observation window can be defined that is
independent of T. It will always be centered on T, whatever its value is. However, one
particularity exists when using the core observation window: the size of the core
observation window varies depending on two static values: the timer period and the
comparator window’s sizes. In particular, the core observation window reduces as the
value of the timer period is just after a power of 2. This is shown in Figure 24-34.
For any timer period (whatever the range) and any threshold position, a symmetrical core
observation window of a statically defined size can be determined.
Comparator Window = 2 × 2k
Period is not a power of 2
m
Core Observation Window
Period = M - m + 1 Before After
MCT05942
Observation Window
Width of Core
Observation Window =
2 x (period - 2k)
Condition:
2k < period ≤ 2 × 2k
1 2 4 8 16 32
Period MCT05943
Implementation
The hardware implementation of the scalable and Signed/Unsigned Greater/Equal
compare is illustrated in Figure 24-35. The function consists of subtracting the threshold
T from the GT timer value. The result is in 2s complement format. The result’s sign bit
and the 15 most significant bits are available for observation. One of those bits is
selected according to the mode of operation (Unsigned or Signed) and the period length
(bit field GTCTRk.SCO). This bit drives the TGE (Timer Greater Equal) flag.
Unsigned compare: Select Sign bit (SCO = 0FH)
Signed compare: Select one of the 15 most significant result bits (SCO = 00H to 0EH)
Note: On how to choose one of the 15 bits is explained later.
Internal Bus
GT Value (new threshold)
+
Subtract -
Result
Difference Sign Bit
Result [23-9]
Multiplexer SCO
When using Signed compare, the result bit R3 can be selected and interpreted, provided
that the timer period is at least 9. Here, the range of the result can be split into four sub-
ranges. Because the result is in 2s complement format, a value of 0 for R3 is interpreted
as After, and a value of 1 is interpreted as Before. A comparison of Figure 24-36 and
Figure 24-37 shows why this proceeding leads to correct interpretation within the
observation window. Figure 24-37 shows the case of a period equal to a multiple of 2.
0 1 1 1 1 +15
0 1 1 1 0 +14
0 1 1 0 1 +13
Before
0 1 1 0 0 +12
0 1 0 1 1 +11
R3 = 1
0 1 0 1 0 +10
0 1 0 0 1 +9
0 1 0 0 0 After +8
0 0 1 1 1 S=0 +7
0 0 1 1 0 +6
0 0 1 0 1 +5
0 0 1 0 0 +4 After
0 0 0 1 1 +3 R3 = 0
0 0 0 1 0 +2
0 0 0 0 1 +1
0 0 0 0 0 0
1 1 1 1 1 -1
1 1 1 1 0 -2
1 1 1 0 1 -3
1 1 1 0 0 -4 Before
1 1 0 1 1 -5 R3 = 1
1 1 0 1 0 -6
1 1 0 0 1 -7
1 1 0 0 0 Before -8
1 0 1 1 1 S=1 -9
1 0 1 1 0 -10
1 0 1 0 1 -11
1 0 1 0 0 -12 After
1 0 0 1 1 -13
R3 = 0
1 0 0 1 0 -14
1 0 0 0 1 -15
1 0 0 0 0 -16 MCA04616
MCA05945
15
T
Evaluation of R 3 R3 = 1 R3 = 0
Observation Window
15 T
Comparator
Window
4
Core Observation
Window
Evaluation of R 3 R3 = 1 R3 = 0 R3 = 1
The previous examples show that the result bit to select for observation (R3) corresponds
to the comparator window’s size (k = 3).
Considering the case in which the period is not a multiple of 2, choose a comparator
window whose width is between 1 and 2 times the timer period:
How to Proceed
Threshold
M T (point in time)
Value of T
Before Before
After After
m m M Timer
MCT05948
value T. Thereafter, the observation switches to “After” and remains there until the timer
exits the observation window. This graphic can be related to Table 24-37 where the
comparator window equals the period, and the observation window is always centered
on the threshold T.
Threshold
Observation Window
Value of T
Before Before
After After
m m M Timer
MCT05949
Threshold
M T (point in time)
2 × 2k - Period =
Before Before
After After
Before
m m M Timer
MCT05950
Figure 24-41 Graphical Representation of Signed Compare (2k < Period ≤ 2 × 2k)
Figure 24-42 shows how the observation window is positioned with respect to T. It also
shows the core observation window that is always centered on T and which has a
constant width.
Threshold
M Point T2 Point T1
After
Value of T1
Before
Value of T2
After
Before
m m M Timer
Registers
The following registers are assigned to a GTCk (k = 00-31):
• GTCCTRk = Global Timer Cell Control Register k (see Page 24-175)
• GTCXRk = Global Timer Cell X Register k (see Page 24-179)
• SRSC1 = Service Request State Clear Register 1 (see Page 24-209)
• SRSS1 = Service Request State Set Register 1 (see Page 24-210)
Features
• 24-bit based timer cells related to two Global Timers GT0 and GT1.
• Capture Mode on rising, falling or both edges with following actions:
– Service request generation
– Output signal transition generation (set, reset, toggle the output signal)
• Compare Mode on equal compare, or greater than, or equal to compare with
following actions:
– Service request generation
– Output signal transition generation (set, reset, toggle the output signal)
– Capture (after compare match) the value of the selected Global Timer or the
opposite Global Timer
• One Shot Mode allows the selected (capture or compare) mode to be stopped after
the first event.
• Flexible mechanism to link pin actions and allow complex combination of cells. (A
cell has the ability to propagate actions over adjacent cells with higher number, in
order to perform complex waveforms such as PWMs).
Architecture
The architecture of a GTC is shown in Figure 24-43. Each GTC has a multiplexer that
allows selection of the GT0 or GT1 Global Timer value bus as data source, a 24-bit
capture/compare register GTCXk, and a 24-bit equal comparator.
The 32 Global Timer Cells (GTC00 to GTC31) have the following inputs:
• Two Global Timer value buses, GTV0 and GTV1, coming from the two Global Timers
and carrying the GT0 and GT1 timer values
• Two inputs, TEV0 and TEV1, reporting GT0 and GT1 timer value updates
• Two inputs, TGE0 and TGE1, reporting the result of the GT0 and GT1 compare
operations
• A trigger input (GTCkIN) that is connected via the GTC input multiplexer to one of the
following signal sources:
Connected to M1O/M0O
From GT0 of previous GTCk-1
TGE0
GTV0
M1I M0I
TEV0
SQSk
MUX
GTCkIN
MUX GTCk
Control
GTCXRk Logic
GTCkOUT
X (24-Bit Value)
MUX
=
TGE1
TEV1
GTV1
M1O M0O
Figure 24-44 shows how the GTCs are arranged and connected to the adjacent GTCs
and with the Global Timers GT0 and GT1.
Clock
Bus
Global Timer
SQT0
GT0
0 0
. . To GTC02
. .
. .
. .
. .
. .
. .
. .
From GTC29
Global Timer
SQT1
GT1
MCA05953
Capture Mode
The capture function of a GTCk cell is performed on a rising edge (GTCCTRk.RED = 1),
a falling edge (GTCCTRk.FED = 1) or both edges of the selected GTCkIN input signal.
On the requested event, the GTC:
• Copies the 24-bit value of the selected Global Timer into the 24-bit capture/compare
register GTCXkR.X,
• Sets the GTCk service request flag in register SRSS1/SRSC1,
• Activates the service request output SQSk if control register bit GTCCTRk.REN = 1,
• Performs a GTCkOUT output signal line manipulation (set, reset, toggle, unchanged)
as defined by bit field GTCCTRk.OCM,
• Transfers an action request, generated by an internal event or received on the M1I,
M0I input lines, to the M1O, M0O output lines.
Compare Mode
In the Compare Mode of a GTCk cell, several functions can be performed when the value
of the selected Global Timer matches and/or exceeds the value stored in register
GTCXR. With GTCCTRk.GES = 0 an “Equal Compare” match is selected while
GTCCTRk.GES = 1 selects a “Greater Equal Compare” match. On the requested event,
the GTC:
• Sets the GTCk service request flag in register SRSS1/SRSC1,
• Activates service request output SQSk if control register bit GTCCTRk.REN = 1,
• Performs a GTCkOUT output signal line manipulation (set, reset, toggle, unchanged)
as defined by bit field GTCCTRk.OCM,
• Transfers an action request, generated by an internal event or received on the M1I,
M0I input lines, to the M1O, M0O output lines.
If a greater or equal compare is selected, the condition is evaluated only when the
compare value is written to the GTCXRk register. The user should then ensure that the
GTC is already enabled so that the evaluation can take place.
M1I M0I
≥1 Reset
EOA
OUT
CEN OIA OCM2 OCM1 OCM0
&
&
FF GTCkOUT
0
1 fGPTA
& ((Event and CEN) or OIA)
Event and (OCM != X00B)
BYP
When bit GTCCTRk.OCM2 is cleared, the data output GTCkOUT is only controlled by
the local GTCk. A set, reset, toggle, or hold operation can be performed as selected by
bits GTCCTRk.OCM1 and GTCCTRk.OCM0 (Table 24-2).
When bit GTCCTRk.OCM2 is set, the data output GTCkOUT is affected either by the
local GTCCTRk.OCM1 and GTCCTRk.OCM0 bits or by the M1I/M0I input lines, which
are connected to the adjacent GTCk-1 Global Timer output lines M1O/M0O. An enabled
GTCk event superimposes an action request generated simultaneously by the M1I/M0I
inputs.
When the bypass bit GTCCTRk.BYP is cleared, the M1O/M0O output lines logically OR
together the local GTCk events and, if enabled by bit GTCCTRk.OCM2, the action
requests received via the M1I/M0I input lines.
When bit GTCCTRk.BYP is set to 1, a local GTCk event will not modify the M1O/M0O
output lines.
Table 24-2 Selection of GTC Output Operations and Action Transfer Modes
Bit Field Local Capture or M1O/M0O M1O/M0O State of Local
OCM[2:0] Compare Event BYP = 0 BYP = 1 Data Output Line
000 not occurred 0 0 0 0 not modified
occurred 0 0 0 0 not modified
001 not occurred 0 0 0 0 not modified
occurred 0 1 0 0 inverted
010 not occurred 0 0 0 0 not modified
occurred 1 0 0 0 0
011 not occurred 0 0 0 0 not modified
occurred 1 1 0 0 1
100 not occurred M1I M0I M1I M0I modified according M1I/M0I
occurred M1I M0I M1I M0I modified according M1I/M0I
101 not occurred M1I M0I M1I M0I modified according M1I/M0I
occurred 0 1 M1I M0I inverted
110 not occurred M1I M0I M1I M0I modified according M1I/M0I
occurred 1 0 M1I M0I 0
111 not occurred M1I M0I M1I M0I modified according M1I/M0I
occurred 1 1 M1I M0I 1
The GTCkOUT output line can be connected to output ports, on-chip peripheral inputs,
and/or LTC inputs via the I/O Line Sharing Unit (see Page 24-90). GTCkOUT can be
updated directly by software (setting bit GTCCTRk.OIA = 1) or upon a timer, capture or
compare event within the local GTCk or a preceding GTC. The current state of the data
output line can be evaluated by reading status flag GTCCTRk.OUT.
Cell Deactivation
Normally, the GTCs are always enabled. However, by programming a GTC to Capture
Mode with no edge selected (GTCCTRk.FED = GTCCTRk.RED = 0), the cell becomes
inactive and performs no action, but still passes action commands via the
communication link from M1I/M0I to M1O/M0O.
This logical operating unit provides an output signal with programmable pulse width and
configurable delay with minimal software overhead.
SRSS1 (write)
Set SRSS1 (read )
GTCk
SRSR1 (read) GTCCTRk
GTCk REN
SRSC1 (write)
Clear Set
GTCk
Clock
Bus
Global Timer
GT0
0 0
TGE0 GTV0
TEV0 M1I M0I
GTC00
M1O M0O
GTC03IN
M1I M0I
GTC03 GTC03OUT
M1O M0O
MCA05956
• GTC01 operates in Capture Mode at rising edge with enable-on-action set (EOA set)
and One Shot Mode enabled (OSM set).
• GTC02 operates in Capture Mode at falling edge with enable-on-action set (EOA
set) and One Shot Mode enabled (OSM set).
• GTC03 operates in Capture Mode at rising edge with enable-on-action set (EOA set)
and One Shot Mode enabled (OSM set).
With the compare event of GTC00 (time stamp), GTC01 becomes active and waits for
the next rising edge at its data input GTC01IN. While GTC01 is active, GTC02 and
GTC03 are inactive.
When GTC01 detects a rising edge at its data input, it captures the current GT0 value
into its GTCXR01 register, enables GTC02, and becomes disabled afterwards because
it was operating in One Shot Mode. When GTC02 detects a falling edge at its data input,
it captures the current GT0 value into its GTCXR02 register, enables GTC03, and
becomes disabled afterwards because it was operating in One Shot Mode. When
GTC03 detects a rising edge at its data input, it captures the current GT0 value into its
GTCXR03 register and becomes disabled afterwards because it was operating in One
Shot Mode. Optionally, the capture event at GTC03 may generate a service request to
indicate that the three capture events have occurred and the captured values can be
checked by software. Note that all of these capture events are executed by the GPTA
hardware without any software interactions and with a resolution of the GT0 clock rate.
Timer
Value
GT0 Timer
Value
GTCXR03.X
GTCXR02.X
GTCXR01.X
GTC01 Active
GTC02 Active
GTCXR00.X
GTC03 Active
Data Input
GTCxIN Don’t care Don’t care
(x = 01,02,03)
Time
Time Stamp MCD05957
Timer
Value
FFFFFFH
GTREV0.REV
Data Output
GTC03OUT
Time
Start of
Time Period MCD05958
At the start of the time period (reload of GT0), GTC00 becomes active and waits for the
compare event. At this event, it sets the output signal GTC03OUT, enables GTC01 for
compare operation, and becomes disabled afterwards because it was operating in One
Shot Mode. When the GTC01 compare event occurs, the output signal GTC03OUT is
reset, GTC02 becomes enabled, and GTC01becomes disabled because it was
operating in One Shot Mode. When the GTC02 compare event occurs, the output signal
GTC03OUT is set, GTC03 becomes enabled, and GTC02 becomes disabled because it
was operating in One Shot Mode. When the GTC03 compare event occurs, the output
signal GTC03OUT is reset, and GTC02 becomes disabled because it was operating in
One Shot Mode.
The capture event at GTC03 should generate a service request to indicate that the three
compare events have occurred and that GTC01 can be enabled again (setting EOA and
OSM). Note that all of the compare events are executed by the GPTA hardware without
any software interactions and with a resolution of the GT0 clock rate.
Registers
The following registers are assigned to a Local Timer Cell LTCk (k = 00-62):
• LTCCTRk = Local Timer Cell Control Register k (see Page 24-180)
• LTCXRk = Local Timer Cell X Register k (see Page 24-190)
• SRSC2 = Service Request State Clear Register 2 (see Page 24-211)
• SRSC3 = Service Request State Clear Register 3 (see Page 24-213)
• SRSS2 = Service Request State Set Register 2 (see Page 24-212)
• SRSS3 = Service Request State Set Register 3 (see Page 24-214)
Features
• 16-bit based timer cells providing capture, compare, and timer functions.
• Capture Mode on rising, falling or both edges with following actions:
– Service request generation
– Output signal transition generation (set, reset, toggle the output signal).
• Compare Mode on equal compare of the corresponding (Reset-)Timer LTC with
following actions:
– Service request generation
– Output signal transition generation (set, reset, toggle the output signal).
• Timer Mode incremented on hardware signal with following actions:
– Event generation at overflow
– Service request generation
– Output signal transition generation (set, reset, toggle the output signal).
• Reset Timer Mode allows the selected LTC to be reset by an adjacent cell. Coherent
update capability of adjacent LTCs for PWM management is provided.
• One Shot Mode allows the selected (capture, compare, timer or reset timer) mode
to be stopped after the first event.
• Flexible mechanism to link pin actions and allow complex combination of cells. (A
cell has the ability to propagate actions over adjacent cells with higher number, in
order to perform complex waveforms such as multi channel PWMs).
Architecture
The architecture of an LTC is shown in Figure 24-50. Each LTC has a 16-bit
capture/compare register and a 16-bit equal to comparator.
The first 63 Local Timer Cells (LTC00 to LTC62) have the following inputs:
• A local input data bus (YI) carrying the local timer value of the adjacent LTC with
lower order number (YI of LTC00 is always 0000H)
• A TI input reporting the occurrence of a local timer value update of the adjacent LTC
with lower order number (TI of LTC00 is 0)
• A SI input used by the LTC in Compare Mode as enable line (SI of LTC00 is 0)
• Two action mode inputs (M1I, M0I) coming from the adjacent LTC cell with lower
order number (M1I and M0I of LTC00 are 0)
• An EI input reporting an event coming from the adjacent LTC with higher order
number
• A trigger/clock/enable input LTCkIN hooked to one of the following signals sources:
– External port lines
– GTC00 to GTC31 outputs
– Clock bus signals
– PDL0 or PDL1 outputs
– Internal GPTA kernel input signals INTx (x = 0-3)
Each LTC provides the following output signals:
• One data output line (LTCkOUT) that can be connected to:
– External port lines
– Inputs of an MSC module
– Outputs and/or inputs of Global Timer Cell inputs
• One LTC prescaler clock input (LTCPRE) for Timer Mode
• One service request line (SQT) triggered by a capture/compare event
• A local output data bus (YO) carrying the local timer value to the adjacent LTC with
higher order number or the value on YI
• A TO output reporting the occurrence of a local timer value update to the adjacent
LTC with higher order number
• An SO output used by the adjacent LTC with higher order number as enable signal
for a compare function
• An EO output reporting the occurrence of a local event to the adjacent LTC with lower
order number
• Two mode lines (M1O, M0O) going to the adjacent LTC with higher order number.
YI SI EO TI M0I M1I
LTCXRk SQTk
LTCkIN
MUX
SO EI TO M0O M1O
YO
To/From Next LTCk+1 MCA05959
Figure 24-51 shows the arrangement of the LTCs and the connections with adjacent
LTCs. LTC63 is a Local Timer Cell that differs from all other LTCs (LTC00 to LTC62).
LTC63 is described in detail on Page 24-79.
0000H 0 0 0 0
LTCPRE
YI SI EO TI M1I M0I
SQT00
Local Timer Cell LTC00
LTC00IN
YO SO EI TI M1O M0O LTC00OUT
YI SI EO TI M1I M0I
SQT01
Local Timer Cell LTC01
LTC01IN
YO SO EI TO M1O M0O LTC01OUT
. .
. . To LTC02
. .
. .
. .
. .
. . From LTC60
. .
YI SI EO TI M1I M0I
SQT61
Local Timer Cell LTC61
LTC61IN
YO SO EI TO M1O M0O LTC61OUT
YI SI EO TI M1I M0I
SQT62
Local Timer Cell LTC62
LTC62IN
YO SO EI TO M1O M0O LTC62OUT
YI EO TI SQT63
Local Timer Cell LTC63 LTC63IN
LTC63OUT
MCA05960
Capture Mode
In Capture Mode, the LTCkIN input signal is used for capture function. Level or edge
Sensitive Modes can be selected (see Page 24-73). On a capture event, the LTCk:
• copies the state of the local input data bus (YI) to the LTCXRk register (LTC00 always
copies 0000H),
• sets the LTCk service request flag,
Compare Mode
The Compare Mode can be enabled on a low, high, or both levels of the select input line
SI (LTCCTRk.SOL = 1, LTCCTRk.SOH = 1). The current state of SI is indicated by bit
field LTCCTRk.SLL and can be read. When the value of the local input data bus (YI)
matches the LTCXRk contents,
• The LTCk service request flag is set,
• The service request line SQTk is activated if LTCCTRk.REN is set to 1,
• The LTCkOUT output line state is changed (set, reset, toggle, unchanged),
depending on bit field LTCCTRk.OCM,
• An action request is generated and/or passed via the M1O/M0O output lines to the
LTC with higher order number (LTCk+1),
• The event output EO is set to high level for one fGPTA clock cycle.
Note: To enable the compare function in all cases (on every timer or compare register
update caused by a software write access, a reset event or a compare match), bits
LTCCTRk.SOL and LTCCTRk.SOH must be set to 1.
An inactive cell (LTCCTRk.SOL = LTCCTRk.SOH = 0, or SI does not match the
programmed value) will transfer the state of the event input line EI to the event output
line EO.
Table 24-3 LTC Data Input Line Operation (in Timer Mode)
Input Source Level Sensitive Input Line Edge Sensitive Input Line
LTCCTRk.ILM = 1 LTCCTRk.ILM = 0
External Signal The external signal operates The programmed function of the LTC
(Port line) as gating signal for the cell. cell is performed on selected
The active input level can be edge(s).
selected with control register
bit AIL. Additionally, the LTC
prescaler mode can be
enabled with LTCCTRk.PEN
to reduce the timer frequency.
The programmed function of
the LTC is performed with the
GPTA module clock
frequency, or with the
programmed prescaler clock
LTCPRE (see Page 24-36).
Internal Clock The programmed function is The programmed function of the LTC
Bus Line or performed with the internal cell is performed on selected
PDL output or clock or PDL/INT signal. Note edge(s).
INT input that all internal clock bus lines In case of full speed GPTA module
and PDL signals are active clock selection as input clock, the
high pulses. The LTC Level Sensitive Mode must be
Prescaler Mode and the input selected. The Edge Sensitive Mode
signal inversion must not be will not produce an event in this
used. special case.
Table 24-3 LTC Data Input Line Operation (in Timer Mode) (cont’d)
Input Source Level Sensitive Input Line Edge Sensitive Input Line
LTCCTRk.ILM = 1 LTCCTRk.ILM = 0
GTC output The GTC output signal The programmed function of the LTC
operates as gating signal for cell is performed on selected
the cell. The active input level edge(s).
can be selected with bit
LTCCTRk.AIL. Additionally,
the LTC prescaler clock
LTCPRE can be enabled with
bit LTCCTRk.PEN to reduce
the timer frequency.
Note: If Capture Mode and level sensitive input is selected for an LTCk (bit
LTCCTRk.ILM = 1), a capture event occurs on every LTC timer clock event if the
corresponding LTC input signal is a high level.
M1I M0I
≥1 Reset
EOA
OUT
CEN OIA OCM2 OCM1 OCM0
&
&
FF LTCkOUT
0
1 fGPTA
& ((Event and CEN) or OIA)
Event and (OCM != X00B)
BYP
M1O M0O
Note: All bits/flags shown in this figure are located in register LTCCTRk. MCA05961
Table 24-4 Selection of LTC Output Operations and Action Transfer Modes
Bit Field Local Capture, M1O/M0O M1O/M0O State of Local
OCM[2:0] Compare, or BYP = 0 BYP = 1 Data Output Line
Timer Overflow
Event
000 not occurred 0 0 0 0 not modified
occurred 0 0 0 0 not modified
001 not occurred 0 0 0 0 not modified
occurred 0 1 0 0 inverted
010 not occurred 0 0 0 0 not modified
occurred 1 0 0 0 0
011 not occurred 0 0 0 0 not modified
occurred 1 1 0 0 1
100 not occurred M1I M0I M1I M0I modified according M1I/M0I
occurred M1I M0I M1I M0I modified according M1I/M0I
101 not occurred M1I M0I M1I M0I modified according M1I/M0I
occurred 0 1 M1I M0I inverted
110 not occurred M1I M0I M1I M0I modified according M1I/M0I
occurred 1 0 M1I M0I 0
111 not occurred M1I M0I M1I M0I modified according M1I/M0I
occurred 1 1 M1I M0I 1
The LTCkOUT output line can be connected to output ports, on-chip peripheral inputs
and/or LTC inputs via the I/O Line Sharing Unit (see Page 24-90). LTCkOUT can be
updated directly by software (setting bit LTCCTRk.OIA = 1) or upon a timer, capture, or
compare event within the local LTCk or a preceding LTC. The current state of the data
output line can be evaluated by reading status flag LTCCTRk.OUT.
Cell Deactivation
Normally, the LTCs are always enabled. However, by programming an LTC to Capture
Mode with no edge selected (LTCCTRk.ILM = LTCCTRk.FED = LTCCTRk.RED = 0),
the cell becomes inactive and performs no action, but still passes action commands via
the communication link from M1I/M0I to M1O/M0O. Output EO is inactive.
Alternatively, the LTC can be deactivated by setting it into Compare Mode with no active
select line level (LTCCTRk.SOL = LTCCTRk.SOH = 0) but the communication link
remains active. In this mode configuration, EI will be passed to EO.
a service request, can perform a manipulation of a GPTA output line (set, reset or
toggle), and can also reset the LTC via the event output line EO.
SRSSn (write)
Set SRSSn (read )
LTCk
SRSRn (read ) LTCCTRk
Note:
Service request flags of LTC 00 to LTC31 are located in SRSS 2/SRSC2 registers (n = 2).
Service request flags of LTC 32 to LTC62 are located in SRSS 3/SRSC3 registers (n = 3).
MCA05962_mod
Registers
The following registers are assigned to Local Timer Cell LTC63:
• LTCCTR63 = Local Timer Cell Control Register 63 (see Page 24-188)
• LTCXR63 = Local Timer Cell X Register 63 (see Page 24-190)
• SRSC3 = Service Request State Clear Register 3 (see Page 24-213)
• SRSS3 = Service Request State Set Register 3 (see Page 24-214)
Features
The GPTA Local Timer Cell array has one special cell, LTC63, which provides the
following special features:
• Compare Mode on greater equal compare of the last timer, 16-bit based with
following actions:
– Service request generation
– Output signal transition generation (set, reset, toggle the output signal).
• Bit Reversal Mode:
– Timer can be selected to enable a special PWM Mode, called pulse count
modulation (PCM)
• Compare Value Switching can be triggered by a hardware signal. This function can
generate a service request. One Shot Mode makes it possible to stop the function
after the first event.
Architecture
LTC63 is locally equipped with a 16-bit compare register, a 16-bit shadow register and
a 16-bit greater comparator (Figure 24-54).
The LTC63 has the following inputs:
• A local input data bus (YI) carrying the local timer value of the adjacent LTC with
lower order number
• A TI input reporting the occurrence of a local timer value update of the adjacent LTC
with lower order number
• A trigger/enable input LTCkIN for compare value switching hooked to one of the
following signals sources:
– External port lines
– GTC00 to GTC31 outputs
– Clock bus signals
– PDL0 or PDL1 outputs
– Internal GPTA kernel input signals INTx (x = 0-3)
From/To LTC62
YI EO TI
MUX
LTC63
LTCXR63 Control SQT63
Logic
> X (16-Bit Compare)
LTC63IN
LTCXR63
XS (16-Bit Shadow)
LTC63OUT
MCA05963
Compare
The compare function is always enabled. As long as the 16-bit compare value
LTCXR63.X is greater than the timer value provided at YI, the comparator output signal
is 1. The timer value at YI comes from the LTC62 either in original or in reversed order
(Bit0 <-> Bit15, Bit1 <-> Bit14, etc.). The greater comparator output is connected directly
to the output line LTC63OUT.
The 16-bit compare value LTCXR63.X is never greater than the LTC timer value (FFFFH)
coming from YI and which is used on LTC timer reset. Without special measures, a duty
cycle of 100% cannot be achieved. There is always one LTC timer clock missing.
Therefore, additional logic generates a permanent high signal whenever the 16-bit
compare value LTCXR63.X is FFFFH.
Timer Value
0000H 0001H 0002H 0003H 0004H FFFFH
Normal/
0000H 8000H 4000H C000H 2000H FFFFH
Reversed
Desired
Duty Cycle
0.00 = 0000H
0.25 = 4000H
0.50 = 8000H
0.75 = C000H
1.00 = FFFFH
MCT05964
The output is OFF for the remaining cycles of the period. The worst case error is
approximately +2/-1 ON pulses. A subtraction performed via software may be used to
reduce the worst case error.
If the duty cycle is changed at an arbitrary time, the actual duty cycle for the entire current
period will reflect the old duty cycle, the new one, or a mixture of both.
Figure 24-56 shows another PCM example that demonstrates the difference between a
standard PWM signal and the derived PCM signal. During one PWM period (128 clock
cycles), the standard PWM signal is ON for 8 clock cycles and OFF for the remaining
120 clock cycles (duty cycle of 6.25%). The PCM signal operates with a PCM duty cycle
of 1/8 = 0.125 resulting in 8 ON pulses of 1 clock cycle width within 1 PWM period.
8 Clock Cycles
PWM Period = 128 Clock Cycles
Standard
PWM Signal
PCM Signal
Various clocking modes of the LTC63 copy function are possible, depending on the
source selected for the input line by the input multiplexer (see Table 24-6).
When bit LTCCTR63.OSM is set to 1, a self-disable is executed after each copy event
(PWM is not affected). The current state of the LTC copy enable may be evaluated by
reading the control register flag bit LTCCTR63.CEN.
The output can be switched immediately to 0 or 1 in any pulse modulation mode by
writing 0000H or FFFFH to the duty cycle compare register LTCXR63.X.
the other two bit combinations of bit field LTCCTR63.REN (00B, 11B), the SQT63 output
will not be activated. The LTC63 service request flag SRSS3.LTC63 will be set on a
service request independently of LTCCTR63.REN. Additional information on service
request and interrupt handling is given on Page 24-112.
SRSS3 (write)
SRSS3 (read ) Set
LTC63
LTCCTR63 SRSR3 (read )
REN LTC63 SRSC3 (write)
2 Set Clear
LTC63
0
Compare event occured
SQT63
Copy event occured
0 MCA05966_mod
YI SI EO TI M1I M0I
Reset
Local Timer Cell LTC00 LTC00IN
Timer
YO SO EI TI M1O M0O
YI SI EO TI M1I M0I
Period
Local Timer Cell LTC01
Compare
YO SO EI TO M1O M0O
YI SI EO TI M1I M0I
Duty Cycle
Local Timer Cell LTC02
Compare
YO SO EI TO M1O M0O
YI SI EO TI M1I M0I
Period
Local Timer Cell LTC03
Compare
YO SO EI TO M1O M0O
YI SI EO TI M1I M0I
Duty Cycle
Local Timer Cell LTC04 LTC04OUT
Compare
YO SO EI TO M1O M0O
MCA05967
Figure 24-58 PWM Signal Generation with LTCs (Full Coherent Update)
LTC00 is configured in Reset Timer Mode thus providing all subsequent cells with a time
base. LTC00 is clocked by a clock signal at the LTC00IN which has been selected by the
LTC input multiplexer.
LTC01 and LTC02 are configured in Compare Mode. They are enabled if its SI inputs
are at low level and responsible for the LTC04OUT signal generation in Phase 1. With
the programmed values from Table 24-7, the LTC04OUT signal of Phase 1 has a period
of 1000D (= 3E8H) clocks of the LTC00IN clock signal and a duty cycle of 20% (= 200D
or C8H).
LTC01 is configured in such a way (LTCCTR01.OCM = 011B) that its output LTC01OUT
is set to 1 whenever the LTC00 timer value LTCXR00.X is equal to the LTC01 compare
value LTCXR01.X.
LTC02 is configured in such a way (LTCCTR02.OCM = 110B) that its output LTC02OUT
is reset whenever the LTC00 timer value LTCXR00.X is equal to the LTC02 compare
value LTCXR02.X or it copies the action from the previous LTC01.
LTC03 and LTC04 are configured in Compare Mode. They are enabled if its SI inputs
are at high level and are responsible for the LTC04OUT signal generation in Phase 2.
With the programmed values from Table 24-7, the LTC04OUT signal of Phase 2 has a
period of 2000D (= 7D0H) clocks of the LTC00IN clock signal and a duty cycle of 75%
(= 1500D or 5DCH).
0000C7H Time
FFFFFFH
CUD Flag
Set by
software
SO of LTC00
MCT05968
Figure 24-59 Internal Signal States of the PWM Signal Generation with 5 LTCs
LTC00 to LTC05 for the PWM example must be configured as defined in Table 24-7.
Table 24-7 Programming Values for PWM Signal Generation with 5 LTCs
Register Value Function
LTC00 Configuration Setup
GPTA0_LTCXR00 0000 0000H LTC00 data register value = 0
GPTA0_LTCCTR00 0000 0413H MOD = 11B: Reset Timer Mode selected
OSM = 0: LTC00 continuously enabled
ILM = 0, RED = 1, FED = 0:
Input LTC00IN operates in Edge Sensitive Mode
with rising edge; one clock bus signal is selected
via the LTC input multiplexer
SLO = 0: state of select line output SO is 0
CEN = 0: enable LTC00 for local events
OCM = 000B: hold LTC00OUT state
LTC01 Configuration Setup
GPTA0_LTCXR01 0000 03E7H Load compare value = 3E7H = 999D
GPTA0_LTCCTR01 0000 5C11H MOD = 01B: Compare Mode with LTC00 selected
OSM = 0: LTC01 continuously enabled
SOH = 0, SOL = 1: compare enabled by low level
at SI
BYP = 0: bypass in LTC02 is disabled
EOA = 0: LTC02 enabled for local events
OCM = 011B: set LTC01OUT by a local event only
OIA = 1: output action defined by OCM must be
performed immediately
LTC02 Configuration Setup
GPTA0_LTCXR02 0000 00C7H Load compare value = C7H = 199D
GPTA0_LTCCTR02 0000 3411H MOD = 01B: Compare Mode with LTC00 selected
OSM = 0: LTC02 continuously enabled
SOH = 0, SOL = 1: compare enabled by low level
at SI
BYP = 0: bypass in LTC02 is disabled
EOA = 0: LTC02 enabled for local events
OCM = 110B: reset LTC02OUT by a local event or
copy the previous cell action
OIA = 0: no immediate output action required
Table 24-7 Programming Values for PWM Signal Generation with 5 LTCs (cont’d)
Register Value Function
LTC03 Configuration Setup
GPTA0_LTCXR03 0000 07CFH Load compare value = 7CFH = 1999D
GPTA0_LTCCTR03 0000 7C21H MOD = 01B: Compare Mode with LTC00 selected
OSM = 0: LTC03 continuously enabled
SOH = 1, SOL = 0: compare enabled by high level
at SI
BYP = 0: bypass in LTC03 is disabled
EOA = 0: LTC03 enabled for local events
OCM = 111B: set LTC03OUT by a local event or
copy the previous cell action
OIA = 1: output action defined by OCM must be
performed immediately
LTC04 Configuration Setup
GPTA0_LTCXR04 0000 05DBH Load compare value = 5DBH = 1499D
GPTA0_LTCCTR04 0000 3421H MOD = 01B: Compare Mode with LTC00 selected
OSM = 0: LTC04 continuously enabled
SOH = 1, SOL = 0: compare enabled by high level
at SI
BYP = 0: bypass in LTC04 is disabled
EOA = 0: LTC04 enabled for local events
OCM = 110B: reset LTC04OUT by a local event or
copy the previous cell action
OIA = 0: no immediate output action required
LTCG3 64 OG1
LTCG4 56 OG2
LTCG7 OG5
8 OG6
PDL[3:0]
INT[3:0]
8
CLK[7:0]
24 GPTA
Module
8 FPC[5:0] Kernel
INT[1:0]
INT[3:0] 4
MCA05969
FPC/INT PDL/INT
Clock Group
Group Group
MCA05970
An LTC group combines eight LTC cells with its input and output lines. This results in
eight LTC groups, LTCG0 to LTCG7.
A GTC group combines eight GTC cells with its input and output lines. This results in
four GTC groups, GTCG0 to GTCG3.
An I/O group combines eight GPTA I/O lines connected to bi-directional device pins with
its input and output lines. This results in seven I/O groups, IOG0 to IOG6, supporting
56 I/O lines.
An Output group combines eight GPTA output lines connected to device pins as an
output. This results in seven output groups, OG0 to OG6, supporting 56 output lines.
The Clock group is a group that combines the eight clock bus output signals CLK[7:0]
generated by the clock distribution unit.
The FPC/INT group is a group that combines the six level output signals SOL[5:0] of the
FPCs with two external input lines INT[1:0] of the GPTA module.
The PDL/INT group is a group that combines the four PDL output lines of the PDL bus
with four external input lines INT[3:0] of the GPTA module.
IOG0 IOG1 IOG2 IOG3 IOG4 IOG5 IOG6 OG0 OG1 OG2 OG3 OG4 OG5 OG6
8 8 8 8 8 8 8 8 8 8 8 8 8 8
8
LTC Groups
MCA05971
OUT0
OUT1
OUT2
OUT3
OUT4
OUT5
OUT6
OUT7
closed per column
IN0
IN1
IN2
Outputs of a IN3 To other
LTC Group or
IN4 OMGs
GTC Group
IN5
IN6
IN7
MRACTL
OMCRLg
OMLn MAEN
OMCRHg
(g = 0-13)
3 Not a reserved &
OMGn bit combination
OMGn
8
MUX
GTC Group
(OMG0g)
3 0 0
To Input of
MUX
MUX
2. Level
8 Mux
MUX
LTC Group
(OMG2g)
1. Level
Mux MCA05973
Two Output GPTA, OMCRL and OMCRH (see also Page 24-196), are assigned to each
of the I/O or output groups. Therefore, a total of 28 registers control the connections
within the output multiplexer of the GPTA module.
The OMCRL registers control the OMG output lines 0 to 3. The OMCRH registers control
the OMG output lines 4 to 7. Table 24-10 lists all Output Multiplexer Control Registers
with its control functions. Please note that the Output Multiplexer Control Registers are
not directly accessible but must be written or read using a FIFO array structure as
described on Page 24-110.
GTC Groups
8 8 8 8
8 GIMG
IOG0
00
8 GIMG
IOG1
01
8 GIMG
IOG2
02
I/O Groups
8 GIMG
IOG3
03
8 GIMG
IOG4
10
8 GIMG
IOG5
11
8 GIMG
IOG6
12
LTCG0 8 GIMG
LTC[07:00] 20
LTCG1 8 GIMG
LTC[15:08] 21
LTCG2 8 GIMG
LTC[23:16] 22
8
LTC Groups
LTCG3 GIMG
LTC[31:24] 23
LTCG4 8 GIMG
LTC[39:32] 30 LTC
Input
8 Multiplexer
LTCG5 GIMG
LTC[47:40] 31
LTCG6 8 GIMG
LTC[55:48] 32
LTCG7 8 GIMG
LTC[63:56] 33
MCA05974
The GTC input multiplexer contains GTC input Multiplexer Groups (GIMGs) that connect
the I/O groups or Local Timer Cells with the input lines of the GTC input lines, organized
into four GTC groups with 8 cells each. GTC input Multiplexer Group are grouped into
seven IOGs (IOG[6:0]) with eight lines each and eight LTC groups (LTCG[7:0]) with
8 cells each. One special FPC/INT group with eight outputs is established that combines
the six FPC outputs and two internal input lines INT[1:0] as a group of GIMGs inputs.
Figure 24-66 shows the logical structure of a GIMG.
IN0
IN1
Outputs of an IN2
I/O Group or IN3 To other
LTC Group or IN4 GIMGs
FPC/INT Group IN5
IN6
IN7
MRACTL
Registers GIMCRLg
GIMLn GIMCRHg MAENn
(g = 0-4)
3
&
8 GIMGn GIMENn
MUX
I/O Group
(GIMG0g)
3 Not a reserved
GIMGn bit combination
8
MUX
I/O Group
(GIMG1g)
0 0
000
MUX
To Input n of
001 GTC Group g
8
MUX
MUX
LTC Group
2. Level
(GIMG3g)
Mux
FPC/INT 8
MUX
Group
(GIMG4g)
1. Level
Mux MCA05976
Control Registers are not directly accessible but must be written or read using a FIFO
array structure as described on Page 24-110.
LTC Groups
8 8 8 8 8 8 8 8
8 LIMG LIMG
IOG0
00 04
8 LIMG LIMG
IOG1
01 05
8 LIMG LIMG
IOG2
02 06
I/O Groups
8 LIMG LIMG
IOG3
03 07
8 LIMG LIMG
IOG4
10 14
8 LIMG LIMG
IOG5
11 15
8 LIMG LIMG
IOG6
12 16
LTC
GTCG0 8 LIMG LIMG Input
GTC[07:00] 20 24 Multiplexer
GTC Groups
MCA05977
The LTC input multiplexer contains LTC input Multiplexer Groups (LIMGs) that connect
the I/O groups or Global Timer Cells with the input lines of the LTCs, organized into eight
LTC groups with 8 cells each. IOGs and GTCs are grouped into seven IOGs (IOG[6:0])
with eight lines each and four GTC groups (GTCG[3:0]) with 8 cells each. Two special
groups are available: a clock group with eight lines representing the clock bus lines
CLK[7:0] of the clock distribution unit and a PDL/INT group with eight outputs that
combines the four PDL outputs and four internal input lines INT[3:0] as a group of LIMGs
inputs.
Figure 24-69 shows the logical structure of a LIMG.
IN0
IN1
Outputs of an IN2
I/O Group or IN3 To other
GTC Group or
IN4 LIMGs
CLK Group
PDL/INT Group IN5
IN6
IN7
Example: for LIMG23 (see Figure 24-68), the outputs OUT0 to OUT7 are wired to
the inputs of LTC24 to GTC31.
• An LTC input can be connected either to an I/O group output, or to an GTC output,
or to a clock bus output, or to an PDL/INT output. This is guaranteed by the LIMG
control register layout. Otherwise, short circuits and unpredictable behavior would
occur. In contrast, it is permitted that an I/O group output, or an GTC output, or an
PDL/INT output is connected to more than one LTC input.
The LTC input multiplexer group configuration is based on the following principles:
• Each LIMG is referenced with two index variables: n and g (LIMGng)
• Index n is a group number. I/O groups IOG[3:0] have group number 0, I/O groups
IOG[6:4] have group number 1, Global Timer Cell Groups GTCG[3:0] have group
number 2, clock bus lines CLK[7:0] have group number 3, and the PDL/INT group
has group number 4.
• Index g indicates the number of the LTC group g (g = 0-7) to which the outputs of the
input multiplexer group LIMGng are connected.
The LTC input multiplexer logic as seen for programming is shown in Figure 24-70. With
this logic, five group signals (from an I/O group, GTC group, clock group, or PDL/INT
group) are always combined to one output line that leads to the input of an LTC of LTC
group g. For example, when looking at Figure 24-68, each of the eight LTC input
multiplexer output lines to LTC group LTCG2 is connected via five LIMGn2 (n = 0-4) with
the eight outputs of two I/O group (IOG2 and IOG6), one GTC group (GTCG2), the clock
group, and the PDL/INT group.
MRACTL
Registers LIMCRLg
LIMLn LIMCRHg MAEN
(g = 0-7)
3
&
8 LIMGn LIMENn
MUX
I/O Group
(LIMG0g)
3
Not a reserved
8 LIMGn bit combination
MUX
I/O Group
(LIMG1g)
0 0
000
MUX
To Input n of
001 LTC Group g
8
MUX
MUX
Clock Group 8
MUX
2. Level
(LIMG3g)
Mux
PDL/INT 8
MUX
Group
(LIMG4g)
1. Level
Mux MCA05979
If the OMCRLg register bit field OMGn of the multiplexer array is programmed with an
invalid (reserved) value, the related outputs will be forced to 0. When the array is
disabled (MRACTL.MAEN = 0), all cell inputs and outputs are disconnected from the
GPIO lines and are driven with 0.
31 0
MRADOUT
Multiplexer
Register 52 OMCRH13
Array
51 OMCRL13 Output
FIFO
Multiplexer
Control
26 OMCRH0 Registers
25 OMCRL0
24 LIMCRH7
23 LIMCRL7 LTC Input
Multiplexer
Control
10 LIMCRH0 Registers
9 LIMCRL0
8 GIMCRH3
7 GIMCRL3 GTC Input
Multiplexer
Control
2 GIMCRH0 Registers
1 GIMCRL0
31 0 31 0
MRACTL MRADIN
MCA05980
To reduce hardware and software overhead, at maximum five request sources are
combined together in service request groups. A service request group has up to five
service request inputs and one service request output SRy which is typically connected
outside the GPTA kernel with a standard interrupt node y and controlled by its SRCy
register.
Service Request
Group y
≥1
Service
At maximum SRy Request
five Request Sources from Node y
DCM, PLL, GT, GTC, LTC
(SRCy Register)
MCA05981
register, and cleared or set by software when writing to the corresponding request bit in
SRSCx or SRSSx. When writing to SRSCx or SRSSx, several request flags can be
cleared at once by one write operation. Request flags of bit positions that are written with
0 are not changed. This feature allows fast, simple clearing or setting of request flags
without affecting other bits in the same service request state register.
Note that service request flag is always set independently of whether it is enabled or
disabled by the related module; but the service request line to the corresponding service
request group becomes only active if the corresponding service request is enabled by
the related module. Finally, each service request group y must be enabled by the enable
flag that is located in SRC register y.
Table 24-14 lists all of the service requests groups with its request sources. Note that
service requests of GTCs with an odd index number k can be individually redirected via
register SRNR to a service request group that is assigned mainly to four LTCs.
switch (FPCk.Mode)
case PRESCALER_RISING:
if (FPCk.Rising_Edge) then
Prescaler()
endif
break
case PRESCALER_FALLING:
if (FPCk.Falling_Edge) then
Prescaler()
endif
break
case DELAYED_FILTER_BOTH:
Delayed_Filter()
break
case IMMEDIATE_FILTER_BOTH:
case IMMEDIATE_FILTER_RISING:
case IMMEDIATE_FILTER_FALLING:
Immediate_Filter()
break
case MIXED_FILTER_RISING_DELAYED:
if (FPCk.Signal_Filtered == 0) then
Delayed_Filter()
else
Immediate_Filter()
endif
break
case MIXED_FILTER_RISING_IMMEDIATE:
if (FPCk.Signal_Filtered == 0) then
Immediate_Filter()
else
Delayed_Filter()
endif
break
endswitch
Prescaler()
Delayed_Filter()
if (FPCk.Filter_Clock[n]) then
if (FPCk.Timer >= FPCk.Compare_Value) then
if (FPCk.Compare_Value == 0) then //by-pass
if (FPCk.Signal_Output.Level != FPCk.Signal_Input[m]) then
generate pulse on FPCk.Signal_Output.Transition
FPCk.Signal_Output.Level = FPCk.Signal_Input[m]
FPCk.Signal_Filtered = FPCk.Signal_Output.Level
endif
else //delay time is over
generate pulse on FPCk.Signal_Output.Transition
FPCk.Signal_Output.Level = !FPCk.Signal_Output.Level
FPCk.Signal_Filtered = FPCk.Signal_Output.Level
endif
FPCk.Timer = 0
else
if (FPCk.Timer != 0) then //delay time is running
if (FPCk.Rising_Edge is detected) then //edge detection done at clock input
FPCk.Rising_Edge_Glitch = 1
else
if (FPCk.Falling_Edge is detected) then //edge detection done at clock input
FPCk.Falling_Edge_Glitch = 1
endif
endif
endif
if (FPCk.Signal_Output.Level != FPCk.Signal_Input[m])
then //expected level
FPCk.Timer ++
else //unexpected level
if (FPCk.Timer != 0) then
if (FPCk.Reset_Timer) then
FPCk.Timer = 0
else
FPCk.Timer --
endif
endif
endif
endif
Immediate_Filter()
if (FPCk.Filter_Clock[n]) then
if (FPCk.Timer == 0) then
if (FPCk.Signal_Output.Level != FPCk.Signal_Input[m]) ) then //change detected
generate pulse on FPCk.Signal_Output.Transition
FPCk.Signal_Output.Level = FPCk.Signal_Input[m]
if ( (FPCk.Compare_Value == 0) or
((FPCk.Mode == IMMEDIATE_FILTER_RISING) and !FPCk.Signal_Input[m]) or
((FPCk.Mode == IMMEDIATE_FILTER_FALLING) and FPCk.Signal_Input[m]) )
then //by-pass
FPCk.Signal_Filtered = FPCk.Signal_Output.Level
else //start delay time
FPCk.Timer ++
endif
endif
else
if (FPCk.Timer >= FPCk.Compare_Value) then //delay time is over
FPCk.Timer = 0
FPCk.Signal_Filtered = FPCk.Signal_Output.Level
else //delay time is running
FPCk.Timer ++
if (FPCk.Rising_Edge) then
FPCk.Rising_Edge_Glitch = 1
else
if (FPCk.Falling_Edge) then
FPCk.Falling_Edge_Glitch = 1
endif
endif
endif
endif
endif
Variables
Input, Local, Output variables of the cell (I, L, O)
Global variables
24.2.6.2 PDL-Algorithm
PDLx_Control_Logic() “to be performed every GPTA clock”
if (x == 0) then
S1.Level = FPC0.Signal_Output.Level
S1.Transition = FPC0.Signal_Output.Transition
S2.Level = FPC1.Signal_Output.Level
S2.Transition = FPC1.Signal_Output.Transition
S3.Level = FPC2.Signal_Output.Level
S3.Transition = FPC2.Signal_Output.Transition
else //x = 1
S1.Level = FPC3.Signal_Output.Level
S1.Transition = FPC3.Signal_Output.Transition
S2.Level = FPC4.Signal_Output.Level
S2.Transition = FPC4.Signal_Output.Transition
S3.Level = FPC5.Signal_Output.Level
S3.Transition = FPC5.Signal_Output.Transition
endif
if (PDLx.Three_Sensors_Enable) then
Three_Sensors()
else
Two_Sensors()
endif
if (PDLx.Mux) then
PDLx.Signal_Output1.Level = 1
if (PDLx.Signal_Forward or PDLx.Signal_Backward) then
PDLx.Signal_Output1.Transition = 1
else
PDLx.Signal_Output1.Transition = 0
endif
else
PDLx.Signal_Output1.Transition = S1.Transition
PDLx.Signal_Output1.Level = S1.Level
endif
Two_Sensors()
PDLx.Signal_Output2.Level = S3.Level
PDLx.Signal_Output2.Transition = S3.Transition
Three_Sensors()
Variables
Input, Local, Output variables of the cell (I, L, O)
Global variables
24.2.6.3 DCM-Algorithm
DCMk_Control_Logic() “to be performed every GPTA clock”
Compare()
Add_Clock()
Check_Input()
Compare()
Add_Clock()
if (DCMk.Clock_Request) then
Generate DCMk.Signal_Output
DCMk.Clock_Request = 0
endif
Check_Input()
if (DCMk.Signal_Input.Transition) then
if (DCMk.Signal_Input.Level) then //rising edge
trig(DCMk.Service_Request_Rising)
if (DCMk.Capture_On_Rising_Edge) then
DCMk.Capture_Value = DCMk.Timer
else
if (DCMk.Capcom_Opposite) then
DCMk.Capcom_Value = DCMk.Timer
endif
endif
if (DCMk.Clear_On_Rising_Edge) then
DCMk.Timer = 0
else DCMk.Timer ++
endif
if (DCMk.Clock_On_Rising_Edge) then
Generate pulse on DCMk.Signal_Output
endif
else //falling edge
trig(DCMk.Service_Request_Falling)
if (!DCMk.Capture_On_Rising_Edge) then
DCMk.Capture_Value = DCMk.Timer
else
if (DCMk.Capcom_Opposite) then
DCMk.Capcom_Value = DCMk.Timer
endif
endif
if (DCMk.Clear_On_Falling_Edge) then
DCMk.Timer = 0
else DCMk.Timer ++
endif
if (DCMk.Clock_On_Falling_Edge) then
Generate pulse on DCMk.Signal_Output
endif
endif
else DCMk.Timer ++
endif
Variables
Input, Local, Output variables of the cell (I, L, O)
Global variables
24.2.6.4 PLL-Algorithm
PLL_Control_Logic() “to be performed every GPTA clock”
Variables
Input, Local, Output variables of the cell (I, L, O)
Global variables
24.2.6.5 GT-Algorithm
GTm_Control_Logic() “to be performed every GPTA clock”
if (GTm.Run) then
if (Event on GTm.Clock_In[p] selected by GTm.Clock_Mux) then
GTm.Timer ++
if (Overflow of GTm.Timer) then
GTm.Timer = GTm.Reload_Value
trig(GTm.Service_Request_Trigger)
endif
endif
endif
Variables
Input, Local, Output variables of the cell (I, L, O)
Global variables
24.2.6.6 GTC-Algorithm
GTCk_Control_Logic() “to be performed every GPTA clock”
if (GTCk.Cell_Enable) then
switch (GTCk.Mode)
case CAPTURE_T0:
Capture(0)
break
case CAPTURE_T1:
Capture(1)
break
case COMPARE_T0:
Compare(0)
break
case COMPARE_T1:
Compare(1)
endswitch
Manage_Mux()
Capture(m)
if (GTCk.Signal_Input) then
trig(GTCk.Service_Request_Trigger)
GTCk.X = GTm.Timer
GTCk.Event = 1
else
GTCk.Event = 0
endif
Ck.Event = 0
Compare(m)
Manage_Mux()
if ( (GTCk.Enable_Of_Action) and
((GTCk.Output_Mode_In.1) or (GTCk.Output_Mode_In.0)) ) then
GTCk.Cell_Enable = 1
GTCk.Enable_Of_Action = 0
endif
Set_Data_Out(mode)
switch (mode)
case 00B: //no change
break
case 01B: //toggle
GTCk.Data_Out = !GTCk.Data_Out
break
case 10B: //clear
GTCk.Data_Out = 0
break
case 11B: //set
GTCk.Data_Out = 1
break
endswitch
GTCk.Output_State = GTCk.Data_Out
Variables
Input, Local, Output variables of the cell (I, L, O)
Global variables
if (LTCk.Cell_Enable) then
switch (LTCk.Mode)
case TIMER_FREE_RUN:
LTCk.Reset_Timer_Bit = 0
Timer()
break
case TIMER_RESET:
if (LTCk.Event_In) then
LTCk.Reset_Timer_Bit = 1
endif
Timer()
break;
case CAPTURE:
Capture()
break
case COMPARE:
Compare()
break
endswitch
if ((LTCk.One_Shot_Mode) and (LTCk.Event)) then
LTCk.Cell_Enable = 0
endif
endif
Manage_Mux()
Timer()
Capture()
if (LTCk.Signal_Input) then
trig(LTCk.Service_Request_Trigger)
LTCk.X = LTCk.Y_In
LTCk.Event = 1
else
LTCk.Event = 0
endif
LTCk.Event_Out = LTCk.Event
Compare()
Manage_Mux()
Set_Data_Out(mode)
switch (mode)
case 00B: //no change
break
case 01B: //toggle
LTCk.Data_Out = !LTCk.Data_Out
break
case 10B: //clear
LTCk.Data_Out = 0
break
case 11B: //set
LTCk.Data_Out = 1
break
endswitch
LTCk.Output_State = LTCk.Data_Out
Variables
Input, Local, Output variables of the cell (I, L, O)
Global variables
Copy()
Compare()
Copy()
if (LTC63.Cell_Enable) then
if (LTC63.Signal_Input) then
LTC63.X = LTC63.X_Shadow
trig(LTC63.Service_Request_Trigger)
if (LTC63.One_Shot_Mode) then
LTC63.Cell_Enable = 0
endif
endif
endif
Compare()
Variables
Input, Local, Output variables of the cell (I, L, O)
Global variables
GTCTRk 3) PLLCNT
1) k = 0-5 Identification
GTCCTRk 4) PLLREV 2) k = 0-3 Register
LTCCTRk 5) PLLDTR 3) k = 0-2
4) k = 00-31
GTTIMk 3) ID
5) k = 00-63
GTREVk 3) 6) n = 0-3
7) g = 0-13
GTCXRk 4)
8) g = 0-7
LTCXRk 5) 9) g = 0-3
Note: The Multiplexer Array FIFO registers are not directly accessible ! MCA05982_mod
Table 24-17 Registers Overview - GPTA0 and GPTA1 Kernel Registers (cont’d)
Register Register Long Name Offset Description
Short Name Address see
PLLMTI Phase Locked Loop Micro Tick Register 0C4H Page 24-166
PLLCNT Phase Locked Loop Counter Register 0C8H Page 24-167
PLLSTP Phase Locked Loop Step Register 0CCH Page 24-167
PLLREV Phase Locked Loop Reload Register 0D0H Page 24-168
PLLDTR Phase Locked Loop Delta Register 0D4H Page 24-168
CKBCTR Clock Bus Control Register 0D8H Page 24-173
GTCTRk Global Timer Control Register k 0E0H + Page 24-170
(k = 0, 1) k × 16
GTREVk Global Timer Reload Value Register k 0E0H + Page 24-172
(k = 0, 1) k × 16 + 4
GTTIMk Global Timer Register k 0E0H + Page 24-171
(k = 0, 1) k × 16 + 8
GTCCTRk Global Timer Cell Control Register k 100H + Page 24-175
(k = 00-31) k×8 Page 24-177
GTCXRk Global Timer Cell X Register k 100H + Page 24-179
(k = 00-31) k×8+4
LTCCTRk Local Timer Cell Control Register k 200H + Page 24-180
(k = 00-62) k×8 Page 24-183
Page 24-185
LTCXRk Local Timer Cell X Register k 200H + Page 24-190
(k = 00-62) k×8+4
LTCCTR63 Local Timer Cell Control Register 63 3F8H Page 24-188
LTCXR63 Local Timer Cell X Register 63 3FCH Page 24-190
Table 24-17 Registers Overview - GPTA0 and GPTA1 Kernel Registers (cont’d)
Register Register Long Name Offset Description
Short Name Address see
OMCRLg Output Multiplexer Control Register for not directly Page 24-194
Lower Half of Group g (g = 0-13) addressable;
OMCRLg Output Multiplexer Control Register for Page 24-196
Upper Half of Group g (g = 0-13) see
Page 24-110
GIMCRLg Input Multiplexer Control Register for Page 24-198
Lower Half of GTC Group g (g = 3-0)
GIMCRLg Input Multiplexer Control Register for Page 24-200
Lower Half of GTC Group g (g = 0-3)
LIMCRLg Input Multiplexer Control Register for Page 24-202
Lower Half of LTC Group g (g = 0-7)
LIMCRLg Input Multiplexer Control Register for Page 24-204
Upper Half of LTC Group g (g = 0-7)
Bit Protection
Bits with bit protection (this is valid, for example, for all bits in the Service Request State
Registers) are not changed during a read-modify-write instruction, for example when
hardware sets a request state bit between the read and the write of the read-modify-write
sequence. For bit protected bits it is guaranteed that a hardware setting operation always
has priority. Thus, no hardware triggered events are lost.
Bits with bit protection are marked in the corresponding bit descriptions.
GPTA0_ID
GPTA0 Module Identification Register
(008H) Reset Value: 0029 C0XXH
GPTA1_ID
GPTA1 Module Identification Register
(008H) Reset Value: 0029 C0XXH
31 16 15 8 7 0
r r r
GPTA0_FPCSTAT
GPTA0 Filter and Prescaler Cell Status Register
(044H) Reset Value: 0000 0000H
GPTA1_FPCSTAT
GPTA1 Filter and Prescaler Cell Status Register
(044H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FEG FEG FEG FEG FEG FEG REG REG REG REG REG REG
0 0
5 4 3 2 1 0 5 4 3 2 1 0
r rwh rwh rwh rwh rwh rwh r rwh rwh rwh rwh rwh rwh
GPTA0_FPCCTRk (k = 0-5)
GPTA0 Filter and Prescaler Cell Control Register k
(048H+k*8H) Reset Value: 0000 0000H
GPTA1_FPCCTRk (k = 0-5)
GPTA1 Filter and Prescaler Cell Control Register k
(048H+k*8H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
r rw rw rw rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CMP
rw
GPTA0_FPCTIMk (k = 0-5)
GPTA0 Filter and Prescaler Cell Timer Register k
(048H+k*8H+4H) Reset Value: 0000 0000H
GPTA1_FPCTIMk (k = 0-5)
GPTA1 Filter and Prescaler Cell Timer Register k
(048H+k*8H+4H) Reset Value: 0000 0000H
31 16 15 0
0 TIM
r rwh
GPTA0_PDLCTR
GPTA0 Phase Discrimination Logic Control Register
(078H) Reset Value: 0000 0000H
GPTA1_PDLCTR
GPTA1 Phase Discrimination Logic Control Register
(078H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ERR TSE MUX ERR TSE MUX
0 0
1 1 1 0 0 0
r rwh rw rw r rwh rw rw
GPTA0_DCMCTRk (k = 0-3)
GPTA0 Duty Cycle Measurement Control Register k
(080H+k*10H) Reset Value: 0000 0000H
GPTA1_DCMCTRk (k = 0-3)
GPTA1 Duty Cycle Measurement Control Register k
(080H+k*10H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 CRE FRE RRE QCK FCK RCK FZE RZE OCA RCA
r rw rw rw w rw rw rw rw rw rw
GPTA0_DCMTIMk (k = 0-3)
GPTA0 Duty Cycle Measurement Timer Register k
(080H+k*10H+4H) Reset Value: 0000 0000H
GPTA1_DCMTIMk (k = 0-3)
GPTA1 Duty Cycle Measurement Timer Register k
(080H+k*10H+4H) Reset Value: 0000 0000H
31 24 23 0
0 TIM
r rwh
GPTA0_DCMCAVk (k = 0-3)
GPTA0 Duty Cycle Measurement Capture Register k
(088H+k*10H) Reset Value: 0000 0000H
GPTA1_DCMCAVk (k = 0-3)
GPTA1 Duty Cycle Measurement Capture Register k
(088H+k*10H) Reset Value: 0000 0000H
31 24 23 0
0 CAV
r rwh
GPTA0_DCMCOVk (k = 0-3)
GPTA0 Duty Cycle Measurement Capture/Compare Register k
(08CH+k*10H) Reset Value: 0000 0000H
GPTA1_DCMCOVk (k = 0-3)
GPTA1 Duty Cycle Measurement Capture/Compare Register k
(08CH+k*10H) Reset Value: 0000 0000H
31 24 23 0
0 COV
r rwh
GPTA0_PLLCTR
GPTA0 Phase Locked Loop Control Register
(0C0H) Reset Value: 0000 0000H
GPTA1_PLLCTR
GPTA1 Phase Locked Loop Control Register
(0C0H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
r rw rwh rw rw
GPTA0_PLLMTI
GPTA0 Phase Locked Loop Microtick Register
(0C4H) Reset Value: 0000 0000H
GPTA1_PLLMTI
GPTA1 Phase Locked Loop Microtick Register
(0C4H) Reset Value: 0000 0000H
31 16 15 0
0 MTI
r rw
GPTA0_PLLSTP
GPTA0 Phase Locked Loop Step Register
(0CCH) Reset Value: 0000 0000H
GPTA1_PLLSTP
GPTA1 Phase Locked Loop Step Register
(0CCH) Reset Value: 0000 0000H
31 16 15 0
0 STP
r rw
GPTA0_PLLCNT
GPTA0 Phase Locked Loop Counter Register
(0C8H) Reset Value: 0000 0000H
GPTA1_PLLCNT
GPTA1 Phase Locked Loop Counter Register
(0C8H) Reset Value: 0000 0000H
31 16 15 0
0 CNT
r rwh
GPTA0_PLLREV
GPTA0 Phase Locked Loop Reload Register
(0D0H) Reset Value: 0000 0000H
GPTA1_PLLREV
GPTA1 Phase Locked Loop Reload Register
(0D0H) Reset Value: 0000 0000H
31 24 23 0
0 REV
r rw
GPTA0_PLLDTR
GPTA0 Phase Locked Loop Delta Register
(0D4H) Reset Value: 0000 0000H
GPTA1_PLLDTR
GPTA1 Phase Locked Loop Delta Register
(0D4H) Reset Value: 0000 0000H
31 25 24 0
0 DTR
r rwh
GPTA0_GTCTRk (k = 0-1)
GPTA0 Global Timer Control Register k
(0E0H+k*10H) Reset Value: 0000 0000H
GPTA1_GTCTRk (k = 0-1)
GPTA1 Global Timer Control Register k
(0E0H+k*10H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
r rw rw rw
GPTA0_GTTIMk (k = 0-1)
GPTA0 Global Timer Register k (0E8H+k*10H) Reset Value: 0000 0000H
GPTA1_GTTIMk (k = 0-1)
GPTA1 Global Timer Register k (0E8H+k*10H) Reset Value: 0000 0000H
31 24 23 0
0 TIM
r rwh
GPTA0_GTREVk (k = 0-1)
GPTA0 Global Timer Reload Value Register k
(0E4H+k*10H) Reset Value: 0000 0000H
GPTA1_GTREVk (k = 0-1)
GPTA1 Global Timer Reload Value Register k
(0E4H+k*10H) Reset Value: 0000 0000H
31 24 23 0
0 REV
r rwh
GPTA0_CKBCTR
GPTA0 Clock Bus Control Register (0D8H) Reset Value: 0000 FFFFH
GPTA1_CKBCTR
GPTA1 Clock Bus Control Register (0D8H) Reset Value: 0000 FFFFH
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0 DFALTC DFA03
r rw rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw rw rw rw
GPTA0_GTCCTRk (k = 00-31)
GPTA0 Global Timer Cell Control Register k [Capture Mode]
(100H+k*8H) Reset Value: 0000 0000H
GPTA1_GTCCTRk (k = 00-31)
GPTA1 Global Timer Cell Control Register k [Capture Mode]
(100H+k*8H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
OUT OIA OCM CEN 0 EOA BYP NE FED RED REN OSM MOD
rh rw rw rh r rwh rw rw rw rw rw rw rw
GPTA0_GTCCTRk (k = 00-31)
GPTA0 Global Timer Cell Control Register k [Compare Mode]
(100H+k*8H) Reset Value: 0000 0000H
GPTA1_GTCCTRk (k = 00-31)
GPTA1 Global Timer Cell Control Register k [Compare Mode]
(100H+k*8H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
OUT OIA OCM CEN 0 EOA BYP CAT CAC GES REN OSM MOD
rh rw rw rh r rwh rw rw rw rw rw rw rw
GPTA0_GTCXRk (k = 00-31)
GPTA0 Global Timer Cell X Register k
(104H+k*8H) Reset Value: 0000 0000H
GPTA1_GTCXRk (k = 00-31)
GPTA1 Global Timer Cell X Register k
(104H+k*8H) Reset Value: 0000 0000H
31 24 23 0
0 X
r rwh
Note: GTCXRk is write-protected when control bits CAC and OSM are set to 1 (“capture
after compare” in Single Shot Mode). Write protection is activated, when the value
of the selected GT timer matches and/or exceeds the capture/compare register
contents. Write protection is released after a software access to register GTCXRk.
LTCCTRk (k = 00-62)
Local Timer Cell Control Register k [Timer Mode]
(200H+k*8H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FED RED
CUD
OUT OIA OCM CEN CUD ILM SLO or or REN OSM MOD
CLR
AIL PEN
rh rw rw rh rwh rw w rwh rw rw rw rw rw
LTCCTRk (k = 00-62)
Local Timer Cell Control Register k [Capture Mode]
(200H+k*8H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
OUT OIA OCM CEN SLL ILM EOA BYP FED RED REN OSM MOD
rh rw rw rh rh rw rwh rw rw rw rw rw rw
LTCCTRk (k = 00-62)
Local Timer Cell Control Register k [Compare Mode]
(200H+k*8H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
OUT OIA OCM CEN SLL ILM EOA BYP SOH SOL REN OSM MOD
rh rw rw rh rh rw rwh rw rw rw rw rw rw
LTCCTR63
Local Timer Cell Control Register 63 (3F8H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rh r rh r rw r rw rw rw rw rw
LTCXRk (k = 00-62)
Local Timer Cell X Register k (204H+k*8H) Reset Value: 0000 0000H
31 16 15 0
0 X
r rwh
LTCXR63
Local Timer Cell X Register 63 (3FCH) Reset Value: 0000 0000H
31 16 15 0
XS X
rw rwh
MRACTL
Multiplexer Register Array Control Register
(038H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FIFO
WCR MA
0 FIFOFILLCNT 0 FUL
ES EN
L
r r r r w rw
The Multiplexer Register Array Data In MRADIN register is used to write data to the
Multiplexer Register Array FIFO. The Multiplexer Register Array Data Out MRADOUT
register is used to read data from the Multiplexer Register Array FIFO.
Note: For correct operation, the MRADIN and MRADIN registers must be always read
or written 32-bit wide. 8-bit and 16-bit accesses are ignored but without any bus
error!
MRADIN
Multiplexer Register Array Data In Register
(03CH) Reset Value: 0000 0000H
31 0
DATAIN
MRADOUT
Multiplexer Register Array Data Out Register
(040H) Reset Value: 0000 0000H
31 0
DATAOUT
rh
OMCRLg (g = 0-13)
Output Multiplexer Control Register for Lower Half of Group g
Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
r rw r rw r rw r rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
r rw r rw r rw r rw
OMCRHg (g = 0-13)
Output Multiplexer Control Register for Upper Half of Output Group g
Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
r rw r rw r rw r rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
r rw r rw r rw r rw
GIMCRLg (g = 0-3)
Input Multiplexer Control Register for Lower Half of GTC Group g
Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
GIM GIM
GIMG3 0 GIML3 GIMG2 0 GIML2
EN3 EN2
r rw r rw r rw r rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GIM GIM
GIMG1 0 GIML1 GIMG0 0 GIML0
EN1 EN0
rw rw r rw rw rw r rw
GIMCRHg (g = 0-3)
Input Multiplexer Control Register for Upper Half of GTC Group g
Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
GIM GIM
GIMG7 0 GIML7 GIMG6 0 GIML6
EN7 EN6
r rw r rw r rw r rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GIM GIM
GIMG5 0 GIML5 GIMG4 0 GIML4
EN5 EN4
r rw r rw r rw r rw
LIMCRLg (g = 0-7)
Input Multiplexer Control Register for Lower Half of LTC Group g
Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
LIM LIM
LIMG3 0 LIML3 LIMG2 0 LIML2
EN3 EN2
r rw r rw r rw r rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LIM LIM
LIMG1 0 LIML1 LIMG0 0 LIML0
EN1 EN0
r rw r rw r rw r rw
LIMCRHg (g = 0-7)
Input Multiplexer Control Register for Upper Half of LTC Group g
Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
LIM LIM
LIMG7 0 LIML7 LIMG6 0 LIML6
EN7 EN6
r rw r rw r rw r rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LIM LIM
LIMG5 0 LIML5 LIMG4 0 LIML4
EN5 EN4
r rw r rw r rw r rw
GPTA0_SRSC0
GPTA0 Service Request State Clear Register 0
(010H) Reset Value: 0000 0000H
GPTA1_SRSC0
GPTA1 Service Request State Clear Register 0
(010H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GT GT DCM DCM DCM DCM DCM DCM DCM DCM DCM DCM DCM DCM
0 PLL
01 00 03C 03F 03R 02C 02F 02R 01C 01F 01R 00C 00F 00R
r rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh
GPTA0_SRSS0
GPTA0 Service Request State Set Register 0
(014H) Reset Value: 0000 0000H
GPTA1_SRSS0
GPTA1 Service Request State Set Register 0
(014H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GT GT DCM DCM DCM DCM DCM DCM DCM DCM DCM DCM DCM DCM
0 PLL
01 00 03C 03F 03R 02C 02F 02R 01C 01F 01R 00C 00F 00R
r rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh
GPTA0_SRSC1
GPTA0 Service Request State Clear Register 1
(018H) Reset Value: 0000 0000H
GPTA1_SRSC1
GPTA1 Service Request State Clear Register 1
(018H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
GTC GTC GTC GTC GTC GTC GTC GTC GTC GTC GTC GTC GTC GTC GTC GTC
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GTC GTC GTC GTC GTC GTC GTC GTC GTC GTC GTC GTC GTC GTC GTC GTC
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh
GPTA0_SRSS1
GPTA0 Service Request State Set Register 1
(01CH) Reset Value: 0000 0000H
GPTA1_SRSS1
GPTA1 Service Request State Set Register 1
(01CH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
GTC GTC GTC GTC GTC GTC GTC GTC GTC GTC GTC GTC GTC GTC GTC GTC
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GTC GTC GTC GTC GTC GTC GTC GTC GTC GTC GTC GTC GTC GTC GTC GTC
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh
SRSC2
Service Request State Clear Register 2
(020H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh
SRSS2
Service Request State Set Register 2
(024H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh
SRSC3
Service Request State Clear Register 3
(028H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC
63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48
rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC
47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32
rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh
SRSS3
Service Request State Set Register 3
(02CH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC
63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48
rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC LTC
47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32
rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh
GPTA0_SRNR
GPTA0 Service Request Node Redirection Register
(030H) Reset Value: 0000 0000H
GPTA1_SRNR
GPTA1 Service Request Node Redirection Register
(030H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GTC GTC GTC GTC GTC GTC GTC GTC GTC GTC GTC GTC GTC GTC GTC GTC
31R 29R 27R 25R 23R 21R 19R 17R 15R 13R 11R 09R 07R 05R 03R 01R
rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw
fLTCA2
Clock LTCA2 Module Kernel
fCLC
Control
Signal Generation Unit
IN[39:00]
SR[15:00]
Interrupt
Interrupt Sharing Unit
Control
MCB05983
I/O Groups
IOG0
40
LTC Groups IOG1
IN
LTCG0 [39:00] IOG2
40
40
LTCG1 IOG3
OUT
8 LTCG2 [39:00] IOG4
CLK[7:0]
LTC 64 64
LTCG3 Output
Input Output Groups
4 Multiplexer
Multiplexer
PDL[3:0] LTCG4 OG0
LTCG5 OG1
4
INT[3:0] LTCG6 56 OG2
LTCG7 OUT OG3
[111:56]
OG4
LTCA2 Module Kernel
OG5
OG6
MCA05984
Example for an
PDL/INT Clock Output Group:
Group Group OG2
MCA05985
IOG0 IOG1 IOG2 IOG3 IOG4 OG0 OG1 OG2 OG3 OG4 OG5 OG6
8 8 8 8 8 8 8 8 8 8 8 8
8
LTC Groups
MCA05986
OUT0
OUT1
OUT2
OUT3
OUT4
OUT5
OUT6
OUT7
closed per column
IN0
IN1
IN2
Outputs of a IN3 To other
LTC Group IN4 OMGs
IN5
IN6
IN7
The output multiplexer logic as seen for programming is shown in Figure 24-79. With
this logic, three GTC or LTC group signals are always combined to one output line that
leads to the input of an I/O or output group. For example, when looking at Figure 24-77,
each of the eight output multiplexer output lines to I/O group IOG4 is connected via two
OMGn4 (n = 1, 2) with the eight outputs of two LTC groups (LTCG0 and LTCG4).
MRACTL
OMCRLg
OMLn MAEN
OMCRHg
(g = 0-13)
3
OMGn
8
MUX
GTC Group
(OMG1g)
3 0 0
To Input of
MUX
XX1 I/O Group g or
8 Output Group (g-7)
MUX
MUX
1. Level 2. Level
Mux Mux MCA05988
LTC Groups
8 8 8 8 8 8 8 8
8 LIMG LIMG
IOG2
02 06
8 LIMG LIMG
IOG3
03 07
8 LIMG LIMG
IOG4
10 14
MCA05989
The LTC input multiplexer contains LTC input Multiplexer Groups (LIMGs) that connect
the I/O groups or the clock, PDL, or INT inputs to the input lines of the LTCs, organized
in eight LTC groups with 8 cells each. IOGs are grouped into five IOGs (IOG[4:0]) with
eight lines each. Two special groups are available, a clock group with eight lines
representing the clock bus inputs CLK[7:0] and a PDL/INT group with eight outputs that
combines the four PDL inputs and the four inputs INT[3:0] as a group of LIMGs inputs.
Figure 24-81 shows the logical structure of a LIMG.
IN0
IN1
Outputs of an IN2
I/O Group or IN3 To other
CLK Group or IN4 LIMGs
PDL/INT Group IN5
IN6
IN7
• An LTC input can be connected either to an I/O group output, or to a clock bus output,
or to an PDL/INT output. This is guaranteed by the LIMG control register layout.
Otherwise, short circuits and unpredictable behavior would occur. In contrast, it is
permitted that an I/O group output, or to a clock bus output, or a PDL/INT output is
connected to more than one LTC input.
The LTC input multiplexer group configuration is based on the following principles:
• Each LIMG is referenced with two index variables: n and g (LIMGng)
• Index n is a group number. I/O groups IOG[3:0] have group number 0, I/O group
IOG4 has group number 1, clock bus lines CLK[7:0] have group number 3, and the
PDL/INT group has group number 4.
• Index g indicates the number of the LTC group g (g = 0-7) to which the outputs of the
input multiplexer group LIMGng are connected.
The LTC input multiplexer logic as seen for programming is shown in Figure 24-82. With
this logic, four group signals (from I/O groups, clock group, or PDL/INT group) are always
combined to one output line that leads to an LTC input of LTC group g. For example,
when looking at Figure 24-80, each of the eight LTC input multiplexer output lines to
LTC group LTCG2 is connected via three LIMGn2 (n = 1, 3, 4) to the eight outputs of I/O
group IOG2, the clock group, and the PDL/INT group.
MRACTL
Registers LIMCRLg
LIMLn LIMCRHg MAEN
(g = 0-7)
3
&
8 LIMGn LIMENn
MUX
I/O Group
(LIMG0g)
3 Not a reserved
LIMGn bit combination
8
MUX
I/O Group
(LIMG1g) 0 0
MUX
000 To Input n of
001 LTC Group g
MUX
8
MUX
FPC/INT 2. Level
8
MUX
Group Mux
(LIMG4g)
1. Level
Mux MCA05991
The 1. level multiplexer is built up by four 8:1 multiplexers that are controlled in parallel
by bit field LIMLn. Bit field LIMGn controls the 2. level multiplexer and connects one of
the 1. level multiplexer outputs to one of the LIMGng outputs. The output of the 2. level
multiplexer is connected only to the input of an LTC if bit LIMENn is set (enable
multiplexer connection), and bit MRACTL.AEN is set (multiplexer array enabled), and no
reserved bit combination of LIMGn is selected. If one of these conditions is not true, the
corresponding LTC input will be held at a low level.
Two LTC Input Multiplexer Control Registers, LIMCRL and LIMCRH (see also
Page 24-243), are assigned to each of the LTC groups. Therefore, in total sixteen
registers control the connections within the LTC input multiplexer of the LTCA2 module.
The LIMCRL registers control the LIMG output lines 0 to 3 and the GIMCRH registers
control the LIMG output lines 4 to 7. Table 24-20 lists all LTC Input Multiplexer Control
Registers with its control functions. Please note that all LTC Input Multiplexer Control
Registers are not directly accessible but must be written or read using a FIFO array
structure as described on Page 24-229.
If the OMCRLg register bit field OMGn of the multiplexer array is programmed with an
invalid (reserved) value, the related outputs will be forced to 0. When the array is
disabled (MRACTL.MAEN = 0), all cell inputs and outputs are disconnected from the
GPIO lines and are driven with 0.
31 0
MRADOUT
Multiplexer
Register 40 OMCRH13
Array 39 OMCRL13
FIFO
Output
27 OMCRL7 Multiplexer
26 OMCRH4 Control
Registers
18 OMCRH0
17 OMCRL0
16 LIMCRH7
15 LIMCRL7 LTC Input
Multiplexer
Control
2 LIMCRH0 Registers
1 LIMCRL0
31 0 31 0
MRACTL MRADIN
MCA05992
To reduce hardware and software overhead, four request sources are combined
together in service request groups. A service request group y (y = 00-15) has four
service request inputs and one service request output SRy which is typically connected
outside the LTCA2 kernel to a standard interrupt node y and controlled by its SRCy
register.
Service Request
Group y
At maximum ≥1
Service
four Request
SRy Request
Sources
Node y
from LTCs
(SRCy Register)
MCA05993
ID SRSSn 2) OMRCHg 3)
1) k = 00-63 MRACTL LIMCRLg 4)
2) n = 2-3
3) g = 0-4, 7-13 MRADIN LIMCRHg 4)
4) g = 0-7 MRADOUT
Note: The Multiplexer Array FIFO registers are not directly accessible !
MCA05994_mod
LTCA2_ID
LTCA2 Module Identification Register
(008H) Reset Value: 002A C0XXH
31 16 15 8 7 0
r r r
MRACTL
Multiplexer Register Array Control Register
(038H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FIFO
WCR MA
0 FIFOFILLCNT 0 FUL
ES EN
L
r r r r w rw
The Multiplexer Register Array Data In register is used to write data to the Multiplexer
Register Array FIFO. The Multiplexer Register Array Data Out register is used to read
data from the Multiplexer Register Array FIFO.
MRADIN
Multiplexer Register Array Data In Register
(03CH) Reset Value: 0000 0000H
31 0
DATAIN
MRADOUT
Multiplexer Register Array Data Out Register
(040H) Reset Value: 0000 0000H
31 0
DATAOUT
rh
Note: For correct operation, the MRADIN and MRADIN registers must be always read
or written 32-bit wide. 8-bit and 16-bit accesses are ignored without any bus error!
Note: These registers are not directly accessible and can be written and read only via
the multiplexer register array FIFO.
r rw r rw r rw r rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
r rw r rw r rw r rw
OMCRHg (g = 0-13)
Output Multiplexer Control Register for Upper Half of Pin Group g
Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
r rw r rw r rw r rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
r rw r rw r rw r rw
Note: In the LTCA2 module, registers OMCRL5, OMCRH5, OMCRL6, and OMCRH6
are not available (see also Figure 24-83).
Two registers, LIMCRL and LIMCRH, are assigned to each LTC group. LIMCRL controls
the connections of LTC group cells with index 0 to 3. LIMCRH controls the connections
of LTC group cells with index 4 to 7.
LIMCRLg (g = 0-7)
Input Multiplexer Control Register for Lower Half of LTC Group g
Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
LIM LIM
LIMG3 0 LIML3 LIMG2 0 LIML2
EN3 EN2
r rw r rw r rw r rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LIM LIM
LIMG1 0 LIML1 LIMG0 0 LIML0
EN1 EN0
r rw r rw r rw r rw
LIMCRHg (g = 0-7)
Input Multiplexer Control Register for Upper Half of LTC Group g
Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
LIM LIM
LIMG7 0 LIML7 LIMG6 0 LIML6
EN7 EN6
r rw r rw r rw r rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LIM LIM
LIMG5 0 LIML5 LIMG4 0 LIML4
EN5 EN4
r rw r rw r rw r rw
IN[55:0] 8
FADC
SR
Interrupt [37:00] OUT[55:0]
GPTA1
Control 16
56
MSC MSC0
16
OUT Mux
[111:56] 56 Control
Output 16
56 Groups
8 OG[6:0]
SR CLK[7:0] MSC1
8
[15:00]
INT[3:0]
IN[39:0]
Address ADC0
SCU
Decoder 9
OUT[39:0] (Ext.
LTCA2 Request
Unit)
OUT ADC1
[111:56]
INT[3:1] 3
DMA
MCB05995
P2_PDR
1) k = 8, 12
P3_PDR 2) k = 0, 4, 8, 12
P4_PDR 3) k = 0, 4
4) k = 00-37
P8_PDR 5) k = 00-15
P9_PDR
P2_ESR
P3_ESR
P4_ESR
P8_ESR
P9_ESR
MCA05996
Port Control
OUT[55:0] (from GPTA0) [7:0]
OUT[55:0] (from GPTA1) [7:0] 8
OUT[39:0] (from LTCA2) [7:0] IOG0 P2.[15:8]
[7:0]
[8:15]
[8:15] 8
[8:15] IOG1 P3.[7:0]
[8:15]
[23:16]
[23:16] 8
[23:16] IOG2 P3.[15:8]
[23:16]
[31:24]
[31:24] 8
[31:24] IOG3 P4.[7:0]
[31:24]
[39:32]
[39:32] 8
[39:32] IOG4 P4.[15:8]
[39:32]
[47:40]
[47:40] 8
IOG5 P8.[7:0]
[47:40]
[56:48]
[56:48] 8
IOG6 P9.[7:0]
IN[55:0] [56:48]
MCA05997
The interconnections between the GPTA0/GPTA1/LTCA2 modules and the port I/O lines
are controlled in the port logics. The following port control operations selections must be
executed:
• Input/output function selection (IOCR registers)
• Pad driver characteristics selection for outputs (PDR registers)
Bit field PCx (x is the number of a port line) in the input/output control register IOCRy (y
is the number of the first port line controlled by an IOCR) must be programmed according
Table 24-25.
A port line that is programmed as input can be used by the GPTA0, GPTA1, or LTCA2
module simultaneously as input.
Port lines selected as GPTA0, GPTA1, or LTCA2 output are forced to a 0 level if the
related multiplexer array in the I/O Line Sharing Unit is disabled or if a reserved
combination of an OMGn value is selected. Therefore, no glitches and spikes can occur
during the programming of the related multiplexer array.
Table 24-27 Pad Driver Mode Mode Selection (Class A1/A2 Pads)
Pad Class PDx Bit Field Driver Strength Signal Transitions
A1 XX0B Medium driver –
XX1B Weak driver –
Table 24-27 Pad Driver Mode Mode Selection (Class A1/A2 Pads) (cont’d)
Pad Class PDx Bit Field Driver Strength Signal Transitions
A2 000B Strong driver Sharp edge1)
001B Medium edge1)
010B Soft edge1)
011B Weak driver –
100B Medium driver Sharp edge
101B Medium edge
110B Soft edge
111B Weak driver –
1) In strong driver mode, the output driver characteristics of class A2 pads can be additionally controlled by the
temperature compensation logic.
GPTA0 GTs
GTCs
Clock 8
PLL Distribution LTCs
Unit Clock
Bus
GPTA1 GTs
GTCs
Clock 8
PLL Distribution LTCs
Unit
Clock
Bus
LTCA2
LTCs
MCA05998
OUT[63:56]
OG0 of GPTA0
ALTINL[7:0]
MUX
OUT[63:56]
OG0 of GPTA1
OUT[63:56]
OG0 of LTCA2
OUT[71:64] MMXCTR00
OG1 of GPTA0
ALTINL[15:8]
MUX
OUT[71:64]
OG1 of GPTA1
OUT[71:64]
OG1 of LTCA2
OUT[79:72]
MSC0
OG2 of GPTA0
ALTINH[7:0]
MUX
OUT[79:72]
OG2 of GPTA1
OUT[79:72]
OG2 of LTCA2
OUT[87:80] MMXCTR01
OG3 of GPTA0
ALTINH[15:8]
MUX
OUT[87:80]
OG3 of GPTA1
OUT[87:80]
OG3 of LTCA2
OUT[95:88]
OG4 of GPTA0
OUT[95:88] ALTINL[7:0]
MUX
OG4 of GPTA1
OUT[95:88]
OG4 of LTCA2
OUT[103:96] MMXCTR10
OG5 of GPTA0
ALTINL[15:8]
MUX
OUT[103:96]
OG5 of GPTA1 MSC1
OUT[103:96]
OG5 of LTCA2
OUT[111:104] MMXCTR11
OG6 of GPTA0
OUT[111:104] ALTINH[7:0]
MUX
OG6 of GPTA1
OUT[111:104]
OG6 of LTCA2 MCA05999
The multiplexer selection is controlled by four multiplexer control registers that are
logically assigned to the GPTA0 module address range (but described in this section).
Note that eight ALTINH inputs (ALTINH[15:8]) of the MSC1 module are not connected.
Table 24-29 shows the GPTA-to-MSC interconnection assignment.
Note: Table 24-29 also shows the assignment of the GTPA module’s seven OGx output
group lines OGx.y to the output signals OUT[111:56].
GPTA0_MMXCTR00
GPTA-to-MSC Multiplexer Control Register 00
(700H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
MUX MUX MUX MUX MUX MUX MUX MUX MUX MUX MUX MUX MUX MUX MUX MUX
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw
GPTA0_MMXCTR01
GPTA-to-MSC Multiplexer Control Register 01
(704H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
MUX MUX MUX MUX MUX MUX MUX MUX MUX MUX MUX MUX MUX MUX MUX MUX
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw
GPTA0_MMXCTR10
GPTA-to-MSC Multiplexer Control Register 10
(708H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
MUX MUX MUX MUX MUX MUX MUX MUX MUX MUX MUX MUX MUX MUX MUX MUX
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw
GPTA0_MMXCTR11
GPTA-to-MSC Multiplexer Control Register 11
(70CH) Reset Value: 0000 0000H
31 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
MUX MUX MUX MUX MUX MUX MUX MUX
0
7 6 5 4 3 2 1 0
r rw rw rw rw rw rw rw rw
OUT1 GS4
P2.9 / IN1
OUT9 GS5 M
P5.0 / RXD0A
OUT18 GS6 U
X P6.8 / RXD0B
OUT26 GS7
FADC P6.10 / RXD1B
OUT2 TS4
OUT10 TS5
OUT19 TS6
OUT27 TS7 GIN1S
SCU_CON
OUT0 IN02
OUT8 IN12
OUT16 IN22
IN1
GPTA0 OUT17 IN23
OUT24 IN32 ADC0
OUT25 IN33
OUT5 External
Request
OUT3 ROUT0 Unit
OUT11 ROUT1
OUT28 ROUT2 in
SCU
INT0 IOUT0
INT1 IOUT1 ADC1
INT2 IOUT2
INT3 IOUT3
INT0
IN1 INT1
GPTA1 Interrupt Node
INT2
Interrupt Node
INT3
INT0
IN1 INT1
LTCA2 INT2 DMA
INT3
ECTT3
Clock SR15 MultiCAN
Generation MCA06000_mod
MultiCAN Connections
The MultiCAN controller has two connections to the GPTA modules:
• MultiCAN service request output SR15 is connected to the INT0 input of GPTA0,
GPTA1, and LTCA2.
• GPTA0 output line OUT5 is connected to the external time trigger input ECTT3 of the
MultiCAN module.
DMA Controller
The external request unit generates four DMA request output signals (IOUT[3:0]) that
can be activated via port pins, the MSC clock outputs, or the six GPTA output lines.
Three of these four DMA request output signals are connected to the
GPTA0/GPTA1/LTCA2 internal inputs INT[3:1]. These connections allow, for example,
GTC or LTC events in the GPTA modules to be triggered by a request coming from a
port pin or from the MSC clock.
FADC Connections
As shown in Figure 24-91, eight GPTA0 output lines are connected as trigger input
signals or gating input signals to the channel trigger logic of the FADC. Thus dedicated
GPTA0 outputs can generate trigger events or act as gating signals for FADC channels.
ECEN
Debug Clock
Control Register
GPTA0_DBGCTR
fCLC
fGPTA0
(used for control
tasks and register GPTA0 GT00RUN
accesses) Kernel GT01RUN
INT0
SR15
fGPTA1
MultiCAN GT10RUN
GPTA1
Module
Kernel GT11RUN
INT0
LTCA2 fLTCA2
Kernel
INT0
MCA06001
1
f GPTA = f SYS × --- with n = 1024 - FDR.STEP or (24.6)
n
n
f GPTA = f SYS × ------------- with n = 0-1023 (24.7)
1024
Note: The upper formula applies to normal divider mode of the fractional divider
(GPTA0_FDR.DM = 01B). The lower formula applies to fractional divider mode
(GPTA0_FDR.DM = 10B).
The debug clock control register additionally makes it possible to control the timer clocks
fGPTA0, fGPTA1, and fLTCA2 for debug purposes on basis of a clock counter.
If the debug clock feature is enabled (GPTA0_DBGCTR.DBGCEN = 1) and bit
GPTA0_DBGCTR.DBGCST is set, the timer clocks fGPTA0, fGPTA1, and fLTCA2 will be
activated in parallel for as many clock cycles as have been programmed into bit field
GPTA0_DBGCTR.CLKCNT. When the debug clock feature becomes enabled, bit field
CLKCNT counts down and stops counting at 0000H. Bit DBGCST is again cleared by
hardware after the programmed number of clock pulses has been issued. This feature
makes it possible to single step the GPTA modules with a programmable timer clock
granularity.
Attention: If the frequencies of the module timer clocks fGPTA0, fGPTA1, or fLTCA2 are
configured to be smaller than the control clock fCLC (as programmed in
register GPTA0_FDR) or even disabled (as programmed in register
GPTA0_EDCTR), an action initiated by a write access to a module
register could be significantly delayed, because the register write
access is clocked by fCLC and the register content is evaluated by
hardware using the slower or disabled module timer clocks fGPTA0,
fGPTA1, or fLTCA2.
GPTA0_CLC
GPTA Clock Control Register (000H) Reset Value: 0000 0003H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FS SB E SP DIS DIS
0
OE WE DIS EN S R
r rw w rw rw r rw
Note: After a hardware reset operation, the fCLC clock is disabled (DISS set). Therefore,
the GPTA modules clock generation is completely disabled.
Note: Additional details on the clock control register functionality are described in section
“Clock Control Register CLC” on Page 3-24 of the TC1796 User’s Manual
System Units part (Volume 1).
The fractional divider register controls the clock frequency of the module timer clock
fGPTA. The clock frequency of fGPTA0, fGPTA1, and fLTCA2 is identical to the one of fGPTA.
GPTA0_FDR
GPTA Fractional Divider Register (00CH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
DIS EN SUS SUS
0 RESULT
CLK HW REQ ACK
rwh rw rh rh r rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DM SC SM 0 STEP
rw rw rw r rw
Note: Further details on the fractional divider register functionality are described in
section “Fractional Divider Operation” on Page 3-29 of the TC1796 User’s
Manual System Units part (Volume 1).
The clock enable/disable control register controls two functions: clock enable/disable
control for each Global Timer in the GPTA0/GPTA1 modules and enable/disable control
for the module timer clocks, separately for each clock fGPTA0, fGPTA1, and fLTCA2.
GPTA0_EDCTR
GPTA Clock Enable/Disable Control Register
(400H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GT GT GT GT
L2 G1 G0
0 0 11 10 01 00
EN EN EN
RUN RUN RUN RUN
r rw rw rw r rw rw rw rw
The debug clock control register makes it possible to control the module timer clocks
fGPTA0, fGPTA1, and fLTCA2 for debug purposes on the basis of a clock counter.
GPTA0_DBGCTR
GPTA Debug Clock Control Register (004H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
DBG
0
CEN
rw r
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CLKCNT
rwh
Each of the service request outputs of the GPTA0, GPTA1 and LTCA2 module kernels
is able to generate an interrupt and is controlled by an interrupt service request control
register GPTA_SRCk. Therefore, the following interrupt service request control registers
are available:
• GPTA0: GPTA0_SRC[37:00]
• GPTA1: GPTA1_SRC[37:00]
• LTCA2: LTCA2_SRC[15:00]
GPTA0_SRCk (k = 00-37)
GPTA0 Interrupt Service Request Control Register k
(7FCH-k*4H) Reset Value: 0000 0000H
GPTA1_SRCk (k = 00-37)
GPTA1 Interrupt Service Request Control Register k
(7FCH-k*4H) Reset Value: 0000 0000H
LTCA2_SRCk (k = 00-15)
LTCA2 Interrupt Service Request Control Register k
(7FCH-k*4H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SET CLR
SRR SRE 0 TOS 0 SRPN
R R
w w rh rw r rw r rw
Note: Additional details on service request nodes and the service request control
registers are described on Page 14-3 of the TC1796 User’s Manual System Units
part (Volume 1).
+7FFH
Interrupt Service Request
k = 00-37 SRCk
Control Registers
+7BAH
Reserved GPTA_MMXCTR11
GPTA-to-MSC GPTA_MMXCTR10
1)
+700H Multiplexer Control GPTA_MMXCTR01
GPTA_MMXCTR00
Reserved
+404H
+400H General Module Control 1) EDCTR
LTCXRk
Local Timer Cells k = 00-63
LTCCTRk
+200H
GTCXRk CKBCTR
Global Timer Cells k = 00-31
GTCCTRk
PLLDTR
+100H
GTTIMk PLLREV
GTREVk PLLSTP
k = 0, 1
Global Timer GTCTRk PLLCNT
+0E0H
PLLMTI
CDU Register
PLLCTR
PLL Registers
DCM Registers DCMCOVk
Clock Generation Unit k = 0-3
PDL Register DCMCAVk
FPC Registers DCMTIMk
+044H
DCMCTRk
MRADOUT
Input/Output Line
+038H Sharing Unit MRADIN PDLCTR
k=
MRACTL
0-
FPCTIMk
5
SRNRn FPCCTRk
Interrupt Control
n = 0-3 SRSSn FPCSTAT
+010H
SRSCn
General Module Control 1)
000H
FDR
DBGCTR
CLC
1) These registers are not available in GPTA1. MCA06002
+7FFH
Interrupt Service Request k = 00-15 SRCk
Control Registers
+7C0H
Reserved
+3FFH
LTCXRk
Local Timer Cells k = 00-63
LTCCTRk
+200H
Reserved
+044H
MRADOUT
Input/Output Line
MRADIN
+038H Sharing Unit
MRACTL
Features
• 8-bit, 10-bit, 12-bit A/D conversion
• Conversion time below 2.5 µs @ 10-bit resolution
• Extended channel status information on request source
• Successive approximation conversion method
• Total Unadjusted Error (TUE) of ±2 LSB @ 10-bit resolution
• Integrated sample & hold functionality
• Direct control of up to 16(32) analog input channels per ADC
• Dedicated control and status registers for each analog channel
• Powerful conversion request sources
• Selectable reference voltages for each channel
VDD VDDM
VAGND VSS VSSM VAREF
EMUX0
EMUX0
EMUX1 Port
EMUX1
GRPS Control
GRPS
fADC
Clock
16 Analog Input Channels
Analog Input Multiplexer
Control fCLC
AIN0
Group 0
Address AIN15
Decoder ADC AIN16
Module
Kernel Group 1
AIN31
SR[7:0]
Interrupt
Control ASGT
SW0TR, SW0GT
ETR, EGT External
Request
To DMA QTR, QGT Unit
TTR, TGT
Synchronization Bridge
MCB06004
conditions are controlled by an External Request Unit. This unit generates the control
signals for auto-scan control (ASGT), software trigger control (SW0TR, SW0GT), the
event trigger control (ETR, EGT), queue control (QTR, QGT), and timer trigger control
(TTR, TGT).
Figure 25-2 provides a more detailed block diagram of the ADC kernel with its main
functional units.
GRPS
VAGND
VAREF[0]
VAREF[1]
Request
VAREF[2] MUX Arbiter Generation
VAREF[3] Control
AIN0
Group 0
AIN15
A/D
AIN16 MUX Converter Control Unit
8-, 10-, 12-Bit
Group 1
AIN31
Status Unit
ASGT
SW0TR, SW0GT
ETR, EGT Trigger and Interrupt
QTR, QGT Gating Logic Control
TTR, TGT SR[7:0]
MCA06005
CHCON0
GPRS
AIN0
0 ADC
AIN1 1 Channel 0
CHCON1
Analog Input GPRS
Group 0
AIN14 0 ADC
AIN15 1 Channel 1
AIN16 CHCON14
AIN17 GPRS
0 ADC
Analog Input
Group 1 1 Channel 14
AIN30 CHCON15
AIN31 GPRS
0 ADC
1 Channel 15
MCA06006
channel. If all pending conversion requests are processed, the arbitration participation
flag of this parallel source is cleared.
The bits of the conversion request pending register can be cleared globally under
software control by clearing the arbitration participation flag for this source.
conversion request generated in the meantime via the conversion request register will
be performed after the request in the back-up register has been served.
The request bit in the control register and in the back-up register can be cancelled under
software control. Clearing the arbitration participation bit clears either the request bit in
the request register (if the back-up register contains no request) or the request bit in the
back-up register if (the back-up register contains a valid request).
TCON.TRLD
TCON.ALB
MCB06007
The timer period tTPERIOD can be specified within the range from microseconds up to
milliseconds according to the following equation.
20
t TPERIOD = TRLD × ----------- (25.1)
f ADC
Figure 25-5 shows the control and status of the conversion request source “Timer”.
Write 1 to Write 1 to
SCON.TRS SCON.TRC TCON.TSEN
Timer = 0
Clear Clear
Set
Timer Trigger TCON.TR
Set
Input TTR
&
Timer Gating
Input TGT
MCA06008_mod
If “Timer” is the arbitration winner, a conversion is started for the conversion request
within register TCRP with the highest channel number. Starting a conversion causes the
conversion request bit in register TCRP to be cleared by the arbiter. If a currently running
timer initiated conversion is cancelled, the arbiter sets the corresponding conversion
request bit in registers TCRP for this channel. If all pending conversion requests are
processed, the arbiter clears the arbitration participation flag AP.TP. The contents of
register TCRP can be cleared globally under software control by clearing the timer
arbitration participation flag AP.TP.
The arbitration-lock mechanism provides the means to start timer triggered conversion
requests without being delayed by a currently running conversion. Figure 25-6 shows
this method in detail.
Timer Period
Reload Value
Arbitration Lock
Boundary
tTIMER
fTIMER
Arbitration Execute pending requests Waiting for timer Execute pending req.
In the example of Figure 25-6, the conversion request source “Auto Scan” has triggered
conversion request(s) that are not served according to a currently running conversion
and the locked arbitration. On timer = 0, the conversion requested by the timer is started
(it is assumed that the “Timer” is programmed to a higher priority than the “Auto Scan”).
Arbitration Lock Mode is enabled by setting bit field TCON.ALB to any value greater than
zero.
The value of the arbitration lock boundary is also used to specify the time tLOCK for which
the arbitration is locked. Running in Arbitration Lock Mode, the current value of the timer
register is compared to the arbitration lock boundary. Note that the arbitration will always
be locked if the reload value is selected to be equal to or less than the arbitration lock
boundary. On a compare match, the arbitration logic is locked (STAT.AL = 1), while
timer = 0 removes the arbitration lock. Bit STAT.AL is either cleared if timer = 0 or after
clearing bit TCON.TR.
EXTC
External Trigger
Input ETR
16 16
Bitwise OR
16
≥1
External Gating
Input EGT
&
Clear all
Set on reset by
software
Reset by Software AP.EXP
MCA06010
conversion request within register EXCRP with the highest channel number. Starting a
conversion causes the conversion request bit in register EXCRP to be cleared by the
arbiter. If a currently running “External Event” initiated conversion is cancelled, the
arbiter sets the corresponding conversion request bit in register EXCRP for this channel.
If all pending conversion requests are processed, the arbitration participation flag
AP.EXP is cleared.
The contents of register EXCRP can be reset globally under software control by clearing
the “External Event” arbitration participation flag. Note that conversion requests caused
by external trigger pulses are lost if the flag for this channel is already set in the external
conversion request pending register.
REQ0
16
Write to Register REQ0 ≥1
Trigger Input
SW0TR 16
16
≥1
Gating Input
SW0GT
&
Clear all
Set on reset by
software
Reset by Software AP.SW0P
MCA06011
The SW0TR and SW0GT input connections depend on the product specific
implementation of the ADC module. They are described in Section 25.3.6.2.
SCN
Auto-Scan 16
Control
Unit and
Service
Request 16
Generation
ASCRP Set/Reset by Arbiter
16
≥1
Gating Input
ASGT
&
Clear all
Set on reset by
software
Reset by Software AP.ASP
MCA06012
highest to the lowest channel number. Starting a conversion causes the conversion
request pending flag in register ASCRP to be cleared.
The auto-scan sequence is complete if the channel with the lowest number selected to
be auto-scanned has been converted (all bits in register ASCRP are cleared).
In single conversion sequence mode, the bit field CON.SCNM is automatically
cleared and the conversion request source “Auto-scan” is disabled.
In continuous conversion sequence mode, the conversion request source “Auto-
scan” automatically requests a new auto-scan sequence. Results previously stored in
the specific channel status register(s) will be overwritten. Continuous auto-scan
sequence is performed until auto-scan is stopped under software control.
If a currently running “Auto-scan” initiated conversion is cancelled, the arbiter sets the
corresponding conversion request bit in register ASCRP for this channel.
After the conversion of the last channel within an auto-scan sequence has been finished,
the source service request flag MSS1.MSRAS is set. Auto-scan service requests can be
generated only if the auto-scan service request is enabled by SRNP.ENPAS = 1.
The ASGT input connection depends on the product specific implementation of the ADC
module. It is described on Page 25-114.
The auto-scan control functionality is described in Table 25-3, Table 25-4 and
Table 25-5. This description of the auto-scan includes the actions to be performed on
changes in the auto-scan mode or the channels to be auto-scanned as well as clearing
the auto-scan arbitration participation flag.
Table 25-3 describes the action to be performed on a change of bit field CON.SCNM.
Table 25-4 shows the actions to be taken on a change of the auto-scan conversion
request register SCN.
Table 25-5 shows the actions to be taken on a change of the auto-scan arbitration
participation flag.
CHIN
Reset
by Arbiter CIN CHNR
CIREN GRPS EMUX RES
REQ IN
Back-up Register
Set/Reset
by Arbiter CIN CHNR
CIREN GRPS EMUX RES
REQ IN
≥1
Clear REQ
on reset Set
by software
AP.CHP Reset by Software
MCA06013
multiplexer, and the settings of the ADC’s resolution. If the back-up register contains
valid conversion information, the arbiter reads from the back-up register instead from the
channel injection control register. Thus, the previously cancelled conversion participates
in arbitration once again. A new conversion requested via the conversion request control
register will be performed after the request in the back-up register is served.
The request bit of the channel injection control register and the backup register can be
cleared under software control. Clearing the arbitration participation bit clears either the
request bit in the request register (if the back-up register contains no request) or the
request bit in the back-up register (if the back-up register contains a valid request).
As already mentioned, “Channel Injection” generates sequential conversion requests for
analog channels either with the Inject-Wait or the Cancel-Inject-Repeat functionality.
• Channel Injection with Inject-Wait provides the means to wait until the current
conversion with higher priority is finished before the requested conversion is injected.
• Channel Injection with Cancel-Inject-Repeat “Cancels” a currently performed
conversion, “Injects” the requested conversion, and finally “Repeats” the previously
cancelled conversion. The Cancel-Inject-Repeat feature is enabled if bit
CHIN.CIREN is set. When using this feature, the currently performed conversion is
cancelled if its source arbitration level is lower than the source arbitration level of
channel injection. If a currently performed conversion is cancelled, a new request is
generated for this conversion. Thus, the previously cancelled conversion participates
in the arbitration again.
The following examples provide an overview on the behavior of the conversion request
source “Channel Injection”.
Figure 25-11 shows the functionality of conversion requests generated by “Channel
Injection” with Inject-Wait feature. The conversion requested with a source-arbitration-
level of ‘L3’ waits until the currently performed conversion with a source-arbitration-level
of ‘L1’ is finished. The second channel injection request is delayed until both conversions
requested with a source-arbitration-level of ‘L2’ are finished.
Arbitration
Cycle
Conversion Src 'n' Level L1 CHIN Level L3 Src 'm' Level L2 CHIN L3
Delay Delay
MCT06014
Arbitration
Cycle
Pending CHIN L4
Conversion
Requests CHIN L1 Src. L2 Src. L3 CHIN L4 CHIN L4
Repeat
Conversion Src L2 CHIN Level L1 Src 'm' Level L2 Src 'm' Level L3 CHIN
Delay
Cancel MCT06015
Arbitration
Cycle
Queue Register
QR Queue Load
16
Queue
Service
16 Request
Control
Queue Element 15
Queue Full
STAT.QF
Queue Element 6
Queue Element 5
Queue Enable
CON.QEN
Queue Element 2
Queue Reset
Queue Element 1 SCON.QRS
Queue Element 0
Queue Queue 16
Warning Level
Level Pointer Queue Status Register
Pointer STAT.QLP QUEUE0
CON.QWLP MCB06017
The queue is automatically filled by writing valid data to the queue register QR. Valid data
means that at least the V bit is set, while “zero” is a valid option for the external
multiplexer setting, the resolution control bit field and the channel number. Valid data in
the queue register (QR.V, QR.GRPS, QR.EMUX, QR.RES and QR.CHNR data) is then
copied to the next empty queue element determined by the queue level pointer
STAT.QLP. The queue load operation causes the valid bit in the queue register to be
cleared automatically. Any software access to the queue register is denied during this
copy operation. No queue load is performed if the queue state is full (STAT.QF is set)
and the queue register contains valid data.
As shown in Figure 25-14, queue elements zero to five contain valid data; therefore, the
queue register’s contents are copied to queue element six.
The queue level pointer STAT.QLP indicates the number of valid queue elements. It is
incremented after a queue load operation. It is decremented after a queue based
conversion is started or after the queue participation flag is cleared. STAT.QLP is
cleared after a queue reset operation by setting the queue reset bit. Note that there are
sixteen valid queue elements in the queue if the queue level pointer is 0FH and the queue
full bit is set.
The queue warning limit pointer CON.QWLP can be used to generate service requests,
based on a queue element state change. The value of the queue warning limit pointer
must be programmed with a value “n” in order to focus on a state change from valid to
invalid of queue element “n”. A queue based service request can be triggered in this
case, thus requesting the next transfer of data to the queue. If the queue element
specified by (CON.QWLP)+1 becomes invalid after a conversion, the module service
request flag MSS1.MSRQR is automatically set. The service request destination node
pointer (PQR) must be configured and enabled (ENPQR) in order to trigger a service
request node assigned to the queue.
The conversion request source “Queue” consists of the queue status register QUEUE0,
a backup register, and a queue arbitration participation flag AP.QP, as shown in
Figure 25-15. The contents of queue element number zero are represented in the queue
status register QUEUE0. Therefore, set/clear actions of the valid-bit of the queue status
register QUEUE0 are also performed on queue element zero.
If at least one queue element contains valid data, this (these) valid bit(s) cause(s) the
queue arbitration participation flag to be set. This informs the arbiter to include the
conversion request source “Queue” into arbitration. If “Queue” is the arbitration winner,
a conversion is started for the analog channel specified within the queue status register.
The settings of the external multiplexer and the resolution of the A/D Converter are also
derived from this register.
Starting a queue based conversion causes the valid bit of the queue status register
QUEUE0 to be cleared by the arbiter. The contents of all queue elements containing
valid data slides one step down. For example, queue element one contains valid data,
this data “slides down” to queue element zero. Queue based conversion requests are
generated for the control information of register QUEUE0, if the queue is enabled (bit
CON.QEN = 1), the queue status register contains valid data (QUEUE0.V is set) and the
queue gating line QGT = 1. The arbitration participation flag is automatically cleared if all
queue elements, the queue status register (remember: QUEUE0 represents the
contents of queue element number zero) and the back-up register contain no valid
request.
QUEUE0
Reset
by Arbiter V GRPS EMUX RES CHNR
Back-up Register
Set/Reset
by Arbiter V GRPS EMUX RES CHNR
≥1 QEN
Queue Gating
Input QGT
AP.QP
Reset by Software
MCA06018
performed equal to the slide operation after starting a queue based conversion. The
enable bit CON.QEN can be set by hardware if the queue trigger request line QTR = 1.
The QTR and QGT input connections depend on the product specific implementation of
the ADC module. They are described in Section 25.3.6.2.
Write 1 to Write 1 to
SCON.QENS SCON.QENC
Clear
Set
Queue Trigger CON.QEN
Set
Request
QTR MCA06019_mod
Select
Winning Source
Winning Channel
MCA06020
• Channel arbitration follows after source arbitration. For the winning source, channel
arbitration is performed. Within the second stage of the arbitration algorithm, the
pending conversion request with the highest priority is detected. If a parallel source
is the winning source, the flag representing the highest channel number within the
conversion request pending register is determined. If a sequential source is the
winning source, the channel in the request register or in the back-up register is
determined. Note that a pending request in the back-up register is preferred.
The arbitration result consists of the winning source and channel number. A start of
conversion can occur, if the A/D Converter is idle or if the arbitration winner has
permission to cancel a currently running conversion. After the conversion has started,
the corresponding pending conversion request is automatically reset. Attempt to start a
conversion for this arbitration result will be repeated until either the start is successful
(other conversion is currently running) or a new result (source and channel number with
a higher priority) was arbitrated.
The arbitration participation flag can also be cleared under software control. Writing a 0
to the corresponding flag clears the arbitration participation flag. All bits in the
corresponding conversion request pending register are cleared if a participation flag of
a parallel source is cleared under software control. If a participation flag of a sequential
source is cleared, the following action is performed:
• ONLY the request bit of the back-up register is cleared, if the back-up register
contains valid data. The request bit of the corresponding conversion request
register (CHIN or QUEUE0) is not cleared in this case.
• OR the request bit of the corresponding conversion request register (CHIN or
QUEUE0) is cleared, if the backup register does not contain valid data.
Note: Writing a 1 to a participation bit has no effect.
CON.CTC CHCONn.STC
MCA06021
Note: The TC1796 basic operating clock frequency fBC influences the maximum
allowable internal resistance of the used reference voltage supply.
f ADC
f BC = ---------------------- (25.2)
CTC + 1
The A/D Converter’s basic operating clock frequency fBC must not exceed 40 MHz. It
must also not drop below 2 MHz.
The internal A/D Converter clock frequency fANA is a quarter of the basic operating clock
frequency fBC (min. 0.5 MHz, max. 10 MHz). The internal A/D Converter clock fANA is
related to fADC according to the following equation:
f BC 1 f ADC
f ANA = ----------- = ----- × ---------------------- (25.3)
4 4 CTC + 1
With the clock control bit field CON.CTC, the internal A/D Converter clock fANA can be
adjusted to different module timing clock frequencies fADC in order to optimize the
performance of the TC1796 A/D Converter. Note that CON.CTC may be changed during
a conversion, but will be evaluated after the currently performed conversion is finished.
Table 25-8 shows the selectable values of CON.STC and the resulting ADC basic
operating clock fBC and sample time tS.
Note: The duration of the sample phase influences the maximum allowable internal
resistance of the respective analog input signal source.
The ADC module offers the choice of four selectable reference voltages VAREF[0] to
VAREF[3]. The reference voltage can independently be selected for each analog channel
via the respective bit field CHCONn.REF. VAREF[0] corresponds to the positive reference
voltage VAREF and is used for self calibration of the A/D Converter. Therefore, it must be
stable during all conversions, even for those that use another reference voltage.
The reference voltages must fulfill the following specifications:
VAREF[3:0] ≤ VDDM + 0.05 V; VDDM ≤ 3.3 V (25.6)
A conversion with low reference voltage affects the accuracy of the A/D Converter. The
TUE of an A/D Converter that is operated at a reduced positive reference voltage can be
evaluated according to the following equations:
TUE |A → TUE |B = K × TUE |A, (K ≥ 1) (25.7)
where
• VAREF |A: minimum positive reference voltage range is specified
for 0 V ≤ VAREF ≤ VDDM + 0.05 V
• VAREF |B: positive reference voltage, which is below the specified range
• TUE |A: total unadjusted error for reference voltages within the specified range
• TUE |B: total unadjusted error for reference voltages below the specified range
Note: All unused analog input pins must be connected to a fixed potential either VAGND
or VAREF[0] to avoid disturbance of active analog inputs.
Note: It is not recommended in general to set VAREF below 50% of VDDM.
Note: The analog input voltages VAIN must be in the range between VAGND and the
selected VAREF.
The coupling factor kA determines the physical relation of two adjacent analog inputs.
The resulting error AEL is given by:
R AIN D × I OV D × k A
AEL D±1 = ------------------------------------------------
- (25.10)
V AREF
where
• VAREF: reference voltage for conversion
• RAIN |D: resistance of the analog input channel D
• IOV |D: overload current of the analog input D
• AEL: additional error caused by a leakage current, related to VAREF
• kA: coupling factor for the analog input D
Note: If AEL is calculated in bit units, AEL must be multiplied by 2n-1.
CHCONn
LCC BSELA BSELB
Area I
000H
MCA06023
AIN0
Group 0
AN-0
AN-1
External AIN15
AN-2
MUX Internal
A/D
... Analog
AIN16 Converter
AN-7 MUX
Group 1
Control Registers
CHCONn
AIN31
n GRPS EMUX 3
4
1 GRPS 1
2 EMUX[1:0]
MCA06024
The external multiplexer controls (bit field CHCONn.EMUX) from the channel-specific
control registers are not taken into account for sequential sources.
Channel 0
Channel 1
Channel . ..
Request .. . ..
Sources ..
Channel 14
SR0
Channel 15 SR1
SR2
Service SR3
Parallel Timer Request
Conversion SR4
Compressor
Request SR5
Sources Auto-Scan SR6
SR7
Channel
Serial Injection
Conversion
Request
Sources Queue
MCA06025
Table 25-9 lists the service request sources of the A/D Converter module and the related
control and status flags/bits.
No action 000
Result is not in area I 001
Result is not in area II 010
Result is not in area III 011 Channel n
≥1 Service
STAT.RESULT is updated 100 Request
Result is in area I 101 &
Event
Result is in area II 110
Result is in area III 111
&
Writing 1 to MSS0.MSRCHn
MCA06026_mod
Set Clear
Service
Request Event
(Timer, Queue , ≥1 Parallel /Serial
Auto-Scan, Service Request
Sync. Injection) Event
&
&
CHCONn
INP
3
SR0 OR-Gate
000 ≥1
001 To SR1 OR-Gate
010 To SR2 OR-Gate .. Service
Channel n 011 To SR3 OR-Gate ..
Service Request Request
100 To SR4 OR-Gate ..
Event . Output
101 To SR5 OR-Gate SR0
110 To SR6 OR-Gate
111
.. ..
.. ..
SRNP .. ..
. .
Node Ptr
3
SR7 OR-Gate
000 ≥1
001 To SR1 OR-Gate
One of the 010 To SR2 OR-Gate .. Service
Parallel/Serial 011 To SR3 OR-Gate .. Request
Service Request 100 To SR4 OR-Gate ..
. Output
Events 101 To SR5 OR-Gate SR7
110 To SR6 OR-Gate
111
MCA06028
Arbiter Arbiter
A/D A/D
Converter Converter
16 16
Analog Inputs Analog Inputs
MCA06029
Master Functionality
After an arbitration winner is detected, the Synchronized Injection Mode bit field
CHCONn.SYM is evaluated. If this bit field is configured either for sync-wait
(CHCONn_SYM = 01B) or cancel-sync-repeat (CHCONn.SYM = 10B) functionality, a
synchronized-request is generated for the slave ADC module. A synchronized request
means setting bit SYSTAT.SYREQ in the slave’s register.
Slave Functionality
On reception of the synchronized request (bit SYSTAT.SYREQ is set), the channel
number (SYSTAT.CHNRSY), the resolution (SYSTAT.RES), the external multiplexer
information (SYSTAT.EMUX), the analog input multiplexer group select state
(SYSTAT.GRPS), as well as the cancel-sync-repeat information (SYSTAT.CSREN) are
driven by the master. Beside this synchronized request derived from the master, the
evaluation of an arbitration result of the slave is disabled. Thus, the slave itself
cannot generate a request.
Then, the cancel-sync-repeat enable bit is evaluated. This bit specifies whether a
conversion that is currently performed in the slave is cancelled (SYSTAT.CSREN = 1) or
not (SYSTAT.CSREN = 0). Note that a synchronized conversion cannot be cancelled by
another synchronized conversion. Bit STAT.REQSY is set to indicate that this module is
the partner (slave) in a synchronized conversion.
The handshake guarantees that the master and the slave are ready to start a
synchronized conversion if the synchronized request is still active (bit SYSTAT.SYREQ
is set in the slave). In the case that bit SYSTAT.SYREQ is cleared in the meantime by
the master, the ADC module continues with normal behavior.
Beside the start of conversion, the synchronized request (bit SYSTAT.SYREQ) is
cleared, bit STAT.PARSY is set, and the write to the arbitration result is enabled anew.
At the end of the synchronized conversion, the master’s status bit STAT.IENPAR is
controlled by the slave and the slave’s status bit STAT.PARSY is cleared.
Master/Slave Functionality
The special master/slave mode is entered if both ADC modules requested to be master
at the same time and both ADC modules requested a synchronized conversion for the
same channel. In this case, each ADC module compares the received channel number
from the synchronization bridge with the channel number stored in their arbitration result.
Three cases must be treated:
• SYSTAT.CHNRSY < channel number in arbitration result register
ADC module behaves as master.
Clear the synchronized conversion request (bit SYSTAT.SYREQ) because this is the
master (see description on master functionality).
• SYSTAT.CHNRSY = channel number in arbitration result
ADC module provides master/slave functionality.
• SYSTAT.CHNRSY > channel number in arbitration result
ADC module behaves as slave and bit SYSTAT.SYREQ remains set.
(see description on slave functionality)
In the case that this ADC module provides master/slave functionality, bit STAT.SYMS is
set and any write action to the arbitration result is disabled. This means that the
synchronized conversion is started next in the slave.
From this point, the behavior is similar to the one of a master until the synchronized
conversion is finished. At the end of the synchronized conversion, bit STAT.SYMS is
cleared and bit MSS1.MSRSY is set for each ADC module.
Arbiter
Master ADC
Delay Delay
A/D Converter
CHNR=5 CHNR=3
Master ADC
A/D Converter
CHNR=5 CHNR=3
Slave ADC
Arbiter
Master ADC
Delay
A/D Converter
CHNR=5 CHNR=3 CHNR=8
Master ADC
Cancel Cancel
A/D Converter
CHNR=5 CHNR=3 CHNR=8
Slave ADC
Repeat Repeat
Arbiter
Slave ADC
ADC0_ID
ADC0 Module Identification Register (008H) Reset Value: 0030 C0XXH
31 16 15 8 7 0
r r r
CHCONm (m = 0-15)
Channel Control Register m (010H+m*4) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
EN
0 SYM 0 INP LCC BSELA BSELB
CH
r rw r rw rw rw rw rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GRP
0 EMUX RES REF STC
S
r rw rw rw rw rw
CHSTATm (m = 0-15)
Channel Status Register m (130H+m*4) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
GRP
0 CHNR 0 CRS 0 EMUX
S
r rh r rh r rh rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 RESULT
r rh
Note: The former contents of a CHSTATn register are overwritten with the new result for
the same channel.
TTC
Timer Trigger Control Register (08CH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TTC TTC TTC TTC TTC TTC TTC TTC TTC TTC TTC TTC TTC TTC TTC TTC
CH CH CH CH CH CH CH CH CH CH CH CH CH CH CH CH
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw
TCON
Timer Control Register (114H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
TS
TR TRLD
EN
rh rw rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 ALB
r rw
TSTAT
Timer Status Register (1B0H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 TIMER
r rh
TCRP
Timer Conversion Request Pending Register
(1B8H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TRP TRP TRP TRP TRP TRP TRP TRP TRP TRP TRP TRP TRP TRP TRP TRP
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rh rh rh rh rh rh rh rh rh rh rh rh rh rh rh rh
QUEUE0
Queue Status Register (170H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GRP
V 0 EMUX RES 0 CHNR
S
rh r rh rh rh r rh
QR
Queue Register (11CH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GRP
V 0 EMUX RES 0 CHNR
S
rwh r rw rw rw r rw
EXTC
External Trigger Control Register (090H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ETC ETC ETC ETC ETC ETC ETC ETC ETC ETC ETC ETC ETC ETC ETC ETC
CH CH CH CH CH CH CH CH CH CH CH CH CH CH CH CH
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw
EXCRP
External Conversion Request Pending Register
(1BCH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EX EX EX EX EX EX EX EX EX EX EX EX EX EX EX EX
CRP CRP CRP CRP CRP CRP CRP CRP CRP CRP CRP CRP CRP CRP CRP CRP
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rh rh rh rh rh rh rh rh rh rh rh rh rh rh rh rh
SCN
Auto-Scan Control Register (124H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
GRPC 0
rw r
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SRQ SRQ SRQ SRQ SRQ SRQ SRQ SRQ SRQ SRQ SRQ SRQ SRQ SRQ SRQ SRQ
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw
ASCRP
Auto-Scan Conversion Request Pending Register
(188H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
GRP
0
S
rh r
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
AS AS AS AS AS AS AS AS AS AS AS AS AS AS AS AS
CRP CRP CRP CRP CRP CRP CRP CRP CRP CRP CRP CRP CRP CRP CRP CRP
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rh rh rh rh rh rh rh rh rh rh rh rh rh rh rh rh
AP
Arbitration Participation Register (084H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SW
0 CHP TP 0 EXP 0 QP ASP
0P
r rwh rwh r rwh rwh r rwh rwh
SAL
Source Arbitration Level Register (088H) Reset Value: 0103 4067H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
r rw r rw r rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
r rw r rw r rw
LCCONx (x = 0-3)
Limit Check Control Register x (100H+x*4) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 BOUNDARY
r rw
SCON
Source Control Register (098H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
QEN QEN
0 QRS TRS TRC
S C
r w w w w w
Note: All SCON bits are write-only bits. Reading SCON always delivers 0000 0000H.
CON
Converter Control Register (120H) Reset Value: 0000 0001H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
SR
PC
TE 0 CPR 0 QWLP
DIS
ST
rw r rw rw r rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rh r rw rw
SYSTAT
Synchronization Status Register (190H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
SY
0
REQ
rh r
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CSR GRP
0 EMUX RES 0 CHNRSY
EN S
rh r rh rh rh r rh
STAT
Converter Status Register (1B4H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
SY IEN IEN PAR REQ
0 0 QF QLP
MS PAR REQ SY SY
r rh rh rh rh rh r rh rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DA
BU SM
CAL AL TA CHTSCC 0 CHNRCC
SY PL
VAL
rh rh rh rh rh rh r rh
CHIN
Channel Injection Control Register (118H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
CIN
0
REQ
rw r
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CIR GRP
0 EMUX RES 0 CHNRIN
EN S
rw r rw rw rw r rw
REQ0
Conversion Request Register SW0 (128H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
REQ REQ REQ REQ REQ REQ REQ REQ REQ REQ REQ REQ REQ REQ REQ REQ
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw
SW0CRP
Software SW0 Conversion Request Pending Register
(180H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SW0 SW0 SW0 SW0 SW0 SW0 SW0 SW0 SW0 SW0 SW0 SW0 SW0 SW0 SW0 SW0
CRP CRP CRP CRP CRP CRP CRP CRP CRP CRP CRP CRP CRP CRP CRP CRP
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rh rh rh rh rh rh rh rh rh rh rh rh rh rh rh rh
MSS0
Module Service Request Status Register 0
(1D0H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
MSR MSR MSR MSR MSR MSR MSR MSR MSR MSR MSR MSR MSR MSR MSR MSR
CH CH CH CH CH CH CH CH CH CH CH CH CH CH CH CH
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh rwh
MSS1
Module Service Request Status Register 1
(1D4H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
MSR MSR MSR MSR
0
AS QR SY T
r rwh rwh rwh rwh
SRNP
Service Request Node Pointer Register
(1DCH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EN EN EN EN
PAS PQR PSY PT
PAS PQR PSY PT
rw rw rw rw rw rw rw rw
VDD VDDM
VAGND0 VSS VSSM VAREF0
P7.1 /
GRPS A1 AD0EMUX2
fADC
Clock EMUX0 Port 7 P7.2 /
fCLC A1 AD0EMUX0
Control EMUX1 Control
P7.3 /
A1 AD0EMUX1
ASGT 8
Address SW0TR, SW0GT External From Ports
Decoder
ETR, EGT Request 2
From MSC0/1
ADC0 QTR, QGT Unit
SR (SCU) 9
[3:0] Module TTR, TGT From GPTA
Interrupt Kernel
Control
AIN0 D AN0
Analog Multiplexer
Group 0
AIN15 D AN1
SR[7:4]
Group 1
AIN31
Synchronization Bridge
AIN0
Analog Multiplexer
Group 0
AIN15
AIN16
Not D AN41
Used
AIN30 D AN42
AIN31 Die Temp.
ADC1 Sensor D AN43
Address Module ASGT 8
Decoder Kernel SW0TR, SW0GT External From Ports
ETR, EGT Request 2
From MSC0/1
QTR, QGT Unit
SR[3:0] TTR, TGT (SCU) 9
Interrupt From GPTA
Control
EMUX0 P7.6 /
A1
Port 7 AD1EMUX0
SR[7:4]
To DMA EMUX1 Control P7.7 /
A1
AD1EMUX1
VSS
RST_EXT_DIV ADC1
Module
Kernel
MCA06035
1
f ADC = f SYS × --- with n = 1024 - FDR.STEP (25.11)
n
n
f ADC = f SYS × ------------- with n = 0-1023 (25.12)
1024
ADC0_CLC
ADC Clock Control Register (000H) Reset Value: 0000 0003H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FS SB E SP DIS DIS
0
OE WE DIS EN S R
r rw w rw rw r rw
Note: Additional details on the clock control register functionality are described in section
“Clock Control Register CLC” on Page 3-24 of the TC1796 User’s Manual
System Units part (Volume 1).
ADC0_FDR
ADC Fractional Divider Register (00CH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
DIS EN SUS SUS
0 RESULT
CLK HW REQ ACK
rwh rw rh rh r rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DM SC SM 0 STEP
rw rw rw r rw
Note: Further details on the fractional divider register functionality are described in
section “Fractional Divider Operation” on Page 3-29 of the TC1796 User’s
Manual System Units part (Volume 1).
P7_IOCR0
Port 7 Input/Output Control Register 0 (10H) Reset Value: 2020 2020H
31 28 23 20 15 12 7 4 0
rw r rw r rw r rw r
P7_IOCR4
Port 7 Input/Output Control Register 4 (14H) Reset Value: 2020 2020H
31 28 23 20 15 12 7 4 0
rw r rw r rw r rw r
P7_PDR
Port 6 Pad Driver Mode Register (40H) Reset Value: 0000 0000H
31 3 2 0
0 PD0
r rw
ADC0 ADC0_CHCONn
2
REF
VAREF[0]
VAREF0 00
VAREF[1]
01
VAREF[2] MUX
10
N.C. 11
AIN0
AIN1
AIN2 A/D
MUX
Converter
AIN31
VAGND0
ADC1
VAREF1
AIN0
AIN1
AIN2 A/D
MUX
Converter
AIN31
VAGND1
MCA06036
TGADCx TGADCx
SW0GTSEL SW0TRSEL
3 3
0 0
SW0TR
1
PDOUT 4 SW0GT
8
GPIO TGADCx TGADCx
EGTSEL ETRSEL
3 3
MSC0 ERU 0 0
ETR
1 EGT
MSC1 TOUT 4
TGADCx
TTRSEL ADCx
6 3
x = 0, 1
0
TTR
0
QTR
QGT
1
ASGT
1
MCA06037
Trigger inputs can be completely disabled, connected to the TOUT signals of the ERU,
or connected to one of three GPTA0 output signals. This third selection capability makes
it possible to directly trigger A/D conversions with GPTA output signal transitions. When
connected to the TOUT signals of the ERU, trigger signal source and behavior must be
selected in the ERU. The functionality of the ERU is described in detail in Section 5.3
on Page 5-9 of the TC1796 System Units User’s Manual.
Three gating input signals are connected to high level. This means, that its gating
functionality is not used and trigger requests are always passed in the corresponding
trigger control logic.
Table 25-17 summarizes the trigger/gating capabilities for each trigger source and gives
references to the figures in which the functionality of trigger/gating signals are shown.
TGADCx (x = 0-1)
Trigger Gating ADCx Register (9CH+04H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0 SW0GTSEL 0 EGTSEL
r rw r rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
r rw r rw r rw r rw
SRCm (m = 0-3)
Service Request Control Register m
(1FCH-m*4) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SET CLR
SRR SRE 0 TOS 0 SRPN
R R
w w rh rw r rw r rw
Note: Additional information about service request nodes and the service request control
registers are described on Page 14-3 of the TC1796 User’s Manual System Units
part (Volume 1).
Features
• Extreme fast conversion, 21 cycles of fFADC clock (280 ns @ fFADC = 75 MHz)
• 10-bit A/D conversion
– Higher resolution by averaging of consecutive conversions is supported
• Successive approximation conversion method
• Four differential input channels
• Offset and gain calibration support for each channel
• Differential input amplifier with programmable gain of 1, 2, 4 and 8 for each channel
• Free-running (Channel Timers) or triggered conversion modes
• Trigger and gating control for external signals
• Built-in Channel Timers for internal triggering
• Channel timer request periods independently selectable for each channel
• Selectable, programmable antialiasing and data reduction filter block
fFADC
Clock Data
Control fCLC Reduction
Unit FAIN0P
FAIN0N
Address FAIN1P
A/D
Input Stage
Decoder
Control FAIN1N
A/D
Converter FAIN2P
SR[3:0] FAIN2N
Interrupt
Control FAIN3P
FAIN3N
To DMA
TS[7:0] Channel
Channel
Trigger
Timers
GS[7:0] Control
MCB06038
Channel 0 ACR0
Analog A/D
Input Stage ENP ENN Control
Channel
Amplifier
Rp
FAIN0P
Rn ACRx
FAIN0N GAIN
FAIN1P
Channel 1 Analog Input Stage
FAIN1N To A/D
Converter
FAIN2P
Channel 2 Analog Input Stage Common
FAIN2N Amplifier
FAIN3P
Channel 3 Analog Input Stage
FAIN3N
MCA06039
High
FAINxN -
impedance Configuration 0:
N.C. Channel amplifier is in
High Power Down Mode
FAINxP +
impedance
Rn
FAINxN -
Configuration 1:
Single-ended Measurement
High of VFAREF/2 - FAINxN
FAINxP V /2 +
impedance FAREF
High
FAINxN V
impedance FAREF
/2 -
Configuration 2:
Rp Single-ended Measurement
of FAINxP - VFAREF/2
FAINxP +
Rn
FAINxN -
Configuration 3:
Rp Differential Measurement of
FAINxP - FAINxN
FAINxP +
MCA06040
Note: Due to the temperature characteristics of offset and gain of the internal amplifiers
a TUE (total unadjusted error) cannot be specified. The input impedance for Rp
and Rn is defined in the TC1796 Data Sheet.
Note: The analog input lines of the FADC can also be used as input lines for other ADCs.
If both (regular ADC and FADC) are connected to the same pin at the same time,
the input impedances of the analog inputs must be taken into account in order to
minimize signal distortions and measurement errors.
The conversion result for FADC channel x is given by the following equation:
The absolute value of the result VMx is limited to VFAREF. The mapping of the conversion
result VMx to the binary result RCHx.ADRES is as follows (see also Table 26-1):
For single-ended measurements, the following values are taken into account:
• if ENPx = 0 then VFAINxP = VFAREFM
• if ENNx = 0 then VFAINxN = VFAREFM
1
Conversion Time FADC = 21 × ------------- (26.2)
f FADC
Clock fFADC is generated outside the FADC kernel in a product specific clock control unit
(see Page 26-58).
GS[7:0]
TS[7:0] CFGRx CFGRx Channel x Trigger
GSEL GM Control
Conversion
3 2 Started
Gating ECHTIMx CRSR Clear
Mode & Set Channel x
Selection Enable CRFx Conversion
Trigger
Set Clear
CFGRx CFGRx Channel x
Timer
TSEL TM FMR
Trigger SCRFx RCRFx
3 2
≥1
Edge
Detection
Unit
Table 26-2 describes the possible gating modes (enabled, disabled, active gating
source input polarity) of an FADC channel.
An edge detection unit determines which edge of the trigger source input signal (as
selected by CFGRx.TSEL) is generating a conversion request trigger signal. Rising,
falling or both edges can be selected for trigger signal generation.
The Conversion Request Flag CRFx is cleared by hardware when the conversion of
channel x is started. CRFx can also be set or cleared by software via bits in the Flag
Modification Register FMR. Writing a 1 to FMR.SCRF sets CRFx. Writing a 1 to
FMR.RCRF clears CRFx (independently of FMR.SCRF).
Channel x Timer
To the other three Run Control
enable ECHTIMx
Channel Timers
MCB06042
In case of a fCLC / fCTx ratio between 1 and 2, a mixture of both divide factor definitions
occurs depending on the divider ratio as programmed by the fractional divider value.
Therefore, it is recommended that this ratio should not be used.
The dynamic priority assignment feature ensures that two channels can be sampled in
equidistant intervals.
MCA06043
IRR1n
CRRn
IRR2n 1) Adder
Filter
FRRn Output
IRR3n 1) Value
Filter
Input
Value Control Filter Block n
CV CV CV CV CV CV CV CV CV CV CV CV CV CV CV CV CV CV CV CV CV CV CV CV
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
CV12+CV13
CV12+CV13
CV16+CV17
CV16+CV17
CV20+CV21
CV20+CV21
CV0+CV1
CV0+CV1
CV4+CV5
CV4+CV5
CV8+CV9
CV8+CV9
+CV10
+CV14
+CV18
+CV22
+CV2
+CV6
CV12
CV16
CV20
CV0
CV4
CV8
CRR
0
0
3 3 3 3 3 3
2 2 2 2 2 2
AC 1 1 1 1 1 1
0 0 0 0 0 0
MAVS 0 0 0 0 0 0
IRQFn
CVy = Conversion results of one channel, numbered by y.
IRk = Intermediate results, numbered by k.
CRR = Content of current result register.
AC = Addition counter for current result.
IRR1-IRR3 = Content of the intermediate result registers.
FRR = Content of the final result register.
C = Calculation of intermediate and final results.
MCT06045
MAVS = Moving average counter.
IRQFn = Interrupt flags CRSR.IRQFn set.
Initial State
In order to start a filter algorithm for filter block n, the following actions must be executed:
1. Program bit field FCRn.ADDL with FCRn.INSEL = 000B (filter disabled)
2. Select filter n input source and operation by writing FCRn.INSEL with the appropriate
value
3. Reset filter block n by writing GCR.RSTFn = 1
4. Start a continuous conversion
Filter 0
FR0 FR1 FR2 FR3 FR4 FR5 FR6 FR7 FR8 FR9 FR10 FR11 FR12 FR13 FR14
v
v
FR12+FR13
FR9+FR10
FR0+FR1
FR3+FR4
FR6+FR7
FR12
FR0
FR3
FR6
FR9
CRR1
0
Filter 1
Start of
Channel
NCTR
0 1 2 3 EN10 EN20 EN30 EN01 EN02 EN03
≥1
Neighbor
Channel
Trigger Signal
NCT0
≥1
Neighbor
Channel
Trigger Signal
NCT1
NCTR
EN02 EN12 EN32 EN03 EN13 EN23
≥1
Neighbor
Channel
Trigger Signal
NCT2
≥1
Neighbor
Channel
Trigger Signal
NCT3
MCA06047
Channel Channel
Amplifier Amplifier
- VFAGND -
VFAREF/2
+ VFAREF/2 +
Rn
FAINxN
Rp VFAREF/2 ACRx.ENN = ACRx.ENP = 1
FAINxP
FAINxN High
Impedance Other combinations than
High ACRx.ENN = ACRx.ENP = 1
FAINxP
Impedance
MCA06048
00 To SR0 OR-Gate
³1 01 To SR1 OR-Gate
Service Request 10 To SR2 OR-Gate
Trigger Signal 11 To SR3 OR-Gate
MCA06050_mod
The request flag is always set by hardware when the corresponding request event
occurs. It can also be set or cleared by software when writing a 1 to the corresponding
set/clear request flag bit in the Flag Modification Register FMR. Finally, a service request
event is directed to one of the four service request output lines SR[3:0] when the
corresponding service request enable bit IEN is set. The service request node pointer
determines which of the service request output lines SR[3:0] becomes activated.
Table 26-6 lists the six service request sources of the FADC Module with its related
control and status flags/bits.
In the service request compressor logic shown in Figure 26-14, the inputs of one SRx
OR-gate are connected to all demultiplexer outputs with identical INP node pointer value.
Therefore, one service request event can only be assigned to one of the four service
request outputs but one service request output can be used by multiple service request
events.
CFGRx
INP
SR0 OR-Gate
00 ≥1 Service
Channel x
Request Event
01 To SR1 OR-Gate Request
(x = 0-3)
10 To SR2 OR-Gate Output
11
SR0
.. ..
.. ..
FCRx .. ..
INP . .
SR3 OR-Gate
00 ≥1 Service
Filter Block n
Request Event
01 To SR1 OR-Gate Request
10 To SR2 OR-Gate Output
(n = 0, 1) 11
SR3
MCA06051
FCR1
CRR1
IRR11
FRR1
MCA06052_mod
ID
Module Identification Register (08H) Reset Value: 0027 C0XXH
31 16 15 8 7 0
r r r
CRSR
Conversion Request Status Register (10H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
IRQ IRQ IRQ IRQ IRQ IRQ
0
F1 F0 3 2 1 0
r rh rh rh rh rh rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
BSY BSY BSY BSY CRF CRF CRF CRF
0 0
3 2 1 0 3 2 1 0
r rh rh rh rh r rh rh rh rh
The bits of the Flag Modification Register FMR allow the flags of the conversion request
status register to be set/cleared by software.
FMR
Flag Modification Register (14H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
S S S S S S R R R R R R
0 IRQ IRQ IRQ IRQ IRQ IRQ 0 IRQ IRQ IRQ IRQ IRQ IRQ
F1 F0 3 2 1 0 F1 F0 3 2 1 0
r w w w w w w r w w w w w w
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
S S S S R R R R
0 CRF CRF CRF CRF 0 CRF CRF CRF CRF
3 2 1 0 3 2 1 0
r w w w w r w w w w
The Neighbor Channel Trigger Register NCTR contains the enable bits for the neighbor
channel trigger signal (NCTx) generation (see Page 26-21).
NCTR
Neighbor Channel Trigger Register (18H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
EN EN EN EN EN EN
0 0 0
32 31 30 23 21 20
r rw rw rw r rw r rw rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EN EN EN EN EN EN
0 0 0 0
13 12 10 03 02 01
r rw rw r rw r rw rw rw r
Note: The hardware does not check whether the enable bits are set in such a way as to
describe a loop of conversion requests (e.g. 0 triggers 2, 2 triggers 3 and 3 triggers
0, etc.). It is in the responsibility of the user to set these bits in an appropriate way.
The Global Control Register GCR contains bits used to clear the Channel Timers, the
filters and to control global FADC settings.
GCR
Global Control Register (1CH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
AN MUX RES DPA
0 CALCH CALMODE 0 CRPRIO
ON TM WEN EN
r rw rw r rw rw rw rw rwh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RST RST RCT RCT RCT RCT
0 RCD 0
F1 F0 3 2 1 0
r w w w r w w w w
CFGRx (x = 0-3)
Channel x Configuration Register (20H+x*4H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
rw r rw r rw
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
r rw rw rw rw rw rw
The Channel x Analog Control Register ACRx contains the bits that control the analog
input stage.
ACRx (x = 0-3)
Channel x Analog Control Register
(30H+x*4H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CAL
CALOFF
0 CALGAIN OFF 0 0 ENN ENP GAIN
[2:0]
3
r rw rw r rw r rw rw rw
Note: If ENN = 0 and ENP = 0, the channel amplifier is in power-down mode. The
conversion result is not valid in this case.
The Channel x Conversion Result Register RCHx contains the conversion result ADRES
of channel x.
RCHx (x = 0-3)
Channel x Conversion Result Register
(40H+x*4H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 ADRES
r rwh
FCRn (n = 0-1)
Filter n Control Register (60H+n*20H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw r rw r rw r rw r rw
Note: If the length of the moving average is reduced, the execution time (number of clock
cycles) is also reduced. In any case, the filter calculation and execution time is
much smaller than a conversion time.
The Current Result Registers CRRn store the current result of filter n. Further, status
information of filter block n can be read from CRRn.
CRR0
Filter 0 Current Result Register (64H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0 MAVS 0 AC 0
r rh r rh r
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 CR
r rh
CRR1
Filter 1 Current Result Register (84H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0 MAVS 0 AC 0 CR
r rh r rh r rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CR
rh
The Intermediate Result Registers IRRxn hold the intermediate results x of filter n.
IRRx0 (x = 1-3)
Filter 0 Intermediate Result Register x
(64H+x*4H) Reset Value: 0000 0000H
31 13 12 0
0 IR
r rh
IRR11
Filter 1 Intermediate Result Register 1
(88H) Reset Value: 0000 0000H
31 18 17 0
0 IR
r rh
The Final Result Registers for filters 0 and 1 hold the final result of the filter operations.
FRR0
Filter 0 Final Result Register (74H) Reset Value: 0000 0000H
31 15 14 0
0 FR
r rh
FRR1
Filter 1 Final Result Register (94H) Reset Value: 0000 0000H
31 20 19 0
0 FR
r rh
Note: During a final result calculation phase (phase C in Figure 26-8 on Page 26-16),
the contents of the FRRn registers change. Therefore, it is recommended to read
a final result from the FRRn registers immediately (for example, by a DMA
operation) after a corresponding interrupt request flag CRSR.IRQFn has been set.
fFADC
Clock
Control fCLC
FAIN0P
D AN24
FAIN0N
Address D AN25
Decoder FAIN1P
D AN26
FAIN1N
FADC D AN27
SR[3:0] Module
Interrupt FAIN2P
Control Kernel D AN28
FAIN2N
D AN29
To DMA FAIN3P
D AN30
OUT1 FAIN3N
OUT9 D AN31
OUT18
OUT26 A1 P1.0 / REQ0
GPTA0 OUT2 A1 P1.1 / REQ1
OUT10 GS[7:0]
OUT19 A1 P7.0 / REQ4
OUT27 TS[7:0]
A1 P7.1 / REQ5
PDOUT2
External Request Unit
(SCU) PDOUT3
MCA06053
The FADC module is supplied with a clock control, address decoding, and interrupt
control logic. Each of the four service request outputs is connected to an interrupt node.
In parallel, the four service request outputs are wired to request inputs of the DMA
controller. The 2 × 8 gating and trigger source input lines are connected to four request
input pins, eight outputs of the GPTA0 module, and two outputs of the external request
unit. The eight analog inputs are wired to analog inputs of the TC1796.
The analog input lines of the FADC can also be used as input lines for ADC0 and ADC1.
If both, ADC0/ADC1 and FADC, are connected to the same analog input pin at the same
time, the input impedances of both analog inputs must be taken into account in order to
minimize signal distortions and measurement errors.
VSS MCA06055
1
f FADC = f SYS × --- with n = 1024 - FDR.STEP (26.3)
n
n
f FADC = f SYS × ------------- with n = 0-1023 (26.4)
1024
CLC
Clock Control Register (00H) Reset Value: 0000 0003H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FS SB E SP DIS DIS
0
OE WE DIS EN S R
r rw w rw rw r rw
Note: Additional details on the clock control register functionality are described in section
“Clock Control Register CLC” on Page 3-24 of the TC1796 User’s Manual
System Units part (Volume 1).
The Fractional Divider Register allows the programmer to control the clock rate of the
module clock fFADC.
FDR
Fractional Divider Register (0CH) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
DIS EN SUS SUS
0 RESULT
CLK HW REQ ACK
rwh rw rh rh r rh
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DM SC SM 0 STEP
rw rw rw r rw
Note: Additional details on the fractional divider register functionality are described in
section “Fractional Divider Operation” on Page 3-29 of the TC1796 User’s
Manual System Units part (Volume 1).
P1_IOCR0
Port 7 Input/Output Control Register 0
(10H) Reset Value: 2020 2020H
31 28 23 20 15 12 7 4 0
rw r rw r rw r rw r
1) Coding of bit field see Table 26-8. Shaded bits and bit fields are “don’t care” for FADC I/O port control.
P7_IOCR0
Port 7 Input/Output Control Register 0
(10H) Reset Value: 2020 2020H
31 28 23 20 15 12 7 4 0
rw r rw r rw r rw r
FADC_SRCm (m = 0-3)
FADC Service Request Control Register m
(FCH-m*4H) Reset Value: 0000 0000H
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SET CLR
SRR SRE 0 TOS 0 SRPN
R R
w w rh rw r rw r rw
Note: Additional details on service request nodes and the service request control
registers are described on Page 14-3 of the TC1796 User’s Manual System Units
part (Volume 1).
Keyword Index
This section lists a number of keywords which refer to specific details of the TC1796 in
terms of its architecture, its functional units, or functions. Bold page number entries
identify the main definition material for a topic. The “Keyword Index” refers to page
numbers in both parts of the TC1796 User’s Manual, the “System Units” (volume 1 with
marking “[1]”) and the “Peripheral Units” (volume 2 with marking “[2]”) parts.
Baud rate generation 19-12 [2]– SBCU and RBCU 6-24 [1]
19-16 [2] Bus agents and priorities 6-24 [1]
Asynchronous modes 19-13 [2] Bus arbitration 6-24 [1]
Synchronous mode 19-16 [2] Bus error handling 6-25 [1]
Block diagram Registers 6-34 [1]
Asynchronous modes 19-4 [2] Starvation prevention 6-25 [1]
Synchronous mode 19-9 [2] Boot 4-12 [1]
DMA request outputs 19-42 [2] Normal boot 4-14 [1]
Error detection 19-17 [2] Scheme 4-12 [1]
Features 19-2 [2] Selection table 4-12 [1]
Interrupt generation 19-17 [2] Boot ROM 4-16 [1]
Module implementation 19-30 [2]–?? Alternate Boot Mode 4-28 [1]
DMA request outputs 19-42 [2] Program Structure 4-16 [1]
Input/output function selection
19-36 [2] C
Pad output driver characteristics CAN
selection 19-39 [2] Address map 22-214 [2]
Registers 19-19 [2]–19-29 [2] Basics 22-2 [2]
BG 19-27 [2] Addressing and arbitration 22-2 [2]
CON 19-22 [2] Basic-/Full-CAN 22-10 [2]
FDV 19-27 [2] Error detection and handling
ID 19-20 [2] 22-9 [2]
Offset addresses 19-19 [2] Frame formats 22-3 [2]
Overview 19-19 [2] Nominal bit time 22-8 [2]
PISEL 19-21 [2] Block diagram 22-14 [2]
RBUF 19-29 [2] DMA requests 22-209 [2]
TBUF 19-28 [2] Module implementation 22-199 [2]–
WHBCON 19-25 [2] 22-212 [2]
Synchronous mode 19-9 [2]–19-11 [2] External registers 22-200 [2]
Timings 19-11 [2] I/O line control 22-205 [2]
Input/output function selection
B 22-205 [2]
BCU Interfaces 22-199 [2]
LBCU Interrupt control 22-210 [2]
Offset addresses 6-7 [1] Module clock generation 22-201 [2]
SBCU MultiCAN
Offset addresses 6-34 [1] Bit timing 22-24 [2]
BCUs Block diagram 22-18 [2]
DBCU and PBCU 6-5 [1] Clock generation 22-21 [2]
Bus agents and priorities 6-5 [1] Interrupt structure 22-20 [2]
Error handling 6-6 [1] Message acceptance filtering
Operation 6-5 [1] 22-37 [2]
Registers 6-7 [1] Message object data handling
System peripheral bus 6-19 [1] in OCDS suspend mode 16-17 [1]
System timer Modify access to WDT_CON0
Block diagram 15-3 [1] 16-11 [1]
Compare register operation 15-5 [1] Monitoring diagram 16-26 [1]
Interrupt control 15-6 [1] Operating modes 16-7 [1]
Operation 15-1 [1] Disable mode 16-8 [1], 16-15 [1]
Overview 15-1 [1] Normal mode 16-8 [1], 16-14 [1]
Registers Prewarning mode 16-9 [1],
Offset addresses 15-8 [1] 16-16 [1]
Overview 15-7 [1] Time-out mode 16-8 [1], 16-13 [1]
STM_CAP 15-14 [1] Operation sequence example 16-5 [1]
STM_CLC 15-9 [1] Overview 16-1 [1]
STM_CMCON 15-16 [1] Period calculation 16-18 [1]
STM_CMPx 15-15 [1] Period in power-saving modes
STM_ICR 15-18 [1] 16-21 [1]
STM_ID 15-10 [1] Registers 16-28 [1]
STM_ISRR 15-20 [1] Offset addresses 16-28 [1]
STM_SRCx 15-21 [1] WDT_CON0 16-29 [1]
STM_TIM0 15-11 [1] WDT_CON1 16-31 [1]
STM_TIM1 15-11 [1] WDT_SR 16-32 [1]
STM_TIM2 15-12 [1] Service sequence diagram 16-25 [1]
STM_TIM3 15-12 [1] Servicing 16-23 [1]
STM_TIM4 15-12 [1] System initialization 16-22 [1]
STM_TIM5 15-13 [1] Time-out period 16-18 [1]
STM_TIM6 15-13 [1] WDT, see “Watchdog timer”
Resolutions and ranges 15-4 [1]
T
Temperature compensation 5-41 [1]
Block diagram 5-42 [1]
Registers
SCU_TCCLR1 5-47 [1]
SCU_TCCON 5-44 [1]
SCU_TCLR0 5-46 [1]
Switching thresholds 5-43 [1]
TTCAN, see “CAN”
W
Watchdog timer 16-1 [1]–??
During power-saving modes 16-17 [1]
Endinit function 16-3 [1]
Features 16-2 [1]
Functional description 16-5 [1]
Register Index
This section lists the references to the Special Function Registers of the TC1796. It
refers to page numbers in both parts of the TC1796 User’s Manual, the “System Units”
(volume 1 with marking “[1]”) and the “Peripheral Units” (volume 2 with marking “[2]”)
parts.
ADC1_TSTAT 18-95 [1], 25-67 [2] CAN_GMR 18-69 [1], 22-166 [2]
ADC1_TTC 18-93 [1], 25-65 [2] CAN_ID 18-65 [1], 22-61 [2]
ASC module kernel registers 19-19 [2] CAN_LGMR 18-69 [1], 22-167 [2]
ASC0 register address map 18-20 [1] CAN_LIST0 18-66 [1]
ASC0_BG 18-20 [1], 19-27 [2] CAN_LIST1 18-66 [1]
ASC0_CLC 18-20 [1], 19-32 [2] CAN_LIST2 18-66 [1]
ASC0_CON 18-20 [1], 19-22 [2] CAN_LIST3 18-66 [1]
ASC0_ESRC 18-20 [1], 19-41 [2] CAN_LIST4 18-66 [1]
ASC0_FDV 18-20 [1], 19-27 [2] CAN_LIST5 18-66 [1]
ASC0_ID 18-20 [1], 19-20 [2] CAN_LIST6 18-66 [1]
ASC0_PISEL 18-20 [1], 19-35 [2] CAN_LIST7 18-66 [1]
ASC0_RBUF 18-20 [1], 19-29 [2] CAN_LISTi 22-68 [2]
ASC0_RSRC 18-20 [1], 19-41 [2] CAN_LOR 18-69 [1], 22-164 [2]
ASC0_TBSRC 18-20 [1], 19-41 [2] CAN_LREFMR 18-68 [1], 22-162 [2]
ASC0_TBUF 18-20 [1], 19-28 [2] CAN_LTR 18-68 [1], 22-159 [2]
ASC0_TSRC 18-20 [1], 19-41 [2] CAN_MCR 18-68 [1], 22-66 [2]
ASC0_WHBCON 18-20 [1], 19-25 [2] CAN_MITR 18-68 [1], 22-67 [2]
ASC1 register address map 18-21 [1] CAN_MOAMR0 18-72 [1]
ASC1_BG 18-21 [1], 19-27 [2] CAN_MOAMR1 18-72 [1]
ASC1_CON 18-21 [1], 19-22 [2] CAN_MOAMR126 18-74 [1]
ASC1_ESRC 18-21 [1], 19-41 [2] CAN_MOAMR127 18-75 [1]
ASC1_FDV 18-21 [1], 19-27 [2] CAN_MOAMR2 18-73 [1]
ASC1_ID 18-21 [1], 19-20 [2] CAN_MOAMRn 18-74 [1], 22-107 [2]
ASC1_PISEL 18-21 [1], 19-35 [2] CAN_MOAR0 18-72 [1]
ASC1_RBUF 18-21 [1], 19-29 [2] CAN_MOAR1 18-72 [1]
ASC1_RSRC 18-21 [1], 19-41 [2] CAN_MOAR126 18-75 [1]
ASC1_TBSRC 18-21 [1], 19-41 [2] CAN_MOAR127 18-75 [1]
ASC1_TBUF 18-21 [1], 19-28 [2] CAN_MOAR2 18-73 [1]
ASC1_TSRC 18-21 [1], 19-41 [2] CAN_MOARn 18-74 [1], 22-109 [2]
ASC1_WHBCON 18-21 [1], 19-25 [2] CAN_MOCTR0 18-72 [1]
CAN_MOCTR1 18-73 [1]
B CAN_MOCTR126 18-75 [1]
BCU module registers 6-34 [1] CAN_MOCTR127 18-76 [1]
BIV 2-10 [1], 18-109 [1] CAN_MOCTR2 18-73 [1]
BTV 2-10 [1], 18-109 [1] CAN_MOCTRn 18-74 [1], 22-91 [2]
CAN_MODATA00 18-72 [1]
C CAN_MODATA04 18-72 [1]
CAN module registers 22-59 [2] CAN_MODATA10 18-72 [1]
CAN register address map 18-65 [1] CAN_MODATA1260 18-74 [1]
CAN_AWDR 18-69 [1], 22-168 [2] CAN_MODATA1264 18-75 [1]
CAN_CLC 18-65 [1], 22-202 [2] CAN_MODATA1270 18-75 [1]
CAN_CYCTMR 18-69 [1], 22-163 [2] CAN_MODATA1274 18-75 [1]
CAN_FDR 18-65 [1], 22-203 [2] CAN_MODATA14 18-72 [1]
CAN_SISR 18-70 [1], 22-195 [2] CPR1_1U 2-22 [1], 18-107 [1]
CAN_SRC0 18-66 [1] CPS register address map 18-104 [1]
CAN_SRC1 18-66 [1] CPS_ID 2-13 [1], 18-104 [1]
CAN_SRC10 18-65 [1] CPU_ID 2-10 [1], 18-109 [1]
CAN_SRC11 18-65 [1] CPU_SBSRC 2-13 [1]
CAN_SRC12 18-65 [1] CPU_SBSRC0 2-19 [1], 18-104 [1]
CAN_SRC13 18-65 [1] CPU_SRC0 18-104 [1]
CAN_SRC14 18-65 [1] CPU_SRC1 18-104 [1]
CAN_SRC15 18-65 [1] CPU_SRC2 18-104 [1]
CAN_SRC2 18-66 [1] CPU_SRC3 18-104 [1]
CAN_SRC3 18-66 [1] CPU_SRCn 2-13 [1], 2-14 [1]
CAN_SRC4 18-66 [1] CREVT 18-108 [1]
CAN_SRC5 18-65 [1] CSFR register address map 18-108 [1]
CAN_SRC6 18-65 [1]
CAN_SRC7 18-65 [1] D
CAN_SRC8 18-65 [1] D0 18-109 [1]
CAN_SRC9 18-65 [1] D1 18-109 [1]
CAN_SRCm 22-212 [2] D10 18-110 [1]
CAN_STPTR0 22-192 [2] D11 18-110 [1]
CAN_STSRH 18-70 [1], 22-194 [2] D12 18-110 [1]
CAN_STSRL 18-69 [1], 22-193 [2] D13 18-110 [1]
CAN_SYNMR 18-68 [1], 22-160 [2] D14 18-110 [1]
CAN_TTCFGR 18-69 [1], 22-173 [2] D15 18-110 [1]
CAN_TTCR 18-69 [1], 22-169 [2] D2 18-109 [1]
CAN_TTFMR 18-69 [1], 22-180 [2] D3 18-110 [1]
CAN_TTIER 18-69 [1], 22-186 [2] D4 18-110 [1]
CAN_TTINPR 18-69 [1], 22-190 [2] D5 18-110 [1]
CAN_TTIRR 18-69 [1], 22-182 [2] D6 18-110 [1]
CAN_TTSR 18-69 [1], 22-175 [2] D7 18-110 [1]
CAN_TURR 18-69 [1], 22-157 [2] D8 18-110 [1]
CHIPID 5-70 [1], 18-8 [1] D9 18-110 [1]
Core debug register address map DBCU register address map 18-122 [1]
18-108 [1] DBCU_ID 6-8 [1], 18-122 [1]
CPM0 2-22 [1], 2-23 [1], 18-107 [1] DBCU_LEADDR 6-12 [1], 18-122 [1]
CPM1 2-22 [1], 2-23 [1], 18-108 [1] DBCU_LEATT 6-9 [1], 18-122 [1]
CPMx 2-23 [1] DBCU_LEDATH 6-13 [1], 18-122 [1]
CPR0_0L 2-22 [1], 18-106 [1] DBCU_LEDATL 6-12 [1], 18-122 [1]
CPR0_0U 2-22 [1], 18-106 [1] DBCU_SRC 6-13 [1], 18-122 [1]
CPR0_1L 2-22 [1], 18-107 [1] DBGSR 18-108 [1]
CPR0_1U 2-22 [1], 18-107 [1] DCX 18-108 [1]
CPR1_0L 2-22 [1], 18-107 [1] DMA module registers 12-43 [1]
CPR1_0U 2-22 [1], 18-107 [1] DMA register address map 18-53 [1]
CPR1_1L 2-22 [1], 18-107 [1] DMA_ADRCR00 18-54 [1]
EBU_BUSAP3 13-97 [1], 18-114 [1] FADC_IRR30 18-85 [1], 26-54 [2]
EBU_BUSCON0 13-92 [1], 18-113 [1] FADC_NCTR 18-84 [1], 26-34 [2]
EBU_BUSCON1 13-92 [1], 18-114 [1] FADC_RCH0 18-85 [1], 26-47 [2]
EBU_BUSCON2 13-92 [1], 18-114 [1] FADC_RCH1 18-85 [1], 26-47 [2]
EBU_BUSCON3 13-92 [1], 18-114 [1] FADC_RCH2 18-85 [1], 26-47 [2]
EBU_CLC 13-82 [1], 18-112 [1] FADC_RCH3 18-85 [1], 26-47 [2]
EBU_CON 13-83 [1], 18-112 [1] FADC_SRC0 18-86 [1]
EBU_EMUAS 13-101 [1], 18-115 [1] FADC_SRC1 18-86 [1]
EBU_EMUBAP 13-106 [1], 18-115 [1] FADC_SRC2 18-86 [1]
EBU_EMUBC 13-102 [1], 18-115 [1] FADC_SRC3 18-86 [1]
EBU_EMUOVL 13-110 [1], 18-115 [1] FADC_SRCm 26-63 [2]
EBU_ID 13-81 [1], 18-112 [1] FCX 2-10 [1], 18-109 [1]
EBU_USERCON 13-111 [1], 18-115 [1] FLASH register address map 18-117 [1]
EICR0 5-17 [1], 18-8 [1] FLASH_FCON 7-53 [1], 18-117 [1]
EICR1 5-20 [1], 18-9 [1] FLASH_FSR 7-43 [1], 18-117 [1]
EIFR 5-23 [1], 18-9 [1] FLASH_ID 7-41 [1], 18-117 [1]
EXEVT 18-108 [1] FLASH_MARD 7-52 [1], 18-117 [1]
FLASH_MARP 7-51 [1], 18-117 [1]
F FLASH_PROCON0 7-59 [1], 18-117 [1]
FADC register address map 18-84 [1] FLASH_PROCON1 7-60 [1], 18-117 [1]
FADC_ACR0 18-84 [1], 26-45 [2] FLASH_PROCON2 7-61 [1], 18-117 [1]
FADC_ACR1 18-84 [1], 26-45 [2] FMR 5-24 [1], 18-9 [1]
FADC_ACR2 18-84 [1], 26-45 [2]
FADC_ACR3 18-84 [1], 26-45 [2] G
FADC_CFGR0 18-84 [1], 26-41 [2] GPR register address map 18-109 [1]
FADC_CFGR1 18-84 [1], 26-41 [2] GPTA module registers 11-53 [1],
FADC_CFGR2 18-84 [1], 26-41 [2] 25-58 [2]
FADC_CFGR3 18-84 [1], 26-41 [2] GPTA_EDCTR 18-38 [1]
FADC_CLC 18-84 [1], 26-59 [2] GPTA0 register address map 18-33 [1]
FADC_CRR0 18-85 [1], 26-51 [2] GPTA0_CKBCTR 18-37 [1], 24-173 [2]
FADC_CRR1 18-85 [1], 26-52 [2] GPTA0_CLC 18-33 [1], 24-267 [2]
FADC_CRSR 18-84 [1], 26-30 [2] GPTA0_DBGCTR 18-33 [1], 24-271 [2]
FADC_FCR0 18-85 [1], 26-48 [2] GPTA0_DCMCAV0 18-35 [1]
FADC_FCR1 18-85 [1], 26-48 [2] GPTA0_DCMCAV1 18-36 [1]
FADC_FDR 18-84 [1], 26-60 [2] GPTA0_DCMCAV2 18-36 [1]
FADC_FMR 18-84 [1], 26-32 [2] GPTA0_DCMCAV3 18-36 [1]
FADC_FRR0 18-85 [1], 26-55 [2] GPTA0_DCMCAVk 24-163 [2]
FADC_FRR1 18-86 [1], 26-55 [2] GPTA0_DCMCOV0 18-35 [1]
FADC_GCR 18-84 [1], 26-37 [2] GPTA0_DCMCOV1 18-36 [1]
FADC_ID 18-84 [1], 26-29 [2] GPTA0_DCMCOV2 18-36 [1]
FADC_IRR10 18-85 [1], 26-54 [2] GPTA0_DCMCOV3 18-36 [1]
FADC_IRR11 18-85 [1], 26-54 [2] GPTA0_DCMCOVk 24-164 [2]
FADC_IRR20 18-85 [1], 26-54 [2] GPTA0_DCMCTR0 18-35 [1]