Am186™CU USB Microcontroller Data Sheet 27
implementation.) The Am186CU USB microcontroller
features the additional capability of selecting the
polarity of the SCLK and SDEN pins, as well as the shift
order of bits on the SDATA pin (least-significant-bit first
versus most-significant-bit first). The SSI port also
offers a programmable clock divisor ( di vidi ng the clock
from 2 to 256 in power of 2 increments), a bidirectional
transmit/recei ve shift register, and direct conne ction to
AMD SLAC device s.
System Peripherals
Interrupt Controller
The Am186CU USB microcontroller features an
interrupt controller that arranges the 36 maskable
interrupt requests by priority and presents them one at
a time to the CPU. In addition to interrupts managed b y
the interrupt controller, the Am186CU USB
microcontroller supports eight nonmaskable
interrupts—an external or internal nonmaskable
interrupt (NMI), a trace interrupt, and software
interrupts and exceptions.
The interrupt controller supports the 36 maskable
interrupt sources through the use of 15 channels.
Because of this, most channels support multiple
interrupt sources. These channels are programmable to
support the external interrupt pins and/or various
peripheral devices that can be configured to generate
interrupts. The 36 maskable interrupt sources include 19
internal sources and 17 external sources.
Four General-Purpose DMA Channels
The Am186CU USB microcontroller provides four
general-purpose DMA channels that can be used for
data transfer between memory and I/O spaces (i.e.,
memory-to-I/O or I/O-to-memory) or within the same
space (i.e., memory-to-memory or I/O-to-I/O). In
addition, the Am186CU USB microcontroller supports
data transfer between peripherals and memor y or I/O.
Inter nal per ipherals that s upport gen eral-purpose D MA
are the USB peripheral controller, Timer 2, and the two
asynchronous serial ports (UART and High-Speed
UART). External peripherals support DMA transfers
through the external DMA request pins. Each general-
purpose channel can accept synchronized DMA
requests from one of four sources: the DMA request pins
(DRQ1–DRQ0), Timer 2, the UARTs, or the USB
controller. In addition, system software can initializ e and
start unsyn chro niz e d DMA t r an sfers.
In addition to the four general-purpose channels, the
Am186CU USB microcontroller provides four
SmartDMA channels (see page 26).
48 Programmable I/O Signals
The Am1 86CU USB m icrocontr oller provides 48 us er-
programmable input/output signals (PIOs). Thirty-four
of the 48 signals share a pin with at least one alternate
function. If an application does not need the alter nate
function, the associated PIO can be used by
programming the PIO registers.
If a pin is enabled to function as a PIO signal, the
alternate function is disabled and does not affect the
pin. A PIO signal can be configured to operate as an
input or output, with or without internal pullup or
pulldown resisto rs (pul lup or pul ldown d epends on the
pin configuration and is not user-configurable), or as an
open-drain output. Additionally, eight PIOs can be
configured as external interrupt sources.
Three Programmable Timers
There are three 16-bit programmable timers in the
Am186CU USB microcontroller. Timers 0 and 1 are
highly v ersatile and are each connected to two external
pins (each one has an input and an output). These two
timers can be used to count or time e xternal ev ents that
dri ve the time r input pins. Timers 0 an d 1 can also be
used to generate nonrepetitive or variable-duty-cycle
waveforms on the timer output pins.
Timer 2 is not connected to any external pins. It can be
used by software to generate interrupts, or it can be
polled for real-time coding and time-delay applications.
Timer 2 can also be used as a prescaler to Timer 0 and
Timer 1, or as a DMA request source.
The source clock for Timer 2 is one-fourth of the
system clock frequency. The source clock for Timers 0
and 1 can be configured to be one-fourth of the system
clock, or they can be driven from th eir re sp ective timer
input pins. When driven from a timer input pin, the timer
is counting the “event” of an input transition.
The Am186CU USB microcontroller also provides a
pulse width demodulation (PWD) option so that a
toggling input signal’s Low state and High state
durations can be measured.
Hardware Watchdog Timer
The Am186CU USB microcontroller provides a full-
featured watchdog timer, which includes the ability to
generate Non-Maskable Interrupts (NMIs), microcontroller
resets, and system resets when the timeout value is
reached. The timeout value is programmable and ranges
from 210 to 226 processor clocks.
The watchdog timer is used to regain control when a
syste m has failed due to a software error or to failure of
an external device to respond in the expected way.
Software errors can sometimes be resolved by
recapturing control of the execution sequence via a
watchdog-timer-generated NMI. When an external
de vice fails to respond, or responds incor rectly, it ma y be
necessar y to reset the controller or the entire system,
including external devices. The watchdog timer provides
the fl exibility to su pp ort both NMI an d re set ge ne r at io n.