Analog Devices EZ-KIT Getting Started
Analog Devices EZ-KIT Getting Started

Analog Devices EZ-KIT Getting Started

Hp switch getting started
Table of Contents

Advertisement

Quick Links

Getting Started with
ADSP-BF548 EZ-KIT Lite
®
Revision 1.0, November 2007
Part Number
82-000206-02
Analog Devices, Inc.
a
One Technology Way
Norwood, Mass. 02062-9106

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the EZ-KIT and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Analog Devices EZ-KIT

  • Page 1 Getting Started with ADSP-BF548 EZ-KIT Lite ® Revision 1.0, November 2007 Part Number 82-000206-02 Analog Devices, Inc. One Technology Way Norwood, Mass. 02062-9106...
  • Page 2: Copyright Information

    Analog Devices, Inc. Printed in the USA. Limited Warranty The EZ-KIT Lite evaluation system is warranted against defects in materi- als and workmanship for a period of one year from the date of purchase from Analog Devices or from an authorized dealer.
  • Page 3: Regulatory Compliance

    Regulatory Compliance The ADSP-BF548 EZ-KIT Lite is designed to be used solely in a labora- tory environment. The board is not intended for use as a consumer end product or as a portion of a consumer end product. The board is an open system design which does not include a shielded enclosure and therefore may cause interference to other electrical devices in close proximity.
  • Page 5: Table Of Contents

    Notation Conventions ... xxiii PROGRAMMING ADSP-BF548 EZ-KIT LITE WITH VISUALDSP++ Installing VisualDSP++ and the EZ-KIT Lite ... 1-2 Starting VisualDSP++ and Connecting to the EZ-KIT Lite ... 1-3 Example 1: Building and Running an Application ... 1-6 Getting Started with ADSP-BF548 EZ-KIT Lite...
  • Page 6 Example 3: Using the Blackfin Processor Voltage Regulator ... 2-8 USING ADSP-BF548 EZ-KIT LITE PERIPHERALS ADSP-BF548 Processor I/O Peripherals ... 3-2 ADSP-BF548 Peripheral Interfaces on the EZ-KIT Lite ... 3-4 Using ADSP-BF548 Peripherals on the EZ-KIT Lite ... 3-5 Example 4: Overview ... 3-7 Example 4: Audio.c File ...
  • Page 7 SCREEN SSL File System Service ... 5-2 Sharp LQ043T1DG01 LCD Device Driver ... 5-3 Example 6: Displaying a Bitmap File on the EZ-KIT Lite ... 5-4 Example 6: Project Options ... 5-4 Example 6: Application Structure ... 5-9 FileSystem.c ... 5-9 LCD.c ...
  • Page 8 CONTENTS Writing a Loader File to Flash Memory ... 7-5 Booting From Burst Flash Memory ... 7-8 Example 8: Loading ... 7-9 Epilogue ... 7-10 INDEX viii Getting Started with ADSP-BF548 EZ-KIT Lite...
  • Page 9 PREFACE Thank you for purchasing the ADSP-BF548 EZ-KIT Lite Devices, Inc. evaluation system for ADSP-BF548 Blackfin Blackfin processors are embedded processors that support a Media Instruction Set Computing (MISC) architecture. This architecture is the natural merging of RISC, media functions, and digital signal processing (DSP) characteristics towards delivering signal processing performance in a microprocessor-like environment.
  • Page 10 The ADSP-BF548 EZ-KIT Lite provides example programs to demon- strate the capabilities of the evaluation board. The ADSP-BF548 EZ-KIT Lite installation is part of the Visu- alDSP++ installation. The EZ-KIT Lite is a licensed product that offers an evaluation (temporary) license. Once the evaluation license expires, the linker restricts a user’s program to 60 KB of...
  • Page 11 • Ethernet interface SMSC LAN9218 device 10-BaseT and 100-BaseTX Ethernet controller Integrated PHY and MAC HP Auto-MDIX • Keypad ACT components– 4 x 4 keypad assembly Getting Started with ADSP-BF548 EZ-KIT Lite jack jack LINE IN LINE OUT HEAD PHONE OUT jack...
  • Page 12 HOST Blackfin power measurement jumpers IDC connector PPI1 SPORT2 TWI, SPI, timers, For information about the hardware components of the EZ-KIT Lite, refer to the ADSP-BF548 EZ-KIT Lite Evaluation System Manual. IDC connectors SPORT3 IDC connectors UART3 Getting Started with ADSP-BF548 EZ-KIT Lite...
  • Page 13: Preface

    VisualDSP++ environment. EZ-KIT Lite users should use this manual in conjunction with the ADSP-BF548 EZ-KIT Lite Evaluation System Manual, which describes the evaluation system’s components in greater detail.
  • Page 14 4,“Using ADSP-BF548 EZ-KIT Lite As A Mass Storage Device” on page 4-1 Examines the USB and hard disk functionality. You will connect the EZ-KIT Lite to your PC and have Windows use it as a remov- able mass storage device. • Chapter 5, “Using ADSP-BF548 EZ-KIT Lite Hard Disk and...
  • Page 15: What's New In This Manual

    VisualDSP++. What’s New in This Manual This is the first revision of the Getting Started with ADSP-BF548 EZ-KIT Lite. Technical or Customer Support You can reach Analog Devices, Inc. Customer Support in the following ways: •...
  • Page 16: Supported Processors

    One Technology Way P.O. Box 9106 Norwood, MA 02062-9106 Supported Processors The ADSP-BF548 EZ-KIT Lite evaluation system supports Analog Devices ADSP-BF548 Blackfin processors. Product Information You can obtain product information from the Analog Devices Web site, from the product CD-ROM, or from printed publications (manuals).
  • Page 17: Myanalog.com

    For information on embedded processors and DSPs, visit our Web site at www.analog.com/processors tions, data sheets, application notes, product overviews, and product announcements. Getting Started with ADSP-BF548 EZ-KIT Lite to sign up. Click Register to use MyAnalog.com. , which provides access to technical publica- Preface...
  • Page 18: Related Documents

    General functional description, pinout, and timing Description of internal processor architecture and all register functions Description Description of the ADSP-BF548 EZ-KIT Lite hardware and software components Description of VisualDSP++ features and usage Description of the assembler function and commands Getting Started with ADSP-BF548 EZ-KIT Lite...
  • Page 19: Online Technical Documentation

    VisualDSP++ Loader and Utilities Manual VisualDSP++ Device Drivers and System Services Manual for Blackfin Processors If you plan to use the EZ-KIT Lite board in conjunction with a JTAG emulator, also refer to the documentation that accompanies the emulator. All documentation is available online. Most documentation is available in printed form.
  • Page 20 To view VisualDSP++ Help, click on the Help menu item or go to the Windows task bar and navigate to the VisualDSP++ documentation via the Start menu. To view ADSP-BF548 EZ-KIT Lite Help, which is part of the Visu- alDSP++ Help system, use the Contents or Search tab of the Help window.
  • Page 21: Printed Manuals

    Center at 1-800-ANALOGD (1-800-262-5643) and follow the prompts. 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.
  • Page 22 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. xxii Getting Started with ADSP-BF548 EZ-KIT Lite...
  • Page 23: Notation Conventions

    In the online version of this book, the word Warning appears instead of this symbol. Getting Started with ADSP-BF548 EZ-KIT Lite . One or the other is required. font.
  • Page 24 Notation Conventions Additional conventions, which apply only to specific chapters, may appear throughout this document. xxiv Getting Started with ADSP-BF548 EZ-KIT Lite...
  • Page 25: Programming Adsp-Bf548 Ez-Kit Lite With Visualdsp

    VISUALDSP++ In this chapter, you will connect your personal computer (PC) to the ADSP-BF548 EZ-KIT Lite evaluation system and write a simple C lan- guage program to perform two sorting algorithms. In the exercise, you will learn about the following concepts.
  • Page 26: Installing Visualdsp++ And The Ez-Kit Lite

    Installing VisualDSP++ and the EZ-KIT Lite Installing VisualDSP++ and the EZ-KIT Lite If you have not already done so, install the ADSP-BF548 EZ-KIT Lite. Ensure the board is disconnected from your PC, then install VisualDSP++ by following instructions in the VisualDSP++ Installation Quick Reference Card, steps 1 to 3.
  • Page 27: Starting Visualdsp++ And Connecting To The Ez-Kit Lite

    Start menu to launch the VisualDSP++ environment (also called the Inte- grated Development and Debugging Environment or IDDE). When VisualDSP++ first launches, it is disconnected from your EZ-KIT Lite or any other kind of debugging session Figure 1-1. VisualDSP++ Main Window A VisualDSP++ debugging session consists of a session type and target processor.
  • Page 28 Starting VisualDSP++ and Connecting to the EZ-KIT Lite • EZ-KIT Lite. This is the dedicated USB connection between the PC and EZ-KIT Lite. The connection is simple to manage and is an integral part of the EZ-KIT Lite. However, the connection is available with the EZ-KIT Lite only.
  • Page 29 An emulator is required to connect to a non-EZ-KIT Lite target. To inform VisualDSP++ that your target is an ADSP-BF548 processor on an EZ-KIT Lite, you must create and activate a new session. Follow these steps: 1. From VisualDSP++ Session menu, select New Session, which launches the Session Wizard Figure 1-2.
  • Page 30: Example 1: Building And Running An Application

    Example 1: Building and Running an Application 3. On the Select Connection Type page, select EZ-KIT Lite. Click Next. 4. On the Select Platform page, ensure that the selected platform is ADSP-BF548 EZ-KIT Lite via Debug Agent. Specify your own Session name for your session or accept the default name.
  • Page 31 Project window (expand the Source Files tree control to see the label if necessary). Build the project and load the executable program to the EZ-KIT Lite using the Project–>Build Project command (or use the F7 hotkey). Once the program is loaded, observe the blue bar on the...
  • Page 32 You can add both plots to a single window. However, this is undesirable when two plots have the same results, causing the plot lines to overwrite each other. array is now sorted. Step Over out_b is also sorted. out_m Getting Started with ADSP-BF548 EZ-KIT Lite variable out_m...
  • Page 33: Example 1: Sorts.c File

    C/C++ language debugging windows, such as local variable and expression monitors, function call stack window, and others are available under the View–>Debug Windows menu selection. Example 1: Sorts.c File * Getting Started With the ADSP-BF548 EZ-KIT Lite * Example 1 #include <stdlib.h> #define...
  • Page 34 { ++i; } while ( v[ i ] < x ); if ( i < j ) int temp = v[ i ]; v[ i ] = v[ j ]; v[ j ] = temp; 1-10 Getting Started with ADSP-BF548 EZ-KIT Lite...
  • Page 35 Programming ADSP-BF548 EZ-KIT Lite with VisualDSP++ else q = j; break; quick_sort ( v, p, q ); quick_sort ( v, q + 1, r ); int out_b[ ARRAY_LENGTH ]; int out_m[ ARRAY_LENGTH ]; void main (){ int i; srand ( 22 );...
  • Page 36 Example 1: Sorts.c File 1-12 Getting Started with ADSP-BF548 EZ-KIT Lite...
  • Page 37: Using Adsp-Bf548 Ez-Kit Lite To Investigate Performance Factors

    The chapter includes the following sections. • “ADSP-BF548 Processor Memory Hierarchy” on page 2-2 • “Example 2: Benchmarking the Relative Performance of Memo- ries” on page 2-4 • “Example 3: Using the Blackfin Processor Voltage Regulator” on page 2-8 Getting Started with ADSP-BF548 EZ-KIT Lite...
  • Page 38: Adsp-Bf548 Processor Memory Hierarchy

    SDRAM that exists external to the processor and can be found mounted on the EZ-KIT Lite board. 64M bytes of DDR SDRAM is supplied on the EZ-KIT Lite, but different sizes can be used on custom hardware to suit your application’s specific needs, up to a maximum of 512M bytes.
  • Page 39 7-1, shows how to build an application to burn to NOR flash. The application will be launched each time the EZ-KIT Lite is powered up or reset, without the need for the EZ-KIT Lite to con- nect to VisualDSP++. • NAND. The largest and least expensive form of flash available, but prone to errors through bad blocks and wearing.
  • Page 40: Example 2: Benchmarking The Relative Performance Of Memories

    These are C dec- , for starting and reading the processor’s start_real_time_clock() shows how the clock’s control “Using ADSP-BF548 3-1, we will see that VisualDSP++ sup- Getting Started with ADSP-BF548 EZ-KIT Lite file Example_1.dpj bubble_sort() ) you see there are...
  • Page 41 Using ADSP-BF548 EZ-KIT Lite to Investigate Performance Factors and associated EZ-KIT Lite devices. Another library function ( clock() provides the current value of the processor’s core clock cycle counter whenever the function is called. Since we are examining performance in this example, we will build the project in the Release configuration, which invokes the compiler’s opti-...
  • Page 42 Elapsed Core Seconds Cycles 9533 7079 6866 5367 directive in front of its definition in the section ) file that the project .ldf Getting Started with ADSP-BF548 EZ-KIT Lite Bubble Sort Quick Sort...
  • Page 43 Using ADSP-BF548 EZ-KIT Lite to Investigate Performance employs. Since the profiler window shows that function using the largest percentage of processor time, we will move that function further up the memory hierarchy and examine the results. There are two commented-out section directives in the middle of the file, immediately above the Sorts.c...
  • Page 44: Example 3: Using The Blackfin Processor Voltage Regulator

    The supported levels and the corresponding max- imum core and system clock rates for each level are documented in the datasheet for each processor. , in L1 memory. Find the out_b out_m section of L1 data memory. Rebuild and L1_data_a Getting Started with ADSP-BF548 EZ-KIT Lite...
  • Page 45 Using ADSP-BF548 EZ-KIT Lite to Investigate Performance Factors The voltage level can be changed on the fly as a program runs; for exam- ple, to suit the current workload or battery state. Changing the voltage regulator setting is not difficult but becomes a more complicated task with respect to coordinating the change with any necessary adjustments of the core and system clock rates.
  • Page 46 System MHz Elapsed Seconds 83.3 81.3 100.0 125.0 Getting Started with ADSP-BF548 EZ-KIT Lite initial- main() Core Cycles 2936M 2936M 2935M 2935M...
  • Page 47: Using Adsp-Bf548 Ez-Kit Lite Peripherals

    “ADSP-BF548 Processor I/O Peripherals” on page 3-2 • “ADSP-BF548 Peripheral Interfaces on the EZ-KIT Lite” on page 3-4 • “Using ADSP-BF548 Peripherals on the EZ-KIT Lite” on page 3-5 • “Example 4: Overview” on page 3-7 • “Example 4: Audio.c File” on page 3-8 •...
  • Page 48: Adsp-Bf548 Processor I/O Peripherals

    • Enhanced parallel peripheral interface (EPPI). An EPPI supports direct connection of LCD panels, parallel ana- log-to-digital (A/D) and digital-to-analog (D/A) converters, C bus standard. The processor sup- S mode and has eight-deep receive and transmit Getting Started with ADSP-BF548 EZ-KIT Lite...
  • Page 49 The pins can be configured as edge- or level-sensitive and used in a polled- or interrupt-driven manner. The GPIO pins also are called the programmable flags (PFs). Getting Started with ADSP-BF548 EZ-KIT Lite Using ADSP-BF548 EZ-KIT Lite Peripherals...
  • Page 50: Adsp-Bf548 Peripheral Interfaces On The Ez-Kit Lite

    • An RS-232 line driver and DB9 socket for one of the UARTs • A USB on-the-go (OTG) socket for using the EZ-KIT Lite as a USB device or host • An SD memory card connector (plus a memory card) for SD/SDIO •...
  • Page 51: Using Adsp-Bf548 Peripherals On The Ez-Kit Lite

    Analog Devices supplies software to aid the use of most of the peripherals on a Blackfin EZ-KIT Lite. The software is structured as two packages: the system services library (SSL) and device drivers (DDs); when referred to as a whole, the software is known as SSL/DD.
  • Page 52 The device drivers are individual units of code that facilitate configuration and operation of peripherals specific to one Blackfin processor or one EZ-KIT Lite board. They adhere to a common API for opening and clos- ing the associated peripherals, passing configuration data and reading/writing application-supplied data buffers.
  • Page 53: Example 4: Overview

    Some device drivers use other drivers; for example, on the ADSP-BF548 EZ-KIT Lite, the AD1980 audio codec connects to the processor’s SPORT0 interface for data transfers. The AD1980 device driver uses the supplied SPORT driver for managing the data transfers rather than driv- ing the SPORT itself, or requiring the application to do so.
  • Page 54: Example 4: Audio.c File

    Analog Devices-sup- also uses the driver to prepare the InitAudio() Listing 3-1 adi_dev_ManagerHandle, &ADIAD1980EntryPoint, NULL, &AD1980DriverHandle, ADI_DEV_DIRECTION_OUTBOUND, adi_dma_ManagerHandle, DCBQueueHandle, AD1980Callback Getting Started with ADSP-BF548 EZ-KIT Lite Driver”), Termina- on page 5-1, shows the call to...
  • Page 55 There is only one AD1980 audio codec on the ADSP-BF548 EZ-KIT Lite, so we pass the value of 0. • : An application that has opened two or more devices of the...
  • Page 56 Example 4: Audio.c File processing or error event occurs. For the single instance of the AD1980 audio codec on the ADSP-BF548 EZ-KIT Lite, we do not need a distinguishing value, so we supply • &AD1980DriverHandle where to store the device driver instance value (handle). As noted earlier, we will use this handle to identify the driver instance in later device manager calls.
  • Page 57: Adi_Dev_Control()-Configuring The Driver

    • The second argument is an integer command value that specifies the requested configuration or control action. There are two sets of command values for Getting Started with ADSP-BF548 EZ-KIT Lite Using ADSP-BF548 EZ-KIT Lite Peripherals : The ninth, and final, argument to...
  • Page 58 ADI_xxx_CMD_ ”. There is a separate header file for each , which is using a device adi_dev_Control() ). Together they specify how the device manager Getting Started with ADSP-BF548 EZ-KIT Lite ) and start ” identifies the ) and operand...
  • Page 59 InitAD1980.pAC97 InitAD1980.ResetFlagId InitAD1980.SportDevNumber if((Result = adi_dev_Control( AD1980DriverHandle, != ADI_DEV_RESULT_SUCCESS) Getting Started with ADSP-BF548 EZ-KIT Lite Using ADSP-BF548 EZ-KIT Lite Peripherals whose operand is the address of an name/value which takes a table of register triples. The application can supply tables of .
  • Page 60: Terminateaudio()

    3-14 stops data flow to the periph- adi_dev_Control() adi_dev_Close() shows the entire PlayBuffer() = buffer; = buffer_length; = 1; = (void*)&buff_free[i]; Getting Started with ADSP-BF548 EZ-KIT Lite ) makes any adi_dev_Read() ), or adi_dev_Read() function adi_dev_Write()
  • Page 61 Getting Started with ADSP-BF548 EZ-KIT Lite Using ADSP-BF548 EZ-KIT Lite Peripherals = FALSE;...
  • Page 62: Ad1980Callback()

    Listing 3-5. Callback Function static void AD1980Callback( void *AppHandle, Event, void *pArg) ADI_DEV_1D_BUFFER* volatile bool* switch (Event) 3-16 (see on page 3-8) when the driver instance was is one of the device man- ADI_AC97_EVENT_REGISTER_ACCESS_COMPLETE pdesc; pflag; Getting Started with ADSP-BF548 EZ-KIT Lite...
  • Page 63: Example 4: Running

    You will hear the phrase “An orange-colored sky” spoken five times with a short pause between repetitions. Getting Started with ADSP-BF548 EZ-KIT Lite Using ADSP-BF548 EZ-KIT Lite Peripherals project located in . On the EZ-KIT Lite, plug a pair of head- (it is LINE OUT 3-17...
  • Page 64 Example 4: Running 3-18 Getting Started with ADSP-BF548 EZ-KIT Lite...
  • Page 65: Analog Devices Usb Software

    LITE AS A MASS STORAGE DEVICE In this chapter, we will make the EZ-KIT Lite hard disk accessible from a PC as a removable mass storage device (MSD) with minimum application code. Then we will copy some files from the PC to the disk in preparation for later examples.
  • Page 66: Adsp-Bf548 Processor Usb Interface

    ADSP-BF548 processor and some attached USB device, such as a digital camera. On the EZ-KIT Lite, the USB controller connects to a standard OTG-style socket, which allows either host or device mode.
  • Page 67: Example 5: Usb Project

    Example 5: USB Project This chapter’s example project ( of code that makes the EZ-KIT Lite hard disk available to a PC as a removable storage device. All the code has to do is to open and configure the supplied USB mass storage device class driver; the underlying support code does the hard work.
  • Page 68 4. Prints a message to the VisualDSP++ Console window indicating that the EZ-KIT Lite is now ready to connect to a USB host. to specify their requirements. The common func- perform the SSL initialization, according...
  • Page 69 7. Prints another message indicating that a USB host has successfully recognized and configured the EZ-KIT Lite as a mass storage device. 8. Enters an idle loop, leaving the interrupt-driven mass storage device driver and support software to accept commands from the USB host and to access the EZ-KIT Lite hard disk.
  • Page 70: Example 5: Running

    Windows Explorer window with the contents of the new device (that is, the EZ-KIT Lite hard disk). It is possible that Windows only dis- plays the disk as a new entry in the Hard Disk Drives section of My...
  • Page 71 Then come back and rerun Now you can treat the EZ-KIT Lite hard drive as any other hard drive connected to your PC. Inspect the disk’s contents (if any) using Windows Explorer, copy files using drag-and-drop, save files, and so on.
  • Page 72 Example 5: Running Figure 4-2. Windows My Computer Display EZ-KIT Lite drive for later use. On the PC, navigate to example 5’s direc- tory and drag the BMP Files drive, thus creating the Windows assigned to the EZ-KIT Lite drive.
  • Page 73: Using Adsp-Bf548 Ez-Kit Lite Hard Disk And Lcd

    (SSL)—the file system service (FSS)—in addition to one of the supplied device drivers to create a program that reads a bitmap image from the EZ-KIT Lite hard disk and displays the image on the LCD screen. In order to run this program successfully, first run USB Project”...
  • Page 74: Ssl File System Service

    The initial release of the FSS is accompanied by physical device drivers for ATA/ATAPI attached devices, such as the ADSP-BF548 EZ-KIT Lite hard disk, SD devices, and USB mass storage host (for flash/pen drives plugged into the EZ-KIT Lite). Also included is a soft- ware driver supporting FAT 12/16/32 file systems.
  • Page 75: Sharp Lq043T1Dg01 Lcd Device Driver

    Sharp LQ043T1DG01 LCD Device Driver Most of the ADSP-BF548 processor’s on-chip peripherals and most of the devices mounted on the EZ-KIT Lite are supplied with device drivers, which are included in VisualDSP++ 5.0. One of the supplied drivers con- trols the display functions of the Sharp LQ0431T1DG01 LCD display.
  • Page 76: Example 6: Displaying A Bitmap File On The Ez-Kit Lite

    EZ-KIT Lite This chapter’s example program ( FSS and LCD driver to read a bitmap image from the EZ-KIT Lite hard disk and to display the image on the LCD. There is remarkably little application-level code needed to achieve the result, but before examining the code, we will examine the project set-up.
  • Page 77 Using ADSP-BF548 EZ-KIT Lite Hard Disk and LCD Screen Figure 5-1. Example 6 Project Window The table at the top of the window shows that in addition to the system heap, which the C library functions use by default, malloc()
  • Page 78 Cache and Memory Protection window). The option provides the oppor- tunity to modify the appropriate CPLB table entries. When you finish browsing the project options, click Cancel rather than OK to dismiss the dialog box in case you unintentionally modified any project settings. Getting Started with ADSP-BF548 EZ-KIT Lite...
  • Page 79 Using ADSP-BF548 EZ-KIT Lite Hard Disk and LCD Screen Now double-click the Example_6_heaptab.c filename to open a source window containing the file’s contents and scroll to the bottom of the file (Listing 5-1). There are external declarations for two symbol pairs: one pair for the default system heap, the other pair for our user-defined heap.
  • Page 80 // FSS Heap (DMA use) {0x03000000, (PAGE_SIZE_4MB | CPLB_DNOCACHE)}, {0x03400000, (PAGE_SIZE_4MB | CACHE_MEM_MODE)}, {0x03800000, (PAGE_SIZE_4MB | CACHE_MEM_MODE)}, {0x03c00000, (PAGE_SIZE_4MB | CACHE_MEM_MODE)}, ) does require modifica- Example_6_cplbtab.c Example_6.dpj (Listing 5-2). The startup code that runs Getting Started with ADSP-BF548 EZ-KIT Lite project file...
  • Page 81: Example 6: Application Structure

    Using ADSP-BF548 EZ-KIT Lite Hard Disk and LCD Screen Example 6: Application Structure The structure of the example 6 application is straightforward; source file contains Example_6.c • Calls functions to initialize the main components of the SSL, such as the interrupt and device managers, and set up the services and...
  • Page 82: Lcd.c

    STDIO That is all! Our application’s calls to the the directory manipulation functions now apply to the EZ-KIT Lite hard disk. The FSS automatically takes care of initializing and controlling the physical device driver (for the disk) and the file system driver (for the FAT file system).
  • Page 83: Adi_Ssl_Init.h

    Using ADSP-BF548 EZ-KIT Lite Hard Disk and LCD Screen plications involving centering, cropping the image and filling the frame buffer ‘backwards’ to accommodate a line ordering difference between the file format and the LCD. .bmp In the function, we request the DMA manager to call function InitLCD() after the final transfer in each of the two DMA chains.
  • Page 84: Example 6: Running

    If the program prints an error message, stating it cannot open the bitmap file, ensure that you have followed the instructions in Chapter 4, ADSP-BF548 EZ-KIT Lite As A Mass Storage Device” on page 4-1 copied the file from your PC to the EZ-KIT Lite hard disk. 5-12 (Figure 5-3).
  • Page 85: Using Adsp-Bf548 Ez-Kit Lite Keypad And Led Indicator

    LITE KEYPAD AND LED INDICATOR In this chapter, we will use the ADSP-BF548 EZ-KIT Lite 4 x 4 matrix keypad and six LED indicators. We will use a simple event-driven driver to detect keypad presses and the system services library’s (SSL) flag service to display each press’s row and column numbers on the LEDs.
  • Page 86: Event-Driven Device Drivers

    In “Example 6: Displaying a Bitmap File on the EZ-KIT Lite” on page we have learned how the SSL’s device manager and DMA manager work seamlessly with the EPPI device driver to control the flow of data to an external peripheral (the LCD).
  • Page 87: Vdk Device Model

    Using ADSP-BF548 EZ-KIT Lite Keypad and LED Indicator conditions are, by and large, not expected to happen. For event-driven drivers, the emphasis is on reacting appropriately to each of the status or exception events that the device can generate. The driver passes any infor- mation supplied with the event notification to the rest of the application for processing.
  • Page 88: Vdk Message Passing

    VDK application on the initial page of the New Project wizard. When- ever VisualDSP++ creates a new VDK project or opens an existing one, a new tab labelled Kernel is created in the Project window. The Kernel tab Getting Started with ADSP-BF548 EZ-KIT Lite...
  • Page 89 Using ADSP-BF548 EZ-KIT Lite Keypad and LED Indicator is where VDK-specific attributes of the project are entered and edited. Other general attributes of the project are entered or edited in the Project Wizard. Figure 6-1 shows the Kernel tab for example 7. The VDK project attributes are displayed in a tree structure and grouped into subsections according to function.
  • Page 90 API. The source file contains the VDK objects that correspond to the application’s boot time thread, device, and device flag. as a boot thread when BootThreadType ) and instructs VDK to create one instance of KeypadDriver Getting Started with ADSP-BF548 EZ-KIT Lite ), which KeypadFlag VDK.h...
  • Page 91: Example 7: Source Files

    Using ADSP-BF548 EZ-KIT Lite Keypad and LED Indicator Example 7: Source Files A VDK application typically does not define a contains a default main() starts the scheduler, resulting in execution of one boot thread. However, the default version only initializes the VDK system, while we want our example program to initialize the SSL in the same manner as the previous examples.
  • Page 92 Otherwise, the driver pends on KeypadFlag, which blocks the calling thread until a subse- quent activation entry posts the flag again. . VDK calls at specific points in the application, Getting Started with ADSP-BF548 EZ-KIT Lite...
  • Page 93 Using ADSP-BF548 EZ-KIT Lite Keypad and LED Indicator Each source file that the Project Wizard generates in response to a new thread type definition in the Kernel tab contains skeleton definitions of four functions: • An initialization function called when an instance of the thread...
  • Page 94 /* no timeout - wait forever type, /* type is row/col packed in int */ /* no payload, size is zero NULL); /* no payload, address is NULL /* destination thread instance */ /* the message’s ID Getting Started with ADSP-BF548 EZ-KIT Lite...
  • Page 95 Code has been added to the initialization function in which: • Initializes the SSL’s programmable flag manager • Opens each of the six flags, which in turn control the EZ-KIT Lite LED indicators Getting Started with ADSP-BF548 EZ-KIT Lite does the following.
  • Page 96 When run, the example program first extinguishes any of the six LED indicators that are lit. The six indicators are labelled and located in a single row along the short edge of the EZ-KIT Lite board (furthermost from the LCD screen). Then the program waits for one of the keys on the 4 x 4 keypad to be pressed.
  • Page 97 Using ADSP-BF548 EZ-KIT Lite Keypad and LED Indicator Table 6-1. Keypad Row/Column Display (Cont’d) Key Label (Arrow up) (Arrow down) CLEAR HELP ENTER Getting Started with ADSP-BF548 EZ-KIT Lite 6-13...
  • Page 98 Example 7: Source Files 6-14 Getting Started with ADSP-BF548 EZ-KIT Lite...
  • Page 99: Creating A Bootable Application

    VisualDSP++ Integrated Development and Debugging Environment (IDDE) and learn how to create a program that runs when- ever the EZ-KIT Lite is power cycled or reset. The chapter’s example program builds on the previous examples to produce an application that displays a slide show of BMP images with optional audio captions, con- trolled from the EZ-KIT Lite keypad.
  • Page 100: Visualdsp++ Utility Programs

    The Flash Programmer utility is another VisualDSP++ tool that controls the ‘burning’ of data to flash memories on the EZ-KIT Lite. Executable and Loadable Program Files For an application project type (standard application, LwIP Ethernet application, or VDK application), the VisualDSP++ Project Wizard offers a choice of project output type on the Application Settings page.
  • Page 101: Creating A Loadable Program File

    The Loader pages (also called loader property pages) are labelled Options, Kernel, and Splitter and accessed as nodes in the Project Options tree control. Getting Started with ADSP-BF548 EZ-KIT Lite Creating A Bootable Application ADSP-BF548 processor’s boot Figure 7-1...
  • Page 102 The boot loader can read from eight- or 16-bit wide memories or devices—select the appropriate width option under the Output Width label. The burst flash memory on the ADSP-BF548 EZ-KIT Lite is 16 bits wide. Getting Started with ADSP-BF548 EZ-KIT Lite...
  • Page 103: Writing A Loader File To Flash Memory

    VisualDSP++ Loader and Utilities Manual in the VisualDSP++ online help. Writing a Loader File to Flash Memory Following the procedures in this section will overwrite the current contents of the burst flash memory on your ADSP-BF548 EZ-KIT Lite. Review the contents of the <install_path>\Blackfin\Examples\ADSP-BF548 EZ-KIT Lite\Power_On_Self_Test factory contents of the burst flash memory if you wish to do so.
  • Page 104 Writing a Loader File to Flash Memory ing a boot stream on an ADSP-BF548 EZ-KIT Lite is the 32 MB, 16-bit wide burst flash memory. VisualDSP++ includes a Flash Programmer util- ity to program the loader file into flash memory ready for booting.
  • Page 105 For more information about the Flash Programmer, refer to the Visu- alDSP++ online help under Graphical Environment –>Emulation Tools –>Flash Programmer. Getting Started with ADSP-BF548 EZ-KIT Lite...
  • Page 106: Booting From Burst Flash Memory

    Figure 7-3. Flash Programmer: Programming Dialog Box Booting From Burst Flash Memory input pins of the processor select the location accessed by BMODE0—3 the processor’s boot loader at reset. On the ADSP-BF548 EZ-KIT Lite, rotary switch (labelled position 1 (default) selects the burst flash memory. When position 1, every processor reset, including power-on, causes the boot loader to start processing the contents of flash memory as a boot stream.
  • Page 107: Example 8: Loading

    7-4. The instruction screen shows the action associated with each of four but- tons on the EZ-KIT Lite matrix keypad. Note that the main purpose of the Redisplay Current Image action is to replay any audio caption associ- ated with the current not stop the processor: each VDK application thread terminates, but the VDK system’s idle thread continues running.
  • Page 108: Epilogue

    If the example works as expected, you can burn the loader file to burst flash memory as described in page 7-5. The application will be booted and run every time the EZ-KIT Lite is reset, assuming that the board is not connected to a VisualDSP++ session.
  • Page 109: Index

    EZ-KIT Lite, controller area network (CAN), counter interface, customer support, cycle-accurate simulators, cycle counter, data-driven device drivers, Getting Started with ADSP-BF548 EZ-KIT Lite data placement, 2-6, data transfer bandwidth, 3-16 functions, DDR SDRAM memory (L3), x, debug configurations, of projects,...
  • Page 110 FAT file systems, 5-2, 5-10 features, of this EZ-KIT Lite, file system services (FSS), 5-1, 5-2, 5-4, flash memories, of this EZ-KIT Lite, full-duplex universal asynchronous receiver/transmitter (UART), functional compiled simulators, general-purpose I/O (GPIO) pins, 3-3,...
  • Page 111 4-3, 5-11 initializing and terminating, SSL/device driver libraries, SSL device manager, 3-9, 3-10, statistical profiler, Getting Started with ADSP-BF548 EZ-KIT Lite STDIO driver, synchronous dynamic random access memory, See SDRAM synchronous memories, synchronous serial port (SPORT), system services library, See SSL...

This manual is also suitable for:

Adsp-bf548 ez-kit lite

Table of Contents