Analog Devices, Inc. reserves the right to change this product without
prior notice. Information furnished by Analog Devices is believed to be
accurate and reliable. However, no responsibility is assumed by Analog
Devices for its use; nor for any infringement of patents or other rights of
third parties which may result from its use. No license is granted by implication or otherwise under the patent rights of Analog Devices, Inc.
Trademark and Service Mark Notice
The Analog Devices logo, Blackfin, CROSSCORE, EZ-KIT Lite,
SHARC, TigerSHARC, and VisualDSP++ are registered trademarks of
Analog Devices, Inc.
All other brand and product names are trademarks or service marks of
their respective owners.
CONTENTS
PREFACE
Purpose of This Manual .................................................................. li
Intended Audience .......................................................................... li
Describes the general-purpose I/O ports, including the structure of
each port, multiplexing, configuring the pins, and generating
interrupts.
•Chapter 10, “General-Purpose Timers”
Describes the eight general-purpose timers.
•Chapter 11, “Core Timer”
Describes the core timer.
•Chapter 12, “Watchdog Timer”
Describes the watchdog timer.
•Chapter 13, “General-Purpose Counter”
Describes the Rotary (up/down) Counter. This counter provides
support for manually controlled rotary controllers, such as the volume wheel on a radio device. This unit also supports industrial or
motor-control type of wheels.
•Chapter 14, “PWM Controller”
Describes the The PWM controller—a flexible, programmable,
three-phase PWM waveform generator that can be programmed to
generate the required switching patterns to drive a three-phase voltage source inverter for ac induction motor (ACIM) or permanent
magnet synchronous motor (PMSM) control.
•Chapter 15, “UART Port Controllers”
Describes the Universal Asynchronous Receiver/Transmitter port
that converts data between serial and parallel formats. The UART
supports the half-duplex IrDA® SIR protocol as a mode-enabled
feature.
•Chapter 16, “Two Wire Interface Controller”
Describes the Two Wire Interface (TWI) controller, which allows a
device to interface to an Inter IC bus as specified by the Philips I2C
Bus Specification version 2.1 dated January 2000.
Describes the CAN module, a low bit rate serial interface intended
for use in applications where bit rates are typically up to 1Mbit/s.
•Chapter 18, “SPI-Compatible Port Controller”
Describes the Serial Peripheral Interface (SPI) port that provides an
I/O interface to a variety of SPI compatible peripheral devices.
•Chapter 19, “SPORT Controller”
Describes the independent, synchronous Serial Port Controller
which provides an I/O interface to a variety of serial peripheral
devices.
•Chapter 20, “Parallel Peripheral Interface”
Describes the Parallel Peripheral Interface (PPI) of the processor.
The PPI is a half-duplex, bidirectional port accommodating up to
16 bits of data and is used for digital video and data converter
applications.
•Chapter 21, “Removable Storage Interface”
Describes the RSI interface for multimedia cards (MMC), secure
digital memory cards (SD), secure digital input/output cards
(SDIO) and consumer electronic ATA devices (CE-ATA).
•Chapter 22, “ADC Control Module (ACM)”
Describes the ADC control module (ACM), which provides an
interface to synchronize the controls between the processor and the
internal analog-to-digital converter (ADC) module.
•Chapter 23, “Analog/Digital Converter (ADC)”
Describes the internal ADC, which is a dual, 12-bit, high speed,
low power, successive approximation ADC that operates from a
single 2.7 V to 5.25 V power supply and features throughput rates
up to 1.66 MSPS. The device contains two ADCs, each preceded
by a 3-channel multiplexer, and a low noise, wide bandwidth
track-and-hold amplifier that can handle input frequencies in
excess of 30 MHz.
Describes the booting methods, booting process and specific boot
modes for the processor.
•Chapter 25, “System Design”
Describes how to use the processor as part of an overall system. It
includes information about bus timing and latency numbers, semaphores, and a discussion of the treatment of unused pins.
•Appendix A, “System MMR Assignments”
Lists the memory-mapped registers included in this manual, their
addresses, and cross-references to text.
•Appendix B, “Test Features”
Describes test features for the processor, discusses the JTAG standard, boundary-scan architecture, instruction and boundary
registers, and public instructions.
This hardware reference is a companion document to the Blackfin
Processor Programming Reference.
What’s New in This Manual
This revision (1.0) is the third release of the ADSP-BF50x Blackfin Proces-
sor Hardware Reference. This revision corrects the following issues:
•Reset value for the PLL_CTL register in Chapter 8, “Dynamic
Power Management”
•Pin and port control information in Chapter 15, “UART Port
Controllers”
•Decoupling capacitor diagram in Chapter 25, “System Design”
The following is the list of Analog Devices, Inc. processors supported in
VisualDSP++®.
Blackfin (ADSP-BFxxx) Processors
The name Blackfin refers to a family of 16-bit, embedded processors.
VisualDSP++ currently supports the following Blackfin families
ADSP-BF50x, ADSP-BF51x, ADSP-BF52x, ADSP-BF53x, ADSP-BF54x,
and ADSP-BF561 processors.
TigerSHARC® (ADSP-TSxxx) Processors
The name TigerSHARC refers to a family of floating-point and fixed-point
[8-bit, 16-bit, and 32-bit] processors. VisualDSP++ currently supports the
following TigerSHARC families: ADSP-TS101 and ADSP-TS20x.
SHARC® (ADSP-21xxx) Processors
The name SHARC refers to a family of high-performance, 32-bit,
floating-point processors that can be used in speech, sound, graphics, and
imaging applications. VisualDSP++ currently supports the following
SHARC families: ADSP-2106x, ADSP-2116x, ADSP-2126x,
ADSP-2136x, ADSP-2137x, ADSP-2146x, ADSP-2147x, and
ADSP-2148x.
Product Information
Product information can be obtained from the Analog Devices Web site,
VisualDSP++ online Help system, and a technical library CD.
The Analog Devices Web site,www.analog.com, provides information
about a broad range of products—analog integrated circuits, amplifiers,
converters, and digital signal processors.
To access a complete technical library for each processor family, go to
http://www.analog.com/processors/technical_library. The manuals
selection opens a list of current manuals related to the product as well as a
link to the previous revisions of the manuals. When locating your manual
title, note a possible errata check mark next to the title that leads to the
current correction report against the manual.
Also note, MyAnalog.com is a free feature of the Analog Devices Web site
that allows customization of a Web page to display only the latest information about products you are interested in. You can choose to receive
weekly e-mail notifications containing updates to the Web pages that meet
your interests, including documentation errata against all manuals.
MyAnalog.com provides access to books, application notes, data sheets,
code examples, and more.
VisitMyAnalog.com to sign up. If you are a registered user, just log on.
Your user name is your e-mail address.
VisualDSP++ Online Documentation
Online documentation comprises the VisualDSP++ Help system, software
tools manuals, hardware tools manuals, processor manuals, Dinkum
Abridged C++ library, and FLEXnet License Tools software documentation. You can search easily across the entire VisualDSP++ documentation
set for any topic of interest.
For easy printing, supplementary Portable Documentation Format (.
files for all manuals are provided on the VisualDSP++ installation CD.
Each documentation file type is described as follows.
File Description
.chmHelp system files and manuals in Microsoft help format
Preface
.htm or
.html
.pdfVisualDSP++ and processor manuals in PDF format. Viewing and printing the
Dinkum Abridged C++ library and FLEXnet License Tools software documentation. Viewing and printing the
Explorer 6.0 (or higher).
.pdf files requires a PDF reader, such as Adobe Acrobat Reader (4.0 or higher).
.html files requires a browser, such as Internet
Technical Library CD
The technical library CD contains seminar materials, product highlights, a
selection guide, and documentation files of processor manuals, VisualDSP++ software manuals, and hardware tools manuals for the following
processor families: Blackfin, SHARC, TigerSHARC, ADSP-218x, and
ADSP-219x.
To order the technical library CD, go to http://www.analog.com/proces-
sors/technical_library, navigate to the manuals page for your
processor, click the request CD check mark, and fill out the order form.
Data sheets, which can be downloaded from the Analog Devices Web site,
change rapidly, and therefore are not included on the technical library
CD. Technical manuals change periodically. Check the Web site for the
latest manual revisions and associated documentation errata.
EngineerZone
EngineerZone is a technical support forum from Analog Devices. It allows
you direct access to ADI technical support engineers. You can search
FAQs and technical information to get quick answers to your embedded
processing and DSP design questions.
Use EngineerZone to connect with other DSP developers who face similar
design challenges. You can also use this open forum to share knowledge
and collaborate with the ADI support team and your peers. Visit
http://ez.analog.com to sign up.
Social Networking Web Sites
You can now follow Analog Devices Blackfin development on Twitter and
LinkedIn. To access:
•Twitter:
http://twitter.com/blackfin
•LinkedIn: Network with the LinkedIn group, Analog Devices
Blackfin: http://www.linkedin.com
Notation Conventions
Text conventions used in this manual are identified and described as follows. Additional conventions, which apply only to specific chapters, may
appear throughout this document.
ExampleDescription
Close command
(File menu)
{this | that}Alternative required items in syntax descriptions appear within curly
[this | that]Optional items in syntax descriptions appear within brackets and sepa-
[this,…]Optional item lists in syntax descriptions appear within brackets delim-
Titles in reference sections indicate the location of an item within the
VisualDSP++ environment’s menu system (for example, the Close command appears on the File menu).
brackets and separated by vertical bars; read the example as
One or the other is required.
rated by vertical bars; read the example as an optional
ited by commas and terminated with an ellipse; read the example as an
optional comma-separated list of
.SECTIONCommands, directives, keywords, and feature names are in text with let-
ter gothic font.
filenameNon-keyword placeholders appear in text with italic style format.
Note: For correct operation, ...
A Note provides supplementary information on a related topic. In the
online version of this book, the word Note appears instead of this symbol.
Caution: Incorrect device operation may result if ...
Caution: Device damage may result if ...
A Caution identifies conditions or inappropriate usage of the product that
could lead to undesirable results or product damage. In the online version
of this book, the word Caution appears instead of this symbol.
Warning: Injury to device users may result if ...
A Warning identifies conditions or inappropriate usage of the product
that could lead to conditions that are potentially hazardous for the devices
users. In the online version of this book, the word War ni ng appears
instead of this symbol.
The ADSP-BF50x processors are members of the Blackfin processor family that offer significant high performance and low power features while
retaining their ease-of-use benefits. The ADSP-BF504, ADSP-BF504F,
and ADSP-BF506F processors have differing peripheral features. For
details, see Table 1-1. Note that the ADSP-BF504 and ADSP-BF504F are
pin-compatible.
This hardware reference is a companion document to the Blackfin
Processor Programming Reference.
General Description of Processor
The ADSP-BF50x processor is a member of the Blackfin® family of products, incorporating the Analog Devices/Intel Micro Signal Architecture
(MSA). Blackfin processors combine a dual-MAC state-of-the-art signal
processing engine, the advantages of a clean, orthogonal RISC-like microprocessor instruction set, and single-instruction, multiple-data (SIMD)
multimedia capabilities into a single instruction-set architecture.
The ADSP-BF50x processor is completely code compatible with other
Blackfin processors. ADSP-BF50x processors offer performance up to
400 MHz and reduced static power consumption. The processor features
are shown in Table 1-1.
By integrating a rich set of industry-leading system peripherals and memory, Blackfin processors are the platform of choice for next-generation
applications that require RISC-like programmability, multimedia support,
and leading-edge signal processing in one integrated package.
Blackfin processors provide world-class power management and performance. They are produced with a low-power and low-voltage design
methodology and feature on-chip dynamic power management, which
provides the ability to vary both the voltage and frequency of operation to
significantly lower overall power consumption. This capability can result
in a substantial reduction in power consumption, compared with just
varying the frequency of operation. This allows longer battery life for
portable appliances.
System Integration
The ADSP-BF50x processors are highly integrated system-on-a-chip solutions for the next generation of embedded industrial, instrumentation,
and power/motion control applications. By combining industry-standard
interfaces with a high-performance signal processing core, cost-effective
applications can be developed quickly, without the need for costly external
components. The system peripherals include a watchdog timer; two 32-bit
up/down counters with rotary support; eight 32-bit timers/ counters with
PWM support; two pairs of three-phase 16-bit center-based PWM units;
two dual-channel, full-duplex synchronous serial ports (SPORTs); two
serial peripheral interface (SPI) compatible ports; two UARTs with IrDA
support; a parallel peripheral interface (PPI); a removable storage interface
(RSI) controller; an internal ADC with 12 channels, 12 bits, up to 2
MSPS, an ACM controller; a controller area network (CAN) controller; a
two-wire interface (TWI) controller; and an internal 32M bit flash.
The ADSP-BF50x processors contain a rich set of peripherals connected
to the core via several high-bandwidth buses, providing flexibility in system configuration as well as excellent overall system performance. (See
Figure 1-1.) Most of the peripherals are supported by a flexible DMA
structure. There are also two separate memory DMA channels dedicated
to data transfers between the processor’s memory spaces. Multiple on-chip
buses provide enough bandwidth to keep the processor core running even
when there is also activity on all of the on-chip and external peripherals.
Figure 1-1. ADSP-BF50x Processor Block Diagram
Memory Architecture
The Blackfin processor architecture structures memory as a single, unified
4G byte address space using 32-bit addresses. All resources, including
internal memory, external memory, and I/O control registers, occupy separate sections of this common address space. The memory portions of this
address space are arranged in a hierarchical structure to provide a good
cost/performance balance of some very fast, low latency on-chip memory
as cache or SRAM, and larger, lower cost and lower performance off-chip
memory systems. Table 1-2 shows the memory for the ADSP-BF50x
processors.
Table 1-2. Memory Configurations
Type of MemoryADSP-BF50x
Instruction SRAM/cache, lockable by way or line 16K byte
Instruction SRAM16K byte
Data SRAM/cache16K byte
Data SRAM16K byte
Data scratchpad SRAM4K byte
L3 Boot ROM4K byte
Total72K byte
The L1 memory system is the primary highest performance memory available to the core. The off-chip memory system, accessed through the
external bus interface unit (EBIU), provides expansion with flash memory
on the ADSP-BF504F and ADSP-BF506F processors.
The memory DMA controller provides high bandwidth data movement
capability. It can perform block transfers of code or data between the
internal memory and the external memory spaces.
The processor has three blocks of on-chip memory that provide high
bandwidth access to the core:
•L1 instruction memory, consisting of SRAM and a 4-way set-associative cache. This memory is accessed at full processor speed.
•L1 data memory, consisting of SRAM and/or a 2-way set-associative cache. This memory block is accessed at full processor speed.
•L1 scratchpad RAM, which runs at the same speed as the L1 memories but is only accessible as data SRAM and cannot be configured
as cache memory.
External Memory
External memory is accessed via the EBIU memory port. This 16-bit
interface provides a glue-less connection to the internal flash memory and
boot ROM. The EBIU on the processor interfaces with an internal flash
memory on the ADSP-BF504F and ADSP-BF506F devices. The internal
chip flash memory is a 32M bit (×16, multiple bank, burst) memory. The
features of this memory include:
•Any combination of blocks can be locked or locked down
•Security
•128-bit user programmable OTP cells
•64-bit unique device number
•Common flash interface (CFI)
•100 000 program/erase cycles per block
Flash memory ships from the factory in an erased state except for block 0
of the parameter bank. Block 0 of the flash memory parameter bank ships
from the factory in an unknown state. An erase operation should be performed prior to programming this block.
I/O Memory Space
Blackfin processors do not define a separate I/O space. All resources are
mapped through the flat 32-bit address space. Control registers for
on-chip I/O devices are mapped into memory-mapped registers (MMRs)
at addresses near the top of the 4G byte address space. These are separated
into two smaller blocks: one contains the control MMRs for all core functions and the other contains the registers needed for setup and control of
the on-chip peripherals outside of the core. The MMRs are accessible only
in supervisor mode. They appear as reserved space to on-chip peripherals.
The processor has multiple, independent DMA channels that support
automated data transfers with minimal overhead for the processor core.
DMA transfers can occur between the processor’s internal memories and
any of its DMA-capable peripherals. Additionally, DMA transfers can be
accomplished between any of the DMA-capable peripherals and external
devices connected to the external memory interface. DMA-capable
peripherals include the SPORTs, SPI ports, UARTs, RSI, and PPI. Each
individual DMA-capable peripheral has at least one dedicated DMA
channel.
The processor DMA controller supports both one-dimensional (1-D) and
two-dimensional (2-D) DMA transfers. DMA transfer initialization can
be implemented from registers or from sets of parameters called descriptor
blocks.
The 2-D DMA capability supports arbitrary row and column sizes up to
64K elements by 64K elements, and arbitrary row and column step sizes
up to ±32K elements. Furthermore, the column step size can be less than
the row step size, allowing implementation of interleaved data streams.
This feature is especially useful in video applications where data can be
de-interleaved on the fly.
Examples of DMA types supported by the processor DMA controller
include:
•A single, linear buffer that stops upon completion
•A circular, auto-refreshing buffer that interrupts on each full or
fractionally full buffer
•1-D or 2-D DMA using a linked list of descriptors
•2-D DMA using an array of descriptors, specifying only the base
DMA address within a common page
In addition to the dedicated peripheral DMA channels, there are two
memory DMA channels, which are provided for transfers between the various memories of the processor system with minimal processor
intervention. Memory DMA transfers can be controlled by a very flexible
descriptor-based methodology or by a standard register-based autobuffer
mechanism.
General-Purpose I/O (GPIO)
Because of the rich set of peripherals, the processor groups the many
peripheral signals to three ports—Port F, Port G, and Port H. Most of the
associated pins are shared by multiple signals. The ports function as multiplexer controls.
The processor has 35 bidirectional, general-purpose I/O (GPIO) pins allocated across three separate GPIO modules—PORTFIO, PORTGIO, and
PORTHIO, associated with Port F, Port G, and Port H, respectively.
Each GPIO-capable pin shares functionality with other processor peripherals via a multiplexing scheme; however, the GPIO functionality is the
default state of the device upon power-up. Neither GPIO output nor
input drivers are active by default. Each general-purpose port pin can be
individually controlled by manipulation of the port control, status, and
interrupt registers:
•GPIO direction control register – Specifies the direction of each
individual GPIO pin as input or output.
•GPIO control and status registers – The processor employs a “write
one to modify” mechanism that allows any combination of individual GPIO pins to be modified in a single instruction, without
affecting the level of any other GPIO pins. Four control registers
are provided. One register is written in order to set pin values, one
register is written in order to clear pin values, one register is written
in order to toggle pin values, and one register is written in order to
specify a pin value. Reading the GPIO status register allows software to interrogate the sense of the pins.
•GPIO interrupt mask registers – The two GPIO interrupt mask
registers allow each individual GPIO pin to function as an interrupt to the processor. Similar to the two GPIO control registers
that are used to set and clear individual pin values, one GPIO
interrupt mask register sets bits to enable interrupt function, and
the other GPIO interrupt mask register clears bits to disable interrupt function. GPIO pins defined as inputs can be configured to
generate hardware interrupts, while output pins can be triggered by
software interrupts.
•GPIO interrupt sensitivity registers – The two GPIO interrupt sensitivity registers specify whether individual pins are level- or
edge-sensitive and specify—if edge-sensitive—whether just the rising edge or both the rising and falling edges of the signal are
significant. One register selects the type of sensitivity, and one register selects which edges are significant for edge-sensitivity.
Two-Wire Interface
The Two-Wire Interface (TWI) is fully compatible with the widely used
I2C bus standard. It was designed with a high level of functionality and is
compatible with multi-master, multi-slave bus configurations. To preserve
processor bandwidth, the TWI controller can be set up and a transfer initiated with interrupts only to service FIFO buffer data reads and writes.
Protocol related interrupts are optional.
The TWI externally moves 8-bit data while maintaining compliance with
2
the I
C bus protocol. The Philips I2C Bus Specification version 2.1 covers
many variants of I2C. The TWI controller includes these features:
•Simultaneous master and slave operation on multiple device
systems
•Support for multi-master data arbitration
•7-bit addressing
•100K bits/second and 400K bit/second data rates
•General call address support
•Master clock synchronization and support for clock low extension
•Separate multiple-byte receive and transmit FIFOs
•Low interrupt rate
•Individual override control of data and clock lines in the event of
bus lock-up
•Input filter for spike suppression
•Serial camera control bus support as specified in the OmniVision
Serial Camera Control Bus (SCCB) Functional Specification
version 2.1
RSI Interface
The removable storage interface (RSI) controller acts as the host interface
for multi-media cards (MMC), secure digital memory cards (SD Card),
secure digital input/output cards (SDIO), and CE-ATA hard disk drives.
The following list describes the main features of the RSI controller:
•Support for a single MMC, SD memory, SDIO card or CE-ATA
hard disk drive
•Support for 1-bit and 4-bit SD modes
•Support for 1-bit, 4-bit and 8-bit MMC modes
•Support for 4-bit and 8-bit CE-ATA hard disk drives
•A ten-signal external interface with clock, command, and up to
eight data lines
•Card detection using one of the data signals
•Card interface clock generation from SCLK
•SDIO interrupt and read wait features
•CE-ATA command completion signal recognition and disable
General-Purpose (GP) Counter
Two 32-bit GP counters are provided that can sense 2-bit quadrature or
binary codes as typically emitted by industrial drives or manual thumb
wheels. Each counter can also operate in general-purpose up/down count
modes. Then, count direction is either controlled by a level-sensitive input
signal or by two edge detectors. A third input can provide flexible zero
marker support and can alternatively be used to input the push-button signal of thumb wheels. All three signals have a programmable debouncing
circuit. An internal signal forwarded to the GP timer unit enables one
timer to measure the intervals between count events. Boundary registers
enable auto-zero operation or simple system warning by interrupts when
programmable count values are exceeded.
The processors integrate two flexible and programmable 3-phase PWM
waveform generators that can each be programmed to generate the
required switching patterns to drive a 3-phase voltage source inverter for
ac induction (ACIM) or permanent magnet synchronous (PMSM) motor
control. In addition, each PWM block contains special functions that considerably simplify the generation of the required PWM switching patterns
for control of the electronically commutated motor (ECM) or brushless dc
motor (BDCM). Software can enable a special mode for switched reluctance motors (SRM).
Features of each 3-phase PWM generation unit are:
•16-bit center-based PWM generation unit
•Programmable PWM pulse width
•Single/double update modes
•Programmable dead time and switching frequency
•Twos-complement implementation which permits smooth transition to full ON and full OFF states
•Possibility to synchronize the PWM generation to an external
synchronization
•Special provisions for BDCM operation (crossover and output
enable functions)
•Wide variety of special switched reluctance (SR) operating modes
The six PWM output signals in each PWM controller consist of three
high-side drive signals (
drive signals (PWM_AL, PWM_BL, and PWM_CL). The polarity of the generated
PWM signal can be set with software, so that either active high or active
low PWM patterns can be produced. The switching frequency of the generated PWM pattern is programmable. The PWM generator can operate
in single update mode or double update mode. In single update mode the
duty cycle values are programmable only once per PWM period, so that
the resultant PWM patterns are symmetrical about the midpoint of the
PWM period. In the double update mode, a second updating of the PWM
registers is implemented at the midpoint of the PWM period. In this
mode, it is possible to produce asymmetrical PWM patterns that produce
lower harmonic distortion in 3-phase PWM inverters.
PWM_AH, PWM_BH, and PWM_CH) and three low-side
Parallel Peripheral Interface
The processor provides a Parallel Peripheral Interface (PPI) that can connect directly to parallel A/D and D/A converters, ITU-R 601/656 video
encoders and decoders, and other general-purpose peripherals. The PPI
consists of a dedicated input clock pin and three multiplexed frame sync
pins. The input clock supports parallel data rates up to half the system
clock rate.
In ITU-R 656 modes, the PPI receives and parses a data stream of 8-bit or
10-bit data elements. On-chip decode of embedded preamble control and
synchronization information is supported.
•Active video only - The PPI does not read in any data between the
End of Active Video (EAV) and Start of Active Video (SAV) preamble symbols, or any data present during the vertical blanking
intervals. In this mode, the control byte sequences are not stored to
memory; they are filtered by the PPI.
•Vertical blanking only - The PPI only transfers Vertical Blanking
Interval (VBI) data, as well as horizontal blanking information and
control byte sequences on VBI lines.
•Entire field - The entire incoming bit stream is read in through the
PPI. This includes active video, control preamble sequences, and
ancillary data that may be embedded in horizontal and vertical
blanking intervals.
Though not explicitly supported, ITU-R 656 output functionality can be
achieved by setting up the entire frame structure (including active video,
blanking, and control information) in memory and streaming the data out
the PPI in a frame sync-less mode. The processor’s 2-D DMA features
facilitate this transfer by allowing the static frame buffer (blanking and
control codes) to be placed in memory once, and simply updating the
active video information on a per-frame basis.
The general-purpose modes of the PPI are intended to suit a wide variety
of data capture and transmission applications. The modes are divided into
four main categories, each allowing up to 16 bits of data transfer per
PPI_CLK cycle:
•Data receive with internally generated frame syncs
•Data receive with externally generated frame syncs
•Data transmit with internally generated frame syncs
•Data transmit with externally generated frame syncs
These modes support ADC/DAC connections, as well as video communication with hardware signalling. Many of the modes support more than
one level of frame synchronization. If desired, a programmable delay can
be inserted between assertion of a frame sync and reception/transmission
of data.
SPORT Controllers
The processor incorporates two dual-channel synchronous serial ports
(SPORT0 and SPORT1) for serial and multiprocessor communications.
The SPORTs support these features:
•Bidirectional, I2S capable operation
Each SPORT has two sets of independent transmit and receive
pins, which enable eight channels of I2S stereo audio.
•Buffered (eight-deep) transmit and receive ports
Each port has a data register for transferring data words to and
from other processor components and shift registers for shifting
data in and out of the data registers.
•Clocking
Each transmit and receive port can either use an external serial
clock or can generate its own in a wide range of frequencies.
•Word length
Each SPORT supports serial data words from 3 to 32 bits in
length, transferred in most significant bit first or least significant
bit first format.
Each transmit and receive port can run with or without frame sync
signals for each data word. Frame sync signals can be generated
internally or externally, active high or low, and with either of two
pulse widths and early or late frame sync.
•Companding in hardware
Each SPORT can perform A-law or µ-law companding according
to ITU recommendation G.711. Companding can be selected on
the transmit and/or receive channel of the SPORT without additional latencies.
•DMA operations with single cycle overhead
Each SPORT can automatically receive and transmit multiple buffers of memory data. The processor can link or chain sequences of
DMA transfers between a SPORT and memory.
•Interrupts
Each transmit and receive port generates an interrupt upon completing the transfer of a data word or after transferring an entire
data buffer or buffers through DMA.
•Multichannel capability
Each SPORT supports 128 channels out of a 1024-channel window and is compatible with the H.100, H.110, MVIP-90, and
HMVIP standards.
The processor has two SPI-compatible ports that enable the processor to
communicate with multiple SPI-compatible devices.
Each SPI interface uses three pins for transferring data: two data pins and
a clock pin. An SPI chip select input pin lets other SPI devices select the
processor, and several SPI chip select output pins let the processor select
other SPI devices. The SPI select pins are reconfigured general-purpose
I/O pins. Using these pins, the SPI port provides a full-duplex, synchronous serial interface, which supports both master and slave modes and
multimaster environments.
Each SPI port’s baud rate and clock phase/polarities are programmable,
and it has an integrated DMA controller, configurable to support either
transmit or receive data streams. The SPI’s DMA controller can only service unidirectional accesses at any given time.
During transfers, the SPI port simultaneously transmits and receives by
serially shifting data in and out of its two serial data lines. The serial clock
line synchronizes the shifting and sampling of data on the two serial data
lines.
Timers
There are nine general-purpose programmable timer units in the processor. Eight timers have an external pin that can be configured either as a
Pulse Width Modulator (PWM) or timer output, as an input to clock the
timer, or as a mechanism for measuring pulse widths of external events.
These timer units can be synchronized to an external clock input connected to the TMRCLK/PPI_CLK pin or to the internal SCLK.
The timer units can be used in conjunction with the UARTs to measure
the width of the pulses in the datastream to provide an autobaud detect
function for a serial channel.
The timers can generate interrupts to the processor core to provide periodic events for synchronization, either to the processor clock or to a count
of external signals.
In addition to the eight general-purpose programmable timers, a 9th timer
is also provided. This extra timer is clocked by the internal processor clock
and is typically used as a system tick clock for generation of operating system periodic interrupts.
UART Ports
The ADSP-BF50x Blackfin processors provide two full-duplex universal
asynchronous receiver/transmitter (UART) ports. Each UART port provides a simplified UART interface to other peripherals or hosts, enabling
full-duplex, DMA-supported, asynchronous transfers of serial data. A
UART port includes support for five to eight data bits, one or two stop
bits, and none, even, or odd parity. Each UART port supports two modes
of operation:
•PIO (programmed I/O). The processor sends or receives data by
writing or reading I/O-mapped UART registers. The data is double-buffered on both transmit and receive.
•DMA (direct memory access). The DMA controller transfers both
transmit and receive data. This reduces the number and frequency
of interrupts required to transfer data to and from memory. Each
UART has two dedicated DMA channels, one for transmit and one
for receive. These DMA channels have lower default priority than
most DMA channels because of their relatively low service rates.
Flexible interrupt timing options are available on the transmit side.
Each UART port’s baud rate, serial data format, error code generation and
status, and interrupts are programmable:
•Supporting bit rates ranging from (f
/1,048,576) to (f
SCLK
SCLK
)
bits per second.
•Supporting data formats from 7 to 12 bits per frame.
•Both transmit and receive operations can be configured to generate
maskable interrupts to the processor.
The UART port’s clock rate is calculated as
Where the 16-bit UART divisor comes from the UARTx_DLH register (most
significant 8 bits) and UARTx_DLL register (least significant eight bits), and
the EDBO is a bit in the UARTx_GCTL register.
In conjunction with the general-purpose timer functions, autobaud detection is supported.
The UARTs feature a pair of
UAx_RTS (request to send) and UAx_CTS (clear
to send) signals for hardware flow purposes. The transmitter hardware is
automatically prevented from sending further data when the UAx_CTS
input is deasserted. The receiver can automatically deassert its
UAx_RTS output when the enhanced receive FIFO exceeds a certain
high-water level. The capabilities of the UARTs are further extended with
support for the Infrared Data Association (IrDA®) Serial Infrared Physical Layer Link Specification (SIR) protocol.
The ADSP-BF50x processors provide a CAN controller that is a communication controller implementing the Controller Area Network (CAN)
V2.0B protocol. This protocol is an asynchronous communications protocol used in both industrial and automotive control systems. CAN is well
suited for control applications due to its capability to communicate reliably over a network since the protocol incorporates CRC checking,
message error tracking, and fault node confinement.
The CAN controller is based on a 32-entry mailbox RAM and supports
both the standard and extended identifier (ID) message formats specified
in the CAN protocol specification, revision 2.0, part B.
Each mailbox consists of eight 16-bit data words. The data is divided into
fields, which includes a message identifier, a time stamp, a byte count, up
to 8 bytes of data, and several control bits. Each node monitors the messages being passed on the network. If the identifier in the transmitted
message matches an identifier in one of its mailboxes, the module knows
that the message was meant for it, passes the data into its appropriate
mailbox, and signals the processor of message arrival with an interrupt.
The CAN controller can wake up the processor from sleep mode upon
generation of a wake-up event, such that the processor can be maintained
in a low-power mode during idle conditions. Additionally, a CAN
wake-up event can wake up the on-chip internal voltage regulator from
the powered-down hibernate state.
The electrical characteristics of each network connection are very stringent. Therefore, the CAN interface is typically divided into two parts: a
controller and a transceiver. This allows a single controller to support different drivers and CAN networks. The ADSP-BF50x CAN module
represents the controller part of the interface. This module’s network I/O
is a single transmit output and a single receive input, which connect to a
line transceiver.
The CAN clock is derived from the processor system clock (SCLK)
through a programmable divider and therefore does not require an additional crystal.
ACM Interface
The ADC control module (ACM) provides an interface that synchronizes
the controls between the processor and analog-to-digital converter (ADC)
modules like the internal ADC of the ADSP-BF506F. The analog-to-digital conversions are initiated by the processor, based on external or internal
events.
The ACM allows for flexible scheduling of sampling instants and provides
precise sampling signals to the ADC. The ACM synchronizes the ADC
conversion process; generating the ADC controls, the ADC conversion
start signal, and other signals. The actual data acquisition from the ADC
is done by SPORT peripherals.
Internal ADC
The ADSP-BF506F processor includes an ADC. All internal ADC signals
are connected out to package pins to enable maximum flexibility in mixed
signal applications.
The internal ADC is a dual, 12-bit, high speed, low power, successive
approximation ADC that operates from a single 2.7 V to 5.25 V power
supply and features throughput rates up to 2 MSPS. The device contains
two ADCs, each preceded by a 3-channel multiplexer, and a low noise,
wide bandwidth track-and-hold amplifier that can handle input frequencies in excess of 30 MHz.
The processor includes a 32-bit timer that can be used to implement a
software watchdog function. A software watchdog can improve system
availability by forcing the processor to a known state through generation
of a hardware reset, nonmaskable interrupt (NMI), or general-purpose
interrupt, if the timer expires before being reset by software. The programmer initializes the count value of the timer, enables the appropriate
interrupt, then enables the timer. Thereafter, the software must reload the
counter before it counts to zero from the programmed value. This protects
the system from remaining in an unknown state where software that
would normally reset the timer has stopped running due to an external
noise condition or software error.
If configured to generate a hardware reset, the watchdog timer resets both
the CPU and the peripherals. After a reset, software can determine if the
watchdog was the source of the hardware reset by interrogating a status bit
in the watchdog control register.
The timer is clocked by the system clock (SCLK), at a maximum frequency
of f
SCLK
.
Clock Signals
The processor can be clocked by an external crystal, a sine wave input, or a
buffered, shaped clock derived from an external clock oscillator.
This external clock connects to the processor’s CLKIN pin. The CLKIN input
cannot be halted, changed, or operated below the specified frequency during normal operation. This clock signal should be a TTL-compatible
signal.
The core clock (
the input clock (
capable of multiplying the
CCLK) and system peripheral clock (SCLK) are derived from
CLKIN) signal. An on-chip Phase Locked Loop (PLL) is
CLKIN signal by a user-programmable (0.5× to
Dynamic Power Management
64×) multiplication factor (bounded by specified minimum and maximum
VCO frequencies). The default multiplier is 6×, but it can be modified
by a software instruction sequence. On-the-fly frequency changes can be
made by simply writing to the PLL_DIV register.
All on-chip peripherals are clocked by the system clock (SCLK). The system
clock frequency is programmable by means of the SSEL[3:0] bits of the
PLL_DIV register.
Dynamic Power Management
The processor provides five operating modes, each with a different performance/power profile. In addition, dynamic power management provides
the control functions to dynamically alter the processor core supply voltage, further reducing power dissipation. When configured for a 0 volt core
supply voltage, the processor enters the hibernate state. Control of clocking to each of the processor peripherals also reduces power consumption.
See Table 1-3 for a summary of the power settings for each mode.
Full-On Operating Mode—Maximum Performance
In the full-on mode, the PLL is enabled and is not bypassed, providing
capability for maximum operational frequency. This is the power-up
default execution state in which maximum performance can be achieved.
The processor core and all enabled peripherals run at full speed.
Active Operating Mode—Moderate Dynamic
Power Savings
In the active mode, the PLL is enabled but bypassed. Because the PLL is
bypassed, the processor’s core clock (CCLK) and system clock (SCLK) run
at the input clock (CLKIN) frequency. DMA access is available to appropriately configured L1 memories.
In the active mode, it is possible to disable the control input to the PLL by
setting the PLL_OFF bit in the PLL control register. This register can be
accessed with a user-callable routine in the on-chip ROM called
bfrom_SysControl(). If disabled, the PLL control input must be
re-enabled before transitioning to the full-on or sleep modes.
Table 1-3. Power Settings
Mode/State PLLPLL BypassedCore Clock
(CCLK)
Full OnEnabledNoEnabledEnabledOn
ActiveEnabled/DisabledYesEnabledEnabledOn
SleepEnabled—DisabledEnabledOn
Deep SleepDisabled—DisabledDisabledOn
HibernateDisabled—DisabledDisabledOff
System Clock
(SCLK)
Core Power
For more information about PLL controls, see the “Dynamic Power Man-
agement” on page 8-1.
Sleep Operating Mode—High Dynamic Power
Savings
The sleep mode reduces dynamic power dissipation by disabling the clock
to the processor core (CCLK). The PLL and system clock (SCLK), however, continue to operate in this mode. Typically, an external event wakes
up the processor. When in the sleep mode, asserting a wakeup enabled in
the SIC_IWRx registers causes the processor to sense the value of the BYPASS
bit in the PLL control register (
sor transitions to the full on mode. If
transitions to the active mode.
DMA accesses to L1 memory are not supported in sleep mode.
Dynamic Power Management
Deep Sleep Operating Mode—Maximum Dynamic
Power Savings
The deep sleep mode maximizes dynamic power savings by disabling the
clocks to the processor core (CCLK) and to all synchronous peripherals
(SCLK). Asynchronous peripherals may still be running but cannot access
internal resources or external memory. Deep sleep mode can be exited
only by a hardware reset event, by a wakeup event on a programmable flag
pin (including PH0, PF8, or PF9), or by a wakeup event on the programmable flag pin associated with the CAN_RX signal (PG1). A programmable flag
event causes the processor to transition to active mode, and execution
resumes at the program counter value at which the processor entered deep
sleep mode. Assertion of RESET while in deep sleep mode causes the processor to transition to the full on mode.
Hibernate State—Maximum Static Power Savings
The hibernate state maximizes static power savings by disabling the voltage and clocks to the processor core (CCLK) and to all of the peripherals
(SCLK). This setting sets the internal power supply voltage (V
DDINT
) to
0 V to provide the lowest static power dissipation. Any critical information stored internally (for example, memory contents, register contents,
and other information) must be written to a non-volatile storage device
prior to removing power if the processor state is to be preserved. Writing 0
to the HIBERNATEB bit causes EXT_WAKE to transition low, which can be
used to signal an external voltage regulator to shut down.
Since V
DDEXT
can still be supplied in this mode, all of the external pins
three-state, unless otherwise specified. This allows other devices that may
be connected to the processor to still have power applied without drawing
unwanted current.
The processor can be woken up by asserting the
RESET pin. All hibernate
wakeup events initiate the hardware reset sequence. Individual sources are
As long as V
ing hibernation. All other internal registers and memories, however, lose
their content in the hibernate state.
VR_CTL register. The EXT_WAKE signal indicates the occur-
DDEXT
is applied, the VR_CTL register maintains its state dur-
Instruction Set Description
The Blackfin processor family assembly language instruction set employs
an algebraic syntax designed for ease of coding and readability. Refer to
the Blackfin Processor Programming Reference for detailed information. The
instructions have been specifically tuned to provide a flexible, densely
encoded instruction set that compiles to a very small final memory size.
The instruction set also provides fully featured multifunction instructions
that allow the programmer to use many of the processor core resources in
a single instruction. Coupled with many features more often seen on
microcontrollers, this instruction set is very efficient when compiling C
and C++ source code. In addition, the architecture supports both user
(algorithm/application code) and supervisor (O/S kernel, device drivers,
debuggers, ISRs) modes of operation, allowing multiple levels of access to
core resources.
The assembly language, which takes advantage of the processor’s unique
architecture, offers these advantages:
•Embedded 16/32-bit microcontroller features, such as arbitrary bit
and bit field manipulation, insertion, and extraction; integer operations on 8-, 16-, and 32-bit data types; and separate user and
supervisor stack pointers
•Seamlessly integrated DSP/CPU features optimized for both 8-bit
and 16-bit operations
•A multi-issue load/store modified Harvard architecture, which supports two 16-bit MAC or four 8-bit ALU + two load/store + two
pointer updates per cycle
•All registers, I/O, and memory mapped into a unified 4G byte
memory space, providing a simplified programming model
Code density enhancements include intermixing of 16- and 32-bit
instructions with no mode switching or code segregation. Frequently used
instructions are encoded in 16 bits.
Development Tools
The processor is supported with a complete set of CROSSCORE® software and hardware development tools, including Analog Devices
emulators and the VisualDSP++ development environment. The same
emulator hardware that supports other Analog Devices products also fully
emulates the Blackfin processor family.
The VisualDSP++ project management environment lets programmers
develop and debug an application. This environment includes an
easy-to-use assembler that is based on an algebraic syntax, an archiver
(librarian/library builder), a linker, a loader, a cycle-accurate instruction-level simulator, a C/C++ compiler, and a C/C++ runtime library that
includes DSP and mathematical functions. A key point for these tools is
C/C++ code efficiency. The compiler has been developed for efficient
translation of C/C++ code to Blackfin processor assembly. The Blackfin
processor has architectural features that improve the efficiency of compiled C/C++ code.
Debugging both C/C++ and assembly programs with the VisualDSP++
debugger, programmers can:
•View mixed C/C++ and assembly code (interleaved source and
object information)
•Insert breakpoints
•Set conditional breakpoints on registers, memory, and stacks
•Trace instruction execution
•Perform linear or statistical profiling of program execution
•Fill, dump, and graphically plot the contents of memory
•Perform source level debugging
•Create custom debugger windows
The VisualDSP++ Integrated Development and Debugging Environment
(IDDE) lets programmers define and manage software development. Its
dialog boxes and property pages let programmers configure and manage all
development tools, including color syntax highlighting in the VisualDSP++ editor. These capabilities permit programmers to:
•Control how the development tools process inputs and generate
outputs
•Maintain a one-to-one correspondence with the tool’s command-line switches
The VisualDSP++ Kernel (VDK) incorporates scheduling and resource
management tailored specifically to address the memory and timing constraints of DSP programming. These capabilities enable engineers to
develop code more effectively, eliminating the need to start from the very
beginning, when developing new application code. The VDK features
include threads, critical and unscheduled regions, semaphores, events, and
device flags. The VDK also supports priority-based, pre-emptive,
cooperative and time-sliced scheduling approaches. In addition, the VDK
was designed to be scalable. If the application does not use a specific feature, the support code for that feature is excluded from the target system.
Because the VDK is a library, a developer can decide whether to use it or
not. The VDK is integrated into the VisualDSP++ development environment but can also be used with standard command-line tools. The VDK
development environment assists in managing system resources, automating the generation of various VDK-based objects, and visualizing the
system state during application debug.
Analog Devices emulators use the IEEE 1149.1 JTAG test access port of
the processor to monitor and control the target board processor during
emulation. The emulator provides full speed emulation, allowing inspection and modification of memory, registers, and processor stacks.
Nonintrusive in-circuit emulation is assured by the use of the processor’s
JTAG interface—the emulator does not affect target system loading or
timing.
In addition to the software and hardware development tools available
from Analog Devices, third parties provide a wide range of tools supporting the Blackfin processor family. Hardware tools include the
ADSP-BF50x EZ-KIT Lite standalone evaluation/development cards.
Third party software tools include DSP libraries, real-time operating systems, and block diagram design tools.
This chapter discusses memory population specific to the ADSP-BF50x
processors. Functional memory architecture is described in the Blackfin Processor Programming Reference.
Memory Architecture
Figure 2-1 provides an overview of the ADSP-BF50x processor system
memory map. For a detailed discussion of how to use them, see the Black-fin Processor Programming Reference.
Note the architecture does not define a separate I/O space. All resources
are mapped through the flat 32-bit address space. The memory is
byte-addressable.
The upper portion of internal memory space is allocated to the core and
system MMRs. Accesses to this area are allowed only when the processor is
in supervisor or emulation mode (see the Operating Modes and States
chapter of the Blackfin Processor Programming Reference).
The processor core reads the instruction memory through the 64-bit wide
instruction fetch bus. All addresses from this bus are 64-bit aligned. Each
instruction fetch can return any combination of 16-, 32-, or 64-bit
instructions (for example, four 16-bit instructions, two 16-bit instructions
and one 32-bit instruction, or one 64-bit instruction).
When data cache is enabled (controlled by bits DMC[1:0] in the
DMEM_CONTROL register), 16K byte of data bank A can be set to serve as
cache.
Boot ROM
There are 4K bytes of memory space occupied by the boot ROM, starting
from address 0xEF00 0000. This 16-bit boot ROM is not part of the L1
memory module. Read accesses take one SCLK cycle and no wait states are
required. The read-only memory can be read by the core as well as by
DMA. It can be cached and protected by CPLD blocks like external memory. The boot ROM not only contains boot-strap loader code, it also
provides some subfunctions that are user-callable at runtime. For more
information, see “System Reset and Booting” in Chapter 24, System Reset
and Booting.
External Memory
External memory (shown in Figure 2-1) is accessed via the EBIU memory
port. This 16-bit interface provides a glue-less connection to the internal
flash memory (on ADSP-BF504F and ADSP-BF506F devices) and boot
ROM. Internal flash memory ships from the factory in an erased state
except for block 0 of the parameter bank.
Block 0 of the flash memory parameter bank ships from the factory
in an unknown state. An erase operation should be performed prior
to programming this block.
Valid only when DMC = 1. Determines whether
Address bit A[14] or A[23] is used to select the L1
data cache bank.
0 - Address bit 14 is used to select Bank A
for cache access. If bit 14 of address is 1,
select L1 Data Memory Data Bank A; if bit 14
of address is 0, no bank selected.
1 - Address bit 23 is used to select Bank A for
cache access. If bit 23 of address is 1, select
L1 Data Memory Data Bank A; if bit 23 of
address is 0, no bank selected.
0xFFE0 0004
For ADSP-BF50x:
0 - Data Bank A is SRAM,
also invalidates all
cache lines if previously
configured as cache
1 - Data Bank A is lower
16K byte SRAM, upper
16K byte cache
Data Memory Control Register (DMEM_CONTROL)
The complete set of memory-related MMRs is described in the Blackfin
Processor Programming Reference. Several MMRs have bit definitions spe-
cific to the processors described in this manual. These registers are
described in the following sections.
DMEM_CONTROL Register
The data memory control register (DMEM_CONTROL), shown in Figure 2-2,
contains control bits for the L1 data memory.
Memory
Figure 2-2. L1 Data Memory Control Register
Note that both DAG 0 and 1 use Port-A for non-cacheable fetches.
0 - Access Way0/Instruction bit 11 = 0
1 - Access Way1/Instruction bit 11 = 1
Data/Instruction Access
0 - Access Data
1 - Access Instruction
0 - Read access
1 - Write access
Array Access
0 - Access tag array
1 - Access data array
Double Word Index[1:0]
Selects one of four 64-bit
double words in a 256-bit line
Set Index[5:0]
Selects one of 64 sets
Data Cache Select/
Address Bit 14
15 14 13 12 11 10 9 87 6 5 4 3 2 1 0
XXXXXXXXX XXXXXXX
0xFFE0 0300
0 - Reserved when bit 24=0
1 - Select Data Cache Bank when bit 24=1
DTEST_COMMAND Register
When the data test command register (DTEST_COMMAND) is written to, the
L1 cache data or tag arrays are accessed, and the data is transferred
through the data test data registers (DTEST DATA[1:0]). This register is
shown in Figure 2-3.
Figure 2-3. Data Test Command Register
The data/instruction access bit allows direct access via the DTEST_COMMAND
MMR to L1 instruction SRAM.
Note that
ITEST_COMMAND must be used to access to L1 Instruction SRAM
This chapter discusses on-chip buses, how data moves through the system,
and other factors that determine the system organization. Following an
overview and a list of key features is a block diagram of the chip bus hierarchy and a description of its operation. The chapter concludes with
details about the system interconnects and associated system buses.
This chapter provides
•“Chip Bus Hierarchy Overview”
•“Interface Overview” on page 3-2
Chip Bus Hierarchy Overview
ADSP-BF50x Blackfin processors feature a powerful chip bus hierarchy on
which all data movement between the processor core, internal memory,
external memory, and its rich set of peripherals occurs. The chip bus hierarchy includes the controllers for system interrupts, test/emulation, and
clock and power management. Synchronous clock domain conversion is
provided to support clock domain transactions between the core and the
system.
•The peripheral set including GP timers and counters, ACM, TWI,
RSI, UARTs, SPORTs, SPIs, PPI, watchdog timer, and PWM
units. The ADSP-BF506F processor peripherals include an ADC
and a flash memory, and the ADSP-BF504F processor peripherals
include a flash memory (but does not include an ADC).
•The External Bus Interface Unit (EBIU)
•The Direct Memory Access (DMA) controller
•The interfaces between these, the system, and the optional external
(off-chip) resources
The following sections describe the on-chip interfaces between the system
and the peripherals via the:
•Peripheral Access Bus (PAB)
•DMA Access Bus (DAB)
•DMA Core Bus (DCB)
•DMA External Bus (DEB)
Interface Overview
Figure 3-1 shows the core processor and system boundaries as well as the
interfaces between them.
Internal Clocks
The core processor clock (CCLK) rate is highly programmable with respect
to
CLKIN. The CCLK rate is divided down from the Phase Locked Loop
(PLL) output rate. This divider ratio is set using the
PLL divide register.