ANALOG DEVICES W4.0 Service Manual

W4.0
Device Drivers and System Services Manual
for Blackfin® Processors
Analog Devices, Inc. One Technology Way Norwood, Mass. 02062-9106
Revision 1.0, February 2005
Part Number
82-000430-01
a
Copyright Information
©2005 Analog Devices, Inc., ALL RIGHTS RESERVED. This document may not be reproduced in any form without prior, express written consent from Analog Devices, Inc.
Printed in the USA.
Disclaimer
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 impli cation or otherwise under the patent rights of Analog Devices, Inc.
Trademark and Service Mark Notice
The Analog Devices logo, Blackfin, the Blackfin logo, 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 ................................................................ xvii
Intended Audience ........................................................................ xvii
Manual Contents Description ...................................................... xviii
Technical or Customer Support ...................................................... xix
Product Information ...................................................................... xix
MyAnalog.com .......................................................................... xx
Processor Product Information ................................................... xx
Related Documents .................................................................. xxi
Online Technical Documentation ............................................. xxi
Accessing Documentation From VisualDSP++ ..................... xxii
Accessing Documentation From Windows ........................... xxii
Accessing Documentation From the Web ........................... xxiii
Printed Manuals .................................................................... xxiii
VisualDSP++ Documentation Set ....................................... xxiv
Hardware Tools Manuals .................................................... xxiv
Processor Manuals .............................................................. xxiv
Data Sheets ........................................................................ xxiv
Notation Conventions ................................................................... xxv
Device Drivers and System Services Manual for Blackfin Processors iii
CONTENTS

INTRODUCTION

System Services Overview ............................................................. 1-2
Application Interface ............................................................... 1-5
Dependencies .......................................................................... 1-6
Initialization ........................................................................... 1-7
Termination ............................................................................ 1-9
System Services Directory and File Structure .......................... 1-10
Accessing the System Services API ..................................... 1-10
Linking in the System Services Library .............................. 1-12
Rebuilding the System Services Library ............................. 1-13
Examples .............................................................................. 1-15
Device Driver Overview .............................................................. 1-15
Application Interface ............................................................. 1-16
Device Driver Architecture .................................................... 1-17
Interaction with System Services ....................................... 1-18
Initialization ......................................................................... 1-19
Termination .......................................................................... 1-19
Device Driver Directory and File Structure ............................ 1-20
Accessing the Device Driver API ....................................... 1-20
Linking in the Device Driver Library ................................ 1-22
Rebuilding the Device Driver Library ................................ 1-23
Examples .............................................................................. 1-25
iv Device Drivers and System Services Manual for Blackfin Processors
CONTENTS

INTERRUPT MANAGER

Introduction ................................................................................. 2-2
Initialization ................................................................................. 2-4
Termination .................................................................................. 2-5
Core Event Controller Functions ................................................... 2-6
adi_int_CECHook() ................................................................ 2-6
adi_int_CECUnhook() ............................................................ 2-8
Interrupt Handlers .................................................................. 2-8
System Interrupt Controller Functions .......................................... 2-9
adi_int_SICDisable() ............................................................. 2-10
adi_int_SICEnable() .............................................................. 2-10
adi_int_SICGetIVG() ............................................................ 2-10
adi_int_SICInterruptAsserted() ............................................. 2-11
adi_int_SICSetIVG() ............................................................. 2-11
adi_int_SICWakeup() ............................................................ 2-11
Protecting Critical Regions .......................................................... 2-12
Modifying IMASK ...................................................................... 2-14
Examples .................................................................................... 2-15
File Structure .............................................................................. 2-16
Interrupt Manager API Reference ................................................ 2-17
Notation Conventions ........................................................... 2-17
adi_int_Init ........................................................................... 2-18
adi_int_Terminate ................................................................. 2-19
adi_int_CECHook ................................................................ 2-20
Device Drivers and System Services Manual for Blackfin Processors v
CONTENTS
adi_int_CECUnhook ............................................................ 2-22
adi_int_ClearIMaskBits ........................................................ 2-24
adi_int_EnterCriticalRegion .................................................. 2-26
adi_int_ExitCriticalRegion .................................................... 2-28
adi_int_SICDisable ............................................................... 2-29
adi_int_SICEnable ................................................................ 2-30
adi_int_SICGetIVG .............................................................. 2-31
adi_int_SICInterruptAsserted ................................................ 2-32
adi_int_SICSetIVG .............................................................. 2-33
adi_int_SetIMaskBits ............................................................ 2-34
adi_int_SICWakeup .............................................................. 2-36

POWER MANAGEMENT MODULE

Introduction ................................................................................. 3-2
PM Module Operation – Getting Started ...................................... 3-3
Power Management API Reference ................................................ 3-6
Notation Conventions ............................................................. 3-6
adi_pwr_AdjustFreq ................................................................ 3-7
adi_pwr_Control .................................................................... 3-9
adi_pwr_GetConfigSize ........................................................ 3-11
adi_pwr_GetFreq .................................................................. 3-12
adi_pwr_GetPowerMode ....................................................... 3-13
adi_pwr_GetPowerSaving ...................................................... 3-13
adi_pwr_Init ......................................................................... 3-14
adi_pwr_LoadConfig ............................................................ 3-18
vi Device Drivers and System Services Manual for Blackfin Processors
CONTENTS
adi_pwr_Reset ....................................................................... 3-19
adi_pwr_SaveConfig .............................................................. 3-20
adi_pwr_SetFreq ................................................................... 3-21
adi_pwr_SetMaxFreqForVolt ................................................. 3-23
adi_pwr_SetPowerMode ........................................................ 3-24
adi_pwr_SetVoltageRegulator ................................................ 3-26
Public Data Types and Enumerations ........................................... 3-30
ADI_PWR_COMMAND ..................................................... 3-31
ADI_PWR_COMMAND_PAIR ........................................... 3-35
ADI_PWR_CSEL ................................................................. 3-35
ADI_PWR_DF ..................................................................... 3-36
ADI_PWR_EZKIT ............................................................... 3-37
ADI_PWR_INPUT_DELAY ................................................. 3-37
ADI_PWR_OUTPUT_DELAY ............................................. 3-37
ADI_PWR_MODE .............................................................. 3-38
ADI_PWR_PACKAGE_KIND ............................................. 3-39
ADI_PWR_PCC133_COMPLIANCE .................................. 3-40
ADI_PWR_PROC_KIND .................................................... 3-41
ADI_PWR_RESULT ............................................................ 3-42
ADI_PWR_SSEL .................................................................. 3-44
ADI_PWR_VDDEXT .......................................................... 3-45
ADI_PWR_VLEV ................................................................. 3-46
ADI_PWR_VR_CANWE ..................................................... 3-47
ADI_PWR_VR_CKELOW ................................................... 3-48
Device Drivers and System Services Manual for Blackfin Processors vii
CONTENTS
ADI_PWR_VR_CLKBUFOE ............................................... 3-49
ADI_PWR_VR_FREQ ......................................................... 3-50
ADI_PWR_VR_GAIN ......................................................... 3-50
ADI_PWR_VR_PHYWE ..................................................... 3-50
ADI_PWR_VR_WAKE ........................................................ 3-51
PM Module Macros .................................................................... 3-51

EXTERNAL BUS INTERFACE UNIT MODULE

Introduction ................................................................................. 4-2
Using the EBIU Module ............................................................... 4-3
EBIU API Reference ..................................................................... 4-6
Notation Conventions ............................................................. 4-6
adi_ebiu_AdjustSDRAM ......................................................... 4-7
adi_ebiu_Control .................................................................... 4-8
adi_ebiu_GetConfigSize ........................................................ 4-11
adi_ebiu_Init ........................................................................ 4-12
adi_ebiu_LoadConfig ............................................................ 4-16
adi_ebiu_SaveConfig ............................................................ 4-17
Public Data Types and Enumerations .......................................... 4-18
ADI_EBIU_RESULT ........................................................... 4-19
ADI_EBIU_SDRAM_BANK_VALUE .................................. 4-21
ADI_EBIU_TIME ................................................................ 4-22
ADI_EBIU_TIMING_VALUE ............................................. 4-23
Setting Control Values in the EBIU Module ................................ 4-24
ADI_EBIU_COMMAND .................................................... 4-24
viii Device Drivers and System Services Manual for Blackfin Processors
CONTENTS
ADI_EBIU_COMMAND_PAIR ........................................... 4-28
Command Value Enumerations ............................................. 4-28
ADI_EBIU_SDRAM_EZKIT ........................................... 4-28
ADI_EBIU_SDRAM_ENABLE ........................................ 4-28
ADI_EBIU_SDRAM_BANK_SIZE .................................. 4-29
ADI_EBIU_SDRAM_BANK_COL_WIDTH ................... 4-29
ADI_EBIU_SDRAM_MODULE_TYPE .......................... 4-30
ADI_EBIU_CMD_SET_SDRAM_SCTLE ....................... 4-31
ADI_EBIU_SDRAM_EMREN ......................................... 4-31
ADI_EBIU_SDRAM_PASR ............................................. 4-32
ADI_EBIU_SDRAM_TCSR ............................................. 4-32
ADI_EBIU_SDRAM_SRFS .............................................. 4-33
ADI_EBIU_SDRAM_EBUFE .......................................... 4-33
ADI_EBIU_SDRAM_PUPSD .......................................... 4-33
ADI_EBIU_SDRAM_PSM ............................................... 4-34
ADI_EBIU_SDRAM_FBBRW .......................................... 4-34
ADI_EBIU_SDRAM_CDDBG ........................................ 4-35

DEFERRED CALLBACK MANAGER

Introduction ................................................................................. 5-2
Using the Deferred Callback Manager ........................................... 5-3
Interoperability With an RTOS ..................................................... 5-7
adi_dcb_Forward ..................................................................... 5-8
adi_dcb_RegisterISR ............................................................... 5-9
Handling Critical Regions within Callbacks ........................... 5-10
Device Drivers and System Services Manual for Blackfin Processors ix
CONTENTS
DCB Manager API Reference ...................................................... 5-10
Notation Conventions ........................................................... 5-10
adi_dcb_Close ...................................................................... 5-12
adi_dcb_Control ................................................................... 5-13
adi_dcb_Init ......................................................................... 5-16
adi_dcb_Open ...................................................................... 5-18
adi_dcb_Post ........................................................................ 5-20
adi_dcb_Remove ................................................................... 5-22
adi_dcb_Terminate ............................................................... 5-23
Public Data Types and Macros .................................................... 5-24
ADI_DCB_CALLBACK_FN ................................................ 5-24
ADI_DCB_COMMAND_PAIR ........................................... 5-25
ADI_DCB_COMMAND ..................................................... 5-26
ADI_DCB_ENTRY_HDR ................................................... 5-26
ADI_DCB_RESULT ............................................................ 5-27

DMA MANAGER

Introduction ................................................................................. 6-1
Theory of Operation .................................................................... 6-2
Overview ................................................................................ 6-3
Initialization ........................................................................... 6-3
Termination ............................................................................ 6-5
Memory DMA and Peripheral DMA ....................................... 6-5
Controlling Memory Streams .................................................. 6-6
Opening Memory Streams .................................................. 6-6
x Device Drivers and System Services Manual for Blackfin Processors
Memory Transfers ............................................................... 6-7
One-Dimensional Transfers (Linear Transfers) ................. 6-8
Two-Dimensional Transfers ............................................. 6-9
Closing Memory Streams .................................................. 6-10
Controlling DMA Channels .................................................. 6-10
Opening DMA Channels .................................................. 6-10
Operating Modes .......................................................... 6-11
Configuring a DMA Channel ............................................ 6-21
Closing a DMA Channel ................................................... 6-21
Transfer Completions ............................................................ 6-22
Polling .............................................................................. 6-22
Callbacks .......................................................................... 6-22
Memory Stream Callbacks ............................................. 6-23
Circular Transfer Callbacks ............................................ 6-23
Descriptor Callbacks ..................................................... 6-24
Descriptor Based Submodes ................................................... 6-24
Loopback Submode ........................................................... 6-24
Streaming Submode .......................................................... 6-25
DMA Channel to Peripheral Mapping ................................... 6-26
Sensing a Mapping ............................................................ 6-27
Setting a Mapping ............................................................. 6-27
Interrupts .............................................................................. 6-27
Hooking Interrupts ........................................................... 6-28
Unhooking Interrupts ....................................................... 6-28
Device Drivers and System Services Manual for Blackfin Processors xi
Two-Dimensional DMA ........................................................ 6-29
DMA Manager API Reference ..................................................... 6-32
Notation Conventions ........................................................... 6-32
adi_dma_Buffer .................................................................... 6-34
adi_dma_Control .................................................................. 6-36
adi_dma_Close ..................................................................... 6-39
adi_dma_GetMapping .......................................................... 6-40
adi_dma_Init ........................................................................ 6-41
adi_dma_MemoryClose ........................................................ 6-42
adi_dma_MemoryCopy ........................................................ 6-43
adi_dma_MemoryCopy2D .................................................... 6-45
adi_dma_MemoryOpen ........................................................ 6-47
adi_dma_Open ..................................................................... 6-49
adi_dma_Queue ................................................................... 6-51
adi_dma_SetMapping ........................................................... 6-52
adi_dma_Terminate .............................................................. 6-53
Public Data Structures, Enumerations and Macros ....................... 6-53
Data Types ............................................................................ 6-54
ADI_DMA_CHANNEL_HANDLE ................................. 6-54
ADI_DMA_DESCRIPTOR_UNION /
ADI_DMA_DESCRIPTOR_HANDLE ......................... 6-54
ADI_DMA_STREAM_HANDLE .................................... 6-55
Data Structures ..................................................................... 6-55
ADI_DMA_2D_TRANSFER ........................................... 6-56
ADI_DMA_CONFIG_REG ............................................ 6-56
xii Device Drivers and System Services Manual for Blackfin Processors
ADI_DMA_DESCRIPTOR_ARRAY ................................ 6-56
ADI_DMA_DESCRIPTOR_LARGE ................................ 6-57
ADI_DMA_DESCRIPTOR_SMALL ................................ 6-57
General Enumerations ........................................................... 6-57
ADI_DMA_CHANNEL_ID ............................................ 6-58
ADI_DMA_EVENT ......................................................... 6-58
ADI_DMA_MODE ......................................................... 6-58
ADI_DMA_PMAP ........................................................... 6-59
ADI_DMA_RESULT ....................................................... 6-59
ADI_DMA_STREAM_ID ................................................ 6-59
ADI_DMA_CONFIG_REG Field Values .............................. 6-61
ADI_DMA_DMA2D ....................................................... 6-61
ADI_DMA_DI_EN .......................................................... 6-61
ADI_DMA_DI_SEL ......................................................... 6-61
ADI_DMA_EN ................................................................ 6-61
ADI_DMA_WDSIZE ....................................................... 6-61
ADI_DMA_WNR ............................................................ 6-62
DMA Commands .................................................................. 6-62

DEVICE DRIVER MANAGER

Device Driver Model Overview ..................................................... 7-3
Using the Device Manager ............................................................ 7-5
Device Manager Overview ....................................................... 7-6
Theory of Operation ............................................................... 7-6
Data ................................................................................... 7-7
Device Drivers and System Services Manual for Blackfin Processors xiii
Initializing the Device Manager .......................................... 7-8
Termination ....................................................................... 7-9
Opening a Device ............................................................... 7-9
Configuring a Device ........................................................ 7-10
Dataflow Method ......................................................... 7-11
Enabling Dataflow ........................................................ 7-14
Providing Buffers to a Device ............................................ 7-14
Closing a Device ............................................................... 7-16
Callbacks .......................................................................... 7-16
Initialization Sequence ...................................................... 7-16
Stackable Drivers .............................................................. 7-17
Device Manager Design .............................................................. 7-18
Device Manager API Description ........................................... 7-18
Memory Usage Macros ..................................................... 7-19
Handles ............................................................................ 7-20
Dataflow Enumerations .................................................... 7-20
Command IDs ................................................................. 7-20
Callback Events ................................................................ 7-21
Return Codes ................................................................... 7-21
Circular Buffer Callback Options ...................................... 7-21
Buffer Data Types ............................................................. 7-21
Physical Driver Entry Point .............................................. 7-22
API Function Definitions ................................................. 7-22
Device Manager Code ........................................................... 7-23
xiv Device Drivers and System Services Manual for Blackfin Processors
Data Structures ................................................................. 7-23
Static Data ........................................................................ 7-23
Static Function Declarations .............................................. 7-23
API Functional Description ............................................... 7-24
adi_dev_Init ................................................................. 7-24
adi_dev_Open .............................................................. 7-24
adi_dev_Close ............................................................... 7-25
adi_dev_Read ............................................................... 7-26
adi_dev_Write ............................................................... 7-27
adi_dev_Control ........................................................... 7-27
Static Functions ................................................................ 7-31
PDDCallback ............................................................... 7-31
DMACallback ............................................................... 7-31
PrepareBufferList .......................................................... 7-32
SetDataflow .................................................................. 7-34
Physical Driver Design ................................................................ 7-35
Physical Driver Design Overview ........................................... 7-35
Physical Device Driver API Description ................................. 7-37
Physical Driver Include File (“xxx.h”) ..................................... 7-38
Extensible Definitions ....................................................... 7-38
ADI_DEV_PDD_ENTRY_POINT .................................. 7-40
Physical Driver Source (“xxx.c”) ............................................. 7-40
adi_pdd_Open .................................................................. 7-41
adi_pdd_Control .............................................................. 7-42
Device Drivers and System Services Manual for Blackfin Processors xv
adi_pdd_Read .................................................................. 7-44
adi_pdd_Write ................................................................. 7-45
adi_pdd_Close ................................................................. 7-46
Device Manager API Reference ................................................... 7-47
Notation Conventions ........................................................... 7-47
adi_dev_Close ....................................................................... 7-48
adi_dev_Control ................................................................... 7-49
adi_dev_Init ......................................................................... 7-50
adi_dev_Open ...................................................................... 7-52
adi_dev_Read ....................................................................... 7-54
adi_dev_Terminate ................................................................ 7-55
adi_dev_Write ...................................................................... 7-56
Physical Driver API Reference ..................................................... 7-57
Notation Conventions ........................................................... 7-57
adi_pdd_Close ...................................................................... 7-58
adi_pdd_Control .................................................................. 7-59
adi_pdd_Open ...................................................................... 7-60
adi_pdd_Read ....................................................................... 7-62
adi_pdd_Write ...................................................................... 7-63
Examples .................................................................................... 7-64

INDEX

xvi Device Drivers and System Services Manual for Blackfin Processors

PREFACE

Thank you for using Analog Devices, Inc. development software for Analog Devices embedded processors.

Purpose of This Manual

The Device Drivers and System Services Manual for Blackfin Processors con­tains information about the Analog Devices Device Driver Model and System Services library suite. Included are architectural descriptions of the device driver design, and each of the System Service components. Also included is a description of the APIs into each library.

Intended Audience

The primary audience for this manual is a programmer who is familiar with Analog Devices processors. This manual assumes that the audience has a working knowledge of the appropriate processor architecture and instruction set. Programmers who are unfamiliar with Analog Devices processors can use this manual, but should supplement it with other texts (such as the appropriate hardware reference and programming reference manuals) that describe your target architecture.
Device Drivers and System Services Manual for Blackfin Processors xvii

Manual Contents Description

Manual Contents Description
This manual contains:
Chapter 1, “Introduction” provides an overview of System Services and Device Drivers
Chapter 2, “Interrupt Manager” describes the System Interrupt Controller (SIC) Manager that sup­ports the general-purpose interrupt events
Chapter 3, “Power Management Module” describes the Power Management module that supports Dynamic Power Management of Blackfin processors
Chapter 4, “External Bus Interface Unit Module” describes the External Bus Interface Unit (EBIU) module that is used to enable the Power Management module to manage the SDRAM Controller operation
Chapter 5, “Deferred Callback Manager” describes the Deferred Callback Manager that is used by the appli­cation developer to effectively execute function calls
Chapter 6, “DMA Manager” describes Direct Memory Access (DMA) Manager API
Chapter 7, “Device Driver Manager” describes the device driver model used to control devices, both internal and external, to ADI processors
xviii Device Drivers and System Services Manual for Blackfin Processors

Technical or Customer Support

You can reach Analog Devices, Inc. Customer Support in the following ways:
Visit the Embedded Processing and DSP products Web site at
http://www.analog.com/processors/technicalSupport
E-mail tools questions to
dsptools.support@analog.com
E-mail processor questions to
dsp.support@analog.com
Phone questions to 1-800-ANALOGD
Contact your Analog Devices, Inc. local sales office or authorized distributor
Preface
Send questions by mail to:
Analog Devices, Inc. One Technology Way P.O. Box 9106 Norwood, MA 02062-9106 USA

Product Information

You can obtain product information from the Analog Devices Web site, from the product CD-ROM, or from the printed publications (manuals).
Analog Devices is online at www.analog.com. Our Web site provides infor­mation about a broad range of products—analog integrated circuits, amplifiers, converters, and digital signal processors.
Device Drivers and System Services Manual for Blackfin Processors xix
Product Information

MyAnalog.com

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 on products you are interested in. You can also choose to receive weekly E-mail notification containing updates to the Web pages that meet your interests. sheets, code examples, and more.
Registration:
Visit www.myanalog.com to sign up. Click Register to use MyAnalog.com. Registration takes about five minutes and serves as means for you to select the information you want to receive.
If you are already a registered user, just log on. Your user name is your E-mail address.
MyAnalog.com provides access to books, application notes, data

Processor Product Information

For information on embedded processors and DSPs, visit our Web site at
www.analog.com/processors, which provides access to technical publica-
tions, data sheets, application notes, product overviews, and product announcements.
xx Device Drivers and System Services Manual for Blackfin Processors
Preface
You may also obtain additional information about Analog Devices and its products in any of the following ways.
E-mail questions or requests for information to
dsp.support@analog.com
Fax questions or requests for information to
1-781-461-3010 (North America) 089/76 903-557 (Europe)
Access the FTP Web site at
ftp ftp.analog.com or ftp 137.71.23.21 ftp://ftp.analog.com

Related Documents

For software/tools information, refer to VisualDSP++ user’s documenta­tion available online and in printed forms.
For hardware information, refer to your processors’s hardware reference, programming reference, or data sheet. All documentation is available online. Most documentation is available in printed form.
Visit the Technical Library Web site to access all processor and tools man­uals and data sheets:
http://www.analog.com/processors/resources/technicalLibrary

Online Technical Documentation

Online documentation includes the VisualDSP++ Help system, software tools manuals, hardware tools manuals, processor manuals, Dinkum Abridged C++ library, and Flexible License Manager (FlexLM) network license manager software documentation. You can easily search across the
Device Drivers and System Services Manual for Blackfin Processors xxi
Product Information
entire VisualDSP++ documentation set for any topic of interest using the Search function of VisualDSP++ Help system. For easy printing, supple mentary .PDF files of most manuals are also provided.
Each documentation file type is described as follows.
File Description
.CHM Help system files and manuals in Help format
-
.HTM or .HTML
.PDF VisualDSP++ and processor manuals in Portable Documentation Format (PDF).
Dinkum Abridged C++ library and FlexLM network license manager software documentation. Viewing and printing the .HTML files requires a browser, such as Internet Explorer 4.0 (or higher).
Viewing and printing the Reader (4.0 or higher).
.PDF files requires a PDF reader, such as Adobe Acrobat
Access the online documentation from the VisualDSP++ environment, Windows
®
Explorer, or the Analog Devices Web site.
Accessing Documentation From VisualDSP++
From the VisualDSP++ environment:
Access VisualDSP++ online Help from the Help menu’s Contents, Search, and Index commands.
Open online Help from context-sensitive user interface items (tool­bar buttons, menu commands, and windows).
Accessing Documentation From Windows
In addition to any shortcuts you may have constructed, there are many ways to open VisualDSP++ online Help or the supplementary documenta tion from Windows.
-
xxii Device Drivers and System Services Manual for Blackfin Processors
Preface
Help system files (.CHM) are located in the Help folder of VisualDSP++ environment. The
.PDF files are located in the Docs folder of your
VisualDSP++ installation CD-ROM. The Docs folder also contains the Dinkum Abridged C++ library and the FlexLM network license manager software documentation.
Using Windows Explorer
Double-click the vdsp-help.chm file, which is the master Help sys­tem, to access all the other .CHM files.
Open your VisualDSP++ installation CD-ROM and double-click any file that is part of the VisualDSP++ documentation set.
Using the Windows Start Button
Access VisualDSP++ online Help by clicking the Start button and choosing Programs, Analog Devices, VisualDSP++, and VisualDSP++ Documentation.
Accessing Documentation From the Web
Download manuals in PDF format at the following Web site:
http://www.analog.com/processors/resources/technicalLibrary/manuals
Select a processor family and book title. Download archive (.ZIP) files, one for each manual. Use any archive management software, such as WinZip, to decompress downloaded files.

Printed Manuals

For general questions regarding literature ordering, call the Literature Center at 1-800-ANALOGD (1-800-262-5643) and follow the prompts.
Device Drivers and System Services Manual for Blackfin Processors xxiii
Product Information
VisualDSP++ Documentation Set
To purchase VisualDSP++ manuals, call 1-603-883-2430. The manuals may be purchased only as a kit.
If you do not have an account with Analog Devices, you are referred to Analog Devices distributors. For information on our distributors, log onto
http://www.analog.com/salesdir/continent.asp.
Hardware Tools Manuals
To purchase EZ-KIT Lite™ and In-Circuit Emulator (ICE) manuals, call 1-603-883-2430. The manuals may be ordered by title or by product number located on the back cover of each manual.
Processor Manuals
Hardware reference and instruction set reference manuals may be ordered through the Literature Center at 1-800-ANALOGD (1-800-262-5643), or downloaded from the Analog Devices Web site. Manuals may be ordered by title or by product number located on the back cover of each manual.
Data Sheets
All data sheets (preliminary and production) may be downloaded from the Analog Devices Web site. Only production (final) data sheets (Rev. 0, A, B, C, and so on) can be obtained from the Literature Center at 1-800-ANALOGD (1-800-262-5643); they also can be downloaded from the Web site.
To have a data sheet faxed to you, call the Analog Devices Faxback System at 1-800-446-6212. Follow the prompts and a list of data sheet code numbers will be faxed to you. If the data sheet you want is not listed, check for it on the Web site.
xxiv Device Drivers and System Services Manual for Blackfin Processors

Notation Conventions

Text conventions used in this manual are identified and described as follows.
Example Description
Preface
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
[this,…] Optional item lists in syntax descriptions appear within brackets
.SECTION Commands, directives, keywords, and feature names are in text with
filename Non-keyword placeholders appear in text with italic style format.
L
a
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
that. One or the other is required.
separated by vertical bars; read the example as an optional this or
.
that
delimited by commas and terminated with an ellipse; read the example as an optional comma-separated list of
letter gothic font.
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.
this.
this or
Warn in g: 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 devices users. In the online version of this book, the word Wa rnin g appears instead of this symbol.
Device Drivers and System Services Manual for Blackfin Processors xxv
Notation Conventions
L
Additional conventions, which apply only to specific chapters, may appear throughout this document.
xxvi Device Drivers and System Services Manual for Blackfin Processors

1 INTRODUCTION

This manual describes the System Services and Device Driver architecture for Analog Devices processors.
The System Services form a collection of functions that are commonly found in embedded systems. Each system service focuses on a specific set of functionality such as Direct Memory Access (DMA), Power Manage ment (PM), Interrupt Control (IC), and so on. Collectively, the system services provide a wealth of pre-built, optimized code that simplifies soft ware development for users, allowing them to get their Blackfin processor-based designs to market more quickly.
The Device Driver model provides a simple, clean and familiar interface into device drivers for Blackfin processors. The primary objective of the device driver model is to create a concise, effective and easy to use inter face through which applications can communicate with device drivers. Secondarily, the model and device manager software, significantly simpli­fies the development of device drivers, making it very straightforward for the development of new device drivers.
-
-
-
Device Drivers and System Services Manual for Blackfin Processors 1-1

System Services Overview

System Services Overview
The current revision of the System Services library consists of five services:
Interrupt Control Service - The Interrupt Control service allows the application to control and leverage the event and interrupt pro cessing of the processor more effectively. Specific functionality allows the application to:
Set and detect the mappings of the interrupt priority levels to peripherals.
Use standard ‘C’ functions as interrupt handlers.
Hook and unhook multiple interrupt handlers to the same interrupt priority level using both nesting and non-nesting capabilities.
-
Detect if a system interrupt is being asserted.
Protect and unprotect critical regions of code in a portable manner.
Power Management Service - The Power Management service allows the application to control the Dynamic Power Management capabilities of the Blackfin processor. Specific functionality allows the application to:
Set core and system clock operating frequencies via a function call.
Set and detect the internal voltage regulator settings.
Transition the processor among the various operat­ing modes including, Full-On, Active, Sleep, and so on.
1-2 Device Drivers and System Services Manual for Blackfin Processors
Introduction
External Bus Interface Unit Control Service (EBIU) - The EBIU Control service provides a collection of routines to set up the exter nal interfaces of the Blackfin processor, including the SDRAM controller. This functionality enables users to:
Adjust SDRAM refresh and timing rates to optimal values for given system clock frequencies.
Set individual bus interface settings.
Complete single function setup for known configurations, such as the Blackfin EZ-Kits.
Deferred Callback Service - The Deferred Callback service allows the application to be notified of asynchronous events outside of high priority interrupt service routines. Using deferred callbacks typically improves the overall I/O capacity of the system while at the same time reducing interrupt latency. Specific functionality allows the application to:
-
Define how many callbacks can be pending at any point in time.
Define the interrupt priority level at which the callback ser­vice executes.
Create multiple callback services, each operating at a differ­ent interrupt priority level.
Post callbacks to a callback service with a relative priority among all other callbacks posted to the same callback service.
DMA Management Service - The DMA Management service pro­vides access into the DMA controller of the Blackfin processor. The DMA Management service allows the application to schedule
Device Drivers and System Services Manual for Blackfin Processors 1-3
System Services Overview
DMA operations, both peripheral and memory DMA, supporting both linear and two-dimensional transfer types. Specific function ality allows the application to:
Set and detect the mapping of DMA channels to
peripherals.
Configure individual DMA channels for inbound/outbound
traffic using circular (autobuffered) DMA or descriptor based DMA.
Command the DMA Manager to issue “live” or deferred
callbacks upon DMA completions.
Queue descriptors, intermixing both linear and two-dimen-
sional transfers, on DMA channels.
Enable the DMA Manager to loopback on descriptor chains
automatically.
-
Continuously stream data into or out from a memory
stream or peripheral.
Initiate linear and two-dimensional memory DMA transfers
with simple ‘C’ like,
memcpy-type functions.
Device Manager - The device driver model is used to control devices, both internal and external to Analog Devices processors. Specific functionality allow the application to:
Open and close devices used by the application.
Configure and control devices.
Receive and transmit data through the devices using a vari­ety of dataflow methods.
1-4 Device Drivers and System Services Manual for Blackfin Processors
Loading...
+ 314 hidden pages