Analog Devices ADSP-BF537 EZ-KIT Lite Getting Started
Analog Devices ADSP-BF537 EZ-KIT Lite Getting Started

Analog Devices ADSP-BF537 EZ-KIT Lite Getting Started

Hide thumbs Also See for ADSP-BF537 EZ-KIT Lite:
Table of Contents

Advertisement

Quick Links

Getting Started with
ADSP-BF537 EZ-KIT Lite
®
Revision 1.2, November 2007
Part Number
82-000865-02
Analog Devices, Inc.
a
One Technology Way
Norwood, Mass. 02062-9106
www.BDTIC.com/ADI

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Summary of Contents for Analog Devices ADSP-BF537 EZ-KIT Lite

  • Page 1 Getting Started with ADSP-BF537 EZ-KIT Lite ® Revision 1.2, November 2007 Part Number 82-000865-02 Analog Devices, Inc. One Technology Way Norwood, Mass. 02062-9106 www.BDTIC.com/ADI...
  • Page 2 Analog Devices or from an authorized dealer. 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;...
  • Page 3 Regulatory Compliance The ADSP-BF537 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 4 www.BDTIC.com/ADI...
  • Page 5: Table Of Contents

    Online Technical Documentation ........... xviii Printed Manuals ............... xix Notation Conventions ..............xxi PROGRAMMING ADSP-BF537 EZ-KIT LITE WITH VISUALDSP++ Installing VisualDSP++ and ADSP-BF537 EZ-KIT Lite ....1-2 Starting VisualDSP++ and Connecting to ADSP-BF537 EZ-KIT Lite ................1-3 Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 6 Part 1: Creating an Audio Pass-Through Application with VDK ..3-2 Part 2: Controlling Pass-Through Volume via Telnet ..... 3-7 Part 3: Tuning Application ............3-13 Part 4: Running an Application from Flash Memory ....3-15 Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 7 1. Create Sockets ..............A-4 2. Host Waits for Client ............. A-4 3. Client Connects with Host ..........A-4 4. Host Acknowledges Client ..........A-5 5. Inter-Process Communications ........A-5 6. Close Connection ............A-5 INDEX Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 8 CONTENTS viii Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 9: Preface

    PREFACE ® Thank you for purchasing the ADSP-BF537 EZ-KIT Lite , Analog ® Devices, Inc. evaluation system for ADSP-BF537 Blackfin processors. 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-BF537 EZ-KIT Lite provides example programs to demon- strate the capabilities of the evaluation board. The ADSP-BF537 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...
  • Page 11 10 LEDs: 1 power (green), 1 board reset (red), 1 USB (red), 6 general-purpose (amber), and 1 USB monitor (amber) • Push buttons 5 push buttons: 1 reset, 4 programmable flags with debounce logic • Expansion interface All processor signals Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 12: Purpose Of This Manual

    ADSP-BF537 EZ-KIT Lite Evaluation System Manual. Purpose of This Manual The Getting Started with ADSP-BF537 EZ-KIT Lite familiarizes users with the hardware capabilities of the evaluation system and demonstrates how to access these capabilities in the VisualDSP++ environment.
  • Page 13: Intended Audience

    Manual Contents The manual consists of: • Exercise 1, “Programming ADSP-BF537 EZ-KIT Lite with Visu- alDSP++” on page 1-1 Provides instructions for connecting the EZ-KIT Lite to a PC and writing a C program to perform two sorting algorithms.
  • Page 14: What's New In This Manual

    What’s New in This Manual What’s New in This Manual The Getting Started with ADSP-BF537 EZ-KIT Lite has been updated for the current release of VisualDSP++. Technical or Customer Support You can reach Analog Devices, Inc. Customer Support in the following ways: •...
  • Page 15: Supported Processors

    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 notifications containing updates to the Web pages that meet your interests, including documentation errata against all manuals.
  • Page 16: Processor Product Information

    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 processor.support@analog.com (World wide support) processor.europe@analog.com (Europe support)
  • Page 17 Preface Table 2. Related VisualDSP++ Publications Title Description Description of the ADSP-BF537 EZ-KIT Lite ADSP-BF537 EZ-KIT Lite Evaluation System hardware and software components. Manual VisualDSP++ Assembler and Preprocessor Man- Description of the assembler function and commands. VisualDSP++ C/C++ Complier and Library...
  • Page 18: Online Technical Documentation

    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-BF537 EZ-KIT Lite Help, which is part of the Visu- alDSP++ Help system, use the Contents or Search tab of the Help window.
  • Page 19: Printed Manuals

    FlexLM network license manager software documentation. Your software installation kit includes online Help as part of the Windows interface. These help files provide information about VisualDSP++ and the ADSP-BF537 EZ-KIT Lite evaluation system. Accessing Documentation From Web Download manuals at the following Web site: http://www.analog.com/processors/technicalSupport/technicalLi-...
  • Page 20 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.
  • Page 21: Notation Conventions

    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 Warning appears instead of this symbol. Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 22 Notation Conventions Additional conventions, which apply only to specific chapters, may appear throughout this document. xxii Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 23: Programming Adsp-Bf537 Ez-Kit Lite With Visualdsp

    VISUALDSP++ In exercise 1, you will connect your personal computer (PC) to the ADSP-BF537 EZ-KIT Lite evaluation system and write a simple C lan- guage program to perform two sorting algorithms. You will be presented with techniques to visualize graphically the effects of the sorts. Next, you will measure the Blackfin processor’s performance and learn how the pro-...
  • Page 24: Installing Visualdsp++ And Adsp-Bf537 Ez-Kit Lite

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

    Programming ADSP-BF537 EZ-KIT Lite with VisualDSP++ Starting VisualDSP++ and Connecting to ADSP-BF537 EZ-KIT Lite From the Start menu, navigate to the VisualDSP++ environment via the Programs menu. After a second or two, the main VisualDSP++ window appears on the screen. When VisualDSP++ first launches, it is discon-...
  • Page 26 Starting VisualDSP++ and Connecting to ADSP-BF537 EZ-KIT Lite VisualDSP++ is able to connect to a number of different debug sessions, where each session has its own application and benefits. The session types available with VisualDSP++ are • EZ-KIT Lite. This is the dedicated USB connection between the PC and EZ-KIT Lite.
  • Page 27 Programming ADSP-BF537 EZ-KIT Lite with VisualDSP++ fices the detailed view but allows you to simulate much more quickly, at millions of simulated cycles per second depending on the speed of your PC. For a more comprehensive discussion and exercises concerning the simulators’...
  • Page 28 Starting VisualDSP++ and Connecting to ADSP-BF537 EZ-KIT Lite Figure 1-2. Session Wizard 4. On the Select Platform page, ensure that the selected platform is ADSP-BF537 EZ-KIT Lite via Debug Agent. Specify your own Session name for your session or accept the default name. Click Next.
  • Page 29: Exercise 1, Part 1: Building And Running The First Program

    Programming ADSP-BF537 EZ-KIT Lite with VisualDSP++ Exercise 1, Part 1: Building and Running the First Program Now it is time to start our first C program. “Listing 1-1. Exercise 1, Part 1” on page 1-19 is the C program we start and expand throughout this exercise.
  • Page 30 Note that the part 1 project uses the debug configuration (Figure 1-4). Note that 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. Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 31 Programming ADSP-BF537 EZ-KIT Lite with VisualDSP++ Figure 1-3. Plot Window Figure 1-4. Project Debug Configuration The debug configuration is one of the two configurations VisualDSP++ provides for projects. You can create more configurations. A configuration is a set of project build options, similar in concept to a makefile target. It is often desirable to maintain different types of configurations for your system.
  • Page 32 C/C++ language debugging windows, such as local variable and expression monitors, function call stack windows, and others are available under the View–>Debug Windows menu selection. 1-10 Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 33: Exercise 1, Part 2: Analyzing Performance And Memory Hierarchy Impact

    Programming ADSP-BF537 EZ-KIT Lite with VisualDSP++ Exercise 1, Part 2: Analyzing Performance and Memory Hierarchy Impact Once you have familiarized yourself with basic VisualDSP++ operations, it is time to use VisualDSP++ to analyze and tweak the program’s perfor- mance. Close the part 1 project with the File–>Close–>Project command.
  • Page 34 For the part 2 program, we use the statistical profiler. Enable the statistical profiler by selecting Tools–>Statistical Profiling–>New Profile. Move and resize the new window until the viewing space is comfortable to con- tinue the exercise. 1-12 Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 35 Programming ADSP-BF537 EZ-KIT Lite with VisualDSP++ Run the program using Debug–>Run (or use the F5 hotkey). The pro- grams may take 30 seconds or more to run to completion (by design). When the program runs, its status information displays in the lower-right...
  • Page 36 Blackfin processor. The Blackfin processor also has a data cache, but its discussion is beyond this exercise. Refer to the ADSP-BF537 Blackfin Processor Hardware Reference for more information. 1-14 Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 37 Programming ADSP-BF537 EZ-KIT Lite with VisualDSP++ To enable the instruction cache: 1. Open the project wizard (Project–>Project Options or ALT-F7) 2. In the Project tree control, locate the Startup Code Settings node. Click Cache and Memory Protection under Startup Code Settings (Figure 1-8).
  • Page 38 The statistical profile shows an interesting effect of the change: the function no longer uses the largest percentage of the pro- bubble_sort() cessor time— is now the most time-consuming portion of quick_sort() the application (Figure 1-9). 1-16 Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 39: Exercise 1, Part 3: Working With Blackfin Voltage Regulator

    Programming ADSP-BF537 EZ-KIT Lite with VisualDSP++ Figure 1-9. Statistical Profiling: Results after Moving bubble_sort() is moved to internal memory as well, overall execution quick_sort() time again improves and the relative speed of versus bubble_sort() returns to the expected ratio. quick_sort() The exercise program is small enough to fit entirely into the internal memory of the processor.
  • Page 40 Results may vary slightly on your computer. Figure 1-10. Sorts Results in Console Window The key observation are: • As voltage increases, execution time decreases • Cycle count remains constant regardless of the voltage 1-18 Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 41: Listing 1-1. Exercise 1, Part 1

    Programming ADSP-BF537 EZ-KIT Lite with VisualDSP++ Listing 1-1. Exercise 1, Part 1 * Getting Started With the ADSP-BF537 EZ-KIT Lite * Part 1, Exercise 1 #include <stdlib.h> #define NUM_ITERATIONS #define ARRAY_LENGTH /* Initialize two arrays to the same set of random values */ void randomize_arrays ( int *v1, int *v2, unsigned int length ) unsigned int i;...
  • Page 42 ( 22 ); for ( i = 0; i < NUM_ITERATIONS; ++i ) randomize_arrays ( out_b, out_m, ARRAY_LENGTH ); bubble_sort ( out_b, ARRAY_LENGTH ); quick_sort ( out_m, 0, ARRAY_LENGTH - 1 ); 1-20 Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 43: Listing 1-2. Exercise 1, Part 2

    Programming ADSP-BF537 EZ-KIT Lite with VisualDSP++ Listing 1-2. Exercise 1, Part 2 * Getting Started With the ADSP-BF537 EZ-KIT Lite * Part 1, Exercise 2 #include <stdlib.h> #include <stdio.h> #include <ccblkfn.h> #include <cdefbf533.h> #include <sysreg.h> #include <time.h> #define NUM_ITERATIONS 5000 #define ARRAY_LENGTH void start_real_time_clock(void);...
  • Page 44 ( j = i + 1; j < length; ++j ) if ( v[ i ] > v[ j ] ) int temp = v[ i ]; v[ i ] = v[ j ]; v[ j ] = temp; 1-22 Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 45 Programming ADSP-BF537 EZ-KIT Lite with VisualDSP++ /* A standard quick sort algorithm, O(n*log(n)) */ void quick_sort ( int *v, unsigned int p, unsigned int r ) if ( p < r ) unsigned int x, i, j, q; x = v[ p ];...
  • Page 46 = clock () - cycles_begin; display_cycles_end = ( unsigned long)( cycles_end / 1000000 ); time_end = get_real_time_clock_in_seconds (); printf ( "Completed in %d seconds and approx. %u million cycles.\n", time_end, display_cycles_end ); 1-24 Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 47: Listing 1-3. Exercise 1, Part 3

    Programming ADSP-BF537 EZ-KIT Lite with VisualDSP++ Listing 1-3. Exercise 1, Part 3 * Getting Started With the ADSP-BF537 EZ-KIT Lite * Part 1, Exercise 3 #include <stdlib.h> #include <stdio.h> #include <ccblkfn.h> #include <cdefbf537.h> #include <sysreg.h> #include <time.h> #include <services/adi_pwr.h> #define NUM_ITERATIONS...
  • Page 48 ( j = i + 1; j < length; ++j ) if ( v[ i ] > v[ j ] ) int temp = v[ i ]; v[ i ] = v[ j ]; v[ j ] = temp; 1-26 Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 49 Programming ADSP-BF537 EZ-KIT Lite with VisualDSP++ /* A standard quick sort algorithm, O(n*log(n)) */ void quick_sort ( int *v, unsigned int p, unsigned int r ) if ( p < r ) unsigned int x, i, j, q; x = v[ p ];...
  • Page 50 (x 1m)"); for ( v = 0; v < sizeof ( voltage_levels ) / sizeof ( voltage_levels_type ); ++v ) adi_pwr_SetMaxFreqForVolt ( voltage_levels[ v ].v ); start_real_time_clock (); cycles_begin = clock (); 1-28 Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 51 Programming ADSP-BF537 EZ-KIT Lite with VisualDSP++ for ( i = 0; i < NUM_ITERATIONS; ++i ) randomize_arrays ( out_b, out_m, ARRAY_LENGTH ); bubble_sort ( out_b, ARRAY_LENGTH ); quick_sort ( out_m, 0, ARRAY_LENGTH - 1 ); cycles_end = clock () - cycles_begin;...
  • Page 52 Listing 1-3. Exercise 1, Part 3 1-30 Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 53: Running A Tcp/Ip Application On An Adsp-Bf537

    • TCP/IP and the LwIP stack • VDK and its relationship to LwIP • TCP/IP project type • Determining Ethernet Media Access Control (MAC) and IP addresses • Sockets programming and input/output management Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 54: Part 1: A Primer On Tcp/Ip, Os Threads And Semaphores, And Sockets Api

    Part 1: A Primer on TCP/IP, OS Threads and Semaphores, and Sockets API The ADSP-BF537 EZ-KIT Lite includes an on-chip 10/100 Mbits/sec Ethernet MAC. The interface is exposed on the board, providing an easy connection between the EZ-KIT Lite and an existing TCP/IP network.
  • Page 55: Part 2: Creating A Tcp/Ip Application And Connecting To A Dhcp Server

    The IP address is used to connect to the target board. 4. Continues running the application To start, physically connect the ADSP-BF537 EZ-KIT Lite hardware to the 10/100 Mbits/sec network (the same network your PC connects to) and then create the TCP/IP support software application using the sup- plied non-cross-over cable.
  • Page 56 DHCP, the LwIP library must be rebuilt using a static IP address assigned by the network administrator. For details regarding rebuilding the LwIP library with a static IP address, refer to the file in the LWIP_UserGuide.doc <install_path>\Black- directory. fin\lib\src\lwip\docs Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 57 Running a TCP/IP application on an ADSP-BF537 EZ-KIT Lite VisualDSP++ creates the skeleton application. Build the project with Project–>Build. Once the project is built and loaded to the EZ-KIT Lite, run the example. Within a few seconds, output is emitted in the Visu- alDSP++ Output window, similar to: IP ADDRESS xxx.xxx.xxx.xxx...
  • Page 58: Part 3: Communicating With Sockets Api

    (the increment of one is used in this implementation). The letter becomes becomes , and so on. The algorithm wraps at the end of the alphabet, with becoming Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 59 Running a TCP/IP application on an ADSP-BF537 EZ-KIT Lite To enable multiple clients (computers) to connect concurrently to the same host (the EZ-KIT Lite), TCP/IP applications typically use multiple operating system threads of execution as follows. 1. The main application thread begins polling the port number(s) rel- evant to the application.
  • Page 60 “Listing 2-3. VDK::Thread Implementation” on page 2-11). 5. Go back to and add Caesar_Cipher_ThreadType.cpp near the top of the file, with the other #include <lwip/sockets.h> directives, to make the sockets API “known” to this #include source file. Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 61 Running a TCP/IP application on an ADSP-BF537 EZ-KIT Lite 6. Open the source file . Add the follow- lwip_sysboot_threadtype.c ing line to the top of the file: VDK_ThreadID g_AttenuatorID 7. Replace the function lwip_sysboot_threadtype_RunFunction() with the contents of “Listing 2-4.
  • Page 62: Listing 2-1. Caesar_Cipher_Threadtype::run() Implementation

    /* telnet back- space control character to overwrite the character sent */ m_vOutBuf [ iCharNum + iCount ] = c; if ( send (m_iSocket, m_vOutBuf, iCount * 2, 0) <= 0 ) break; 2-10 Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 63: Listing 2-2. Caesar_Cipher_Threadtype() Implementation

    Running a TCP/IP application on an ADSP-BF537 EZ-KIT Lite else break; close ( m_iSocket ); Listing 2-2. Caesar_Cipher_ThreadType() Implementation Caesar_Cipher_ThreadType::Caesar_Cipher_ThreadType(VDK::Thread:: ThreadCreationBlock &tcb) : VDK::Thread(tcb) m_iSocket = (int) tcb.user_data_ptr; Listing 2-3. VDK::Thread Implementation class Caesar_Cipher_ThreadType : public VDK::Thread public: Caesar_Cipher_ThreadType(VDK::Thread::ThreadCreationBlock&); virtual ~Caesar_Cipher_ThreadType();...
  • Page 64: Listing 2-4. Lwip_Sysboot_Threadtype_Runfunction() Implementation

    /* start stack */ start_stack(); * For debug purposes, printf() IP address to the VisualDSP++ * console window. Likely not needed in final application. memset(ip,0,sizeof(ip)); if(gethostaddr(0,ip)) printf("IP ADDRESS: %s\n",ip); Add Application Code here 2-12 Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 65 Running a TCP/IP application on an ADSP-BF537 EZ-KIT Lite struct sockaddr_in saddr; int listenfd; if ( 0 > ( listenfd = socket ( AF_INET, SOCK_STREAM, 0 ) ) ) printf ( "Call to socket() failed.\n" ); abort(); memset ( &saddr, 0, sizeof ( saddr ) );...
  • Page 66 ( UINT_MAX == VDK_CreateThreadEx ( &TCB ) ) printf( "Call to VDK_CreateThreadEx()failed.\n" ); abort(); /* Put the thread's exit from "main" HERE */ /* A thread is automatically Destroyed when it exits its run function */ 2-14 Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 67: Controlling A Real-Time Application Via Tcp/Ip

    • How to manage an audio encoder and decoder with device drivers • How to use VDK history views to examine and trace system behavior • How thread priorities impact system behavior • How threads communicate with VDK messages Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 68: Part 1: Creating An Audio Pass-Through Application With Vdk

    Part 1: Creating an Audio Pass-Through Application with VDK Part 1: Creating an Audio Pass-Through Application with VDK The ADSP-BF537 EZ-KIT Lite includes both an analog-to-digital con- verter (ADC) and a digital-to-analog converter (DAC). These converters allow the EZ-KIT Lite to digitize an incoming audio signal, perform oper- ations on the signal, and convert the signal back to analog, allowing you to hear the results.
  • Page 69 Figure 3-1. EZ-KIT Lite Connection Diagram Next, load the project <install_path>\Blackfin\Examples\ADSP-BF537 EZ-Kit Lite\Getting Started Exam- to the EZ-KIT Lite. Build and run ples\Part_3_1\TalkThrough_3_1.dpj the application. While the application is running, enable the audio play- Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 70 If the problem persists, con- sult the ADSP-BF537 EZ-KIT Lite Evaluation System Manual and confirm that all of the DIP switches are in the correct positions.
  • Page 71 (higher priority). Proper assignment of thread prior- ity is a hallmark of a good application design and often is one of the most important system-level design decisions. In this case, it is more important Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 72 The software interface to the DAC (AD1854) and ADC (AD1871) con- verters is managed by device drivers written specifically for these devices (Figure 3-3). Figure 3-3. AD1854 and AD1871 Device Drivers Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 73: Part 2: Controlling Pass-Through Volume Via Telnet

    , and skip the procedure to upgrade ples\Part_3_2\TalkThrough_3_2.dpj the application with inter-thread messages. You must close the project from the previous exercise (part 1 of exercise 3) before opening the part 2 project. Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 74 The VDK State History window displays the recent history of the application. Resize the window to a comfortable size. Turn on the leg- end by right-clicking in the window and selecting Legend. The window Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 75 Thus, we can see that the gets Idle Thread the most activity, with intermittent activity among the three audio Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 76 Input Attenuator Output thread, and back to the . The colored arrows represent various Attenuator VDK events (refer to the legend for details). 3-10 Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 77 VisualDSP++ quickly halts at the just-set breakpoint (the audio pass-through, of course, also stops). Going back to the VDK State History window, notice an interesting flurry of activity on the right Getting Started with ADSP-BF537 EZ-KIT Lite 3-11 www.BDTIC.com/ADI...
  • Page 78 (threads ID 5–7). This interruption occurs because the audio processing thread has a higher priority than the Ethernet threads. After servicing the audio, execution resumes in the Ethernet thread. 3-12 Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 79: Part 3: Tuning Application

    First, turn on the compiler’s optimizations. Switch from the Debug con- figuration to the Release configuration, then build, load, and run the application. After a few seconds of audio, halt and revisit the Target Load Getting Started with ADSP-BF537 EZ-KIT Lite 3-13 www.BDTIC.com/ADI...
  • Page 80 Kernel page, navigating to Kernel–>System, and setting Instrumentation to None. Note, however, that you no longer can use the VDK state history displays introduced earlier in this exercise. 3-14 Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 81: Part 4: Running An Application From Flash Memory

    Part 4: Running an Application from Flash Memory The ADSP-BF537 EZ-KIT Lite is able to load your application to the flash memory using the Flash Programmer utility. The utility runs the program directly from the processor’s memory without using the Visu- alDSP++ tool suite.
  • Page 82 2. On the Driver page, click Browse to locate the driver file <install_path>\Blackfin\Examples\ADSP-BF537 EZ-Kit Lite\Flash Programmer\BF537EzFlashDriver.dxe 3. Click Load Driver to load the driver file. 4. Click the Programming tab (Figure 3-8). 3-16 Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 83 5. Use Browse to locate the loader file …\Blackfin\Exam- ples\ADSP-BF537 EZ-Kit Lite\Getting Started Examples\Part_3_2\Debug\TalkThrough_3_2.ldr 6. Click Program to load the program to the flash memory. 7. Click OK to exit the Flash Programmer. Getting Started with ADSP-BF537 EZ-KIT Lite 3-17 www.BDTIC.com/ADI...
  • Page 84 You can change the volume of the audio using a TCPIP connection via telnet when the application is running. When the audio starts, telnet to the EZ-Kit Lite and use the and – keys on the keyboard to change the volume. 3-18 Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 85 ( c == '+' || c == '-' ) if ( c == '+' ) volume += 1.0; else volume -= 1.0; /* Volume must in a range from 0.0 to 48.0 */ Getting Started with ADSP-BF537 EZ-KIT Lite 3-19 www.BDTIC.com/ADI...
  • Page 86: Listing 3-1. Caesar_Cipher_Threadtype::run() New Implementation

    ( m_vOutBuf, "\xa\xdVolume is now %g of %g.\xa\xd", volume, 48.0 ); if ( send ( m_iSocket, m_vOutBuf, strlen ( m_vOutBuf ), 0 ) <= 0 ) break; else break; close ( m_iSocket ); 3-20 Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 87: What's Next

    Controlling a real-time application via TCP/IP What’s Next? Analog Devices believes that you have found this Getting Started with ADSP-BF537 EZ-KIT Lite a helpful introduction to your ADSP-BF537 EZ-KIT Lite and the VisualDSP++ development suite. The next steps are: • For a more detailed look at other capabilities of your EZ-KIT Lite...
  • Page 88 What’s Next? 3-22 Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 89: Creating A Tcp/Ip Application

    TCP/IP is a communication protocol that allows applications to transfer data regardless of their underlying communication media. To implement a TCP/IP application, several different elements are required. For an EZ-KIT Lite system, the TCP/IP application framework consists of: Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 90: Tcp/Ip Communications

    Network Connection. The network connection includes hardware and software components. The ADSP-BF537 EZ-KIT Lite is the hardware component that provides the physical connection between the processor and the Local Area Network (LAN). The software component is a set of libraries and device drivers to provide the communications between the application and hardware.
  • Page 91: Visualdsp++ Kernel (Vdk) Overview

    Analog Devices processors, such as the ADSP-BF537 processor. The kernel facilitates development of fast-perfor- mance structured applications using frameworks of template files.
  • Page 92: Create Sockets

    The API command for this is the “listen” command. 3. Client Connects with Host A client application can connect to a host application using the “connect” command. The “connect” command specifies the IP address of the host application. Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 93: Host Acknowledges Client

    In both applications, a TCP/IP stack must be created before any socket communications can take place. The TCP/IP libraries pro- vide calls to create and start the stack. Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 94 INITIALIZE SOCKET LISTEN FOR CONNECTIONS CONNECT TO HOST ESTABLISH CONNECTION BETWEEN CLIENT AND HOST HOST AND CLIENT EXCHANGE DATA PACKETS HOST AND CLIENT CLOSE SOCKETS Figure A-1. Host and Client Communication Control Flow Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 95 1-18 Blackfin processor simulators cycle-accurate interpreted, functional compiled, bubble sort algorithm, 1-7, 1-16 data build options, points, Build (project) command, 1-7, transfers, built-in cycle counters, 1-12 transport libraries, Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 96 1-18 functional compiled simulators, Media Access Controller, See MAC Media-Independent Interface (MII), memory placements, 1-11 message handshakes between client/host, payload (body), 3-7, headers, of VDK messages, type (header), host applications, mini-headphones, Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 97 2-1, 3-4, TCP/IP Stack application using LwIP and thread priorities, VDK, thread types Project window, 1-7, creating, input (audio applications), output (audio applications), process_audio (audio applications), quick sort, 1-7, 1-17 transferring data, Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...
  • Page 98 See distribution CD, UART Kernel (VDK), 2-1, USB jack, main window, USB_MONITOR LED, program code placement, 1-17 project configurations, simulators, VDK State History window, 3-13 TCP/IP software stacks, voltage levels, 1-18 Getting Started with ADSP-BF537 EZ-KIT Lite www.BDTIC.com/ADI...

Table of Contents