Home

ANALOG DEVICES EE-243 handbook

image

Contents

1. Listing 2 configdai c Using the Expert DAI for SHARC Processors EE 243 Page 8 of 9 References Analog Devices Inc Document History ANALOG DEVICES 1 ADSP 2126x SHARC Processor Hardware Reference Rev 4 0 April 2010 Analog Devices Inc ADSP 2136x SHARC Processor Hardware Reference Rev 2 0 April 2009 Analog Devices Inc ADSP 2137x SHARC Processor Hardware Reference Rev 2 1 May 2010 Analog Devices Inc ADSP 2146x SHARC Processor Hardware Reference Rev 0 2 August 2009 Analog Devices Inc Configuring the Signal Routing Unit of ADSP 2126x SHARC DSPs EE 232 Rev 1 February 2004 Revision Description Rev 7 June 28 2010 by Mitesh Moonat Fixed some known issues with the previous DLL file version Also tested the plug in under VisualDSP 5 0 Update 8 Rev 6 May 13 2010 by Mitesh Moonat Added support for ADSP 2147x and ADSP 2148x SHARC processors Rev 5 December 18 2009 by Jeyanthi Jegadeesan Modified the plug in to remove the DAI_PIN_PULLUP and DPI_PIN_PULLUP registers printing for ADSP 2146x processors Also tested the plug in under VisualDSP 5 0 Update 7 Furthermore added information on registering the plug in under Windows Vista operating system Rev 4 April 15 2009 by Jeyanthi Jegadeesan Changed title from Using the Expert DAI for ADSP 2126x ADSP 2136x and ADSP 2137x SHARC Processors to Using the Expert DAI for SHARC Processors to reflect
2. Assembly v DE v Ganeieitads Invert Pin20 J Invert Ext Mise A4 invert Pin19 Invert Ext Misc A5 Legend Save Configuration Load Configuration DPI PIN ASSIGNMENTS Figure 4 Generating C code for configuring the SRU and SRU2 in ADSP 21367 processors The SRU routing diagram is also updated to reflect the connections The C code generated for this configuration is shown in Listing 2 of the Appendix Using the Expert DAI for SHARC Processors EE 243 Page 5 of 9 ANALOG DEVICES Unlike the example in Figure 3 the DAI pins configured in Figure 4 demonstrate the signals for multiple destination signals DAI pin 1 provides the clock for SPORTO and SPORT1 Similarly DAI pin 2 provides the frame sync for SPORTO and SPORT1 When a single DAI pin feeds multiple destination signals the destination signals connected to the DAI pin do not appear in the SRU routing diagram You will be prompted to click for any DAI pin that provides the signal to multiple destination signals After clicking a particular DAI pin a small window appears Figure 5 displaying all of the destination signals connected to that DAI pin For example clicking on DAI pin 2 causes the following window to pop up identifying the destination signals as SPORTO_FS and SPORT1_FS EXPERT SRU CODE GENERATOR FOR ADSP 21367 SRU Routing Pin 1 Pin 2 Pin 3 Pin 4 click here click here sport0 da sporti_da Pin 5 Pin 6 Pin Pin Ping Pin 11 Pi
3. levels of compatibility without increasing pin count The SRU in all the above processor families contains at least six groups of registers named A through F ADSP 2147x family of processors contain an additional group named group G to support routing of shift register signals Each group routes a unique set of signals with a specific purpose For example group A routes clock signals group B routes frame sync signals and group C routes serial data signals Together the SRU s groups include all of the DAI peripherals inputs and outputs additional signals from the core and all the connections to the DAI pins For additional information on the DAI and SRU refer to the processor s Hardware Reference Manual 17 0114 Programming the SRU requires an in depth understanding of the SRU registers bit field positions corresponding to different destination signals in all the registers the number of bits allocated for each bit field in all the registers and the values that correspond to different source signals in all of the registers VisualDSP tools include a macro for programming the SRU registers This macro requires that you have background knowledge about all of the SRU signals and registers The Expert DAI plug in however provides an easy method of generating the code necessary to configure the SRU registers The Expert DAI graphical user interface allows you to generate the code without having to worry about the internal details Note th
4. Engineer to Engineer Note EE 243 ANALOG Technical notes on using Analog Devices DSPs processors and development tools Visit our Web resources http www analog com ee notes and http www analog com processors or DEVICES e mail processor support analog com or processor tools support analog com for technical support Using the Expert DAI for SHARC Processors Contributed by Mitesh Moonat Jeyanthi Jegadeesan Jagadeesh Rayala and Srinivas K Rev 7 June 28 2010 Introduction This EE Note explains how you use the VisualDSP Expert DAI plug in to configure the signal routing unit SRU in ADSP 2126x ADSP 2136x ADSP 2137x and ADSP 214xx SHARC processors The Expert DAI plug in simplifies the task of generating the C and or assembly code that is used to program the SRU The Expert DAI plug in associated with this EE Note can be used with the VisualDSP 3 5 4 0 4 5 and 5 0 versions Digital Audio Interface and SRU The digital audio interface DAI in ADSP 2126x ADSP 2136x ADSP 2137x and ADSP 214xx SHARC processors comprises a group of peripherals and the SRU The peripheral s inputs and the outputs do not connect to the 20 external DAI pins DAI_P20 1 directly Instead the SRU establishes these connections based on a set of configuration registers This feature allows you to interconnect the peripherals to suit a wide variety of systems It also allows including an arbitrary number and variety of peripherals while retaining high
5. OW PBENO3_1I SRU DAI_PB03_0 SPORTO_DA I Return back from the subroutine ESY Listing 1 configdai asm configdai c include lt sru h gt include lt def21367 h gt This function will setup the SRU Registers WoOrkel IME Siw Enable pull up resistors on unused DAI pins volatile int DAI_PIN_PULLUP Oxffff0 Enable pull up resistors on unused DPI pins s wyollaiesllhe sliaie DETI PINA EULEVE TOENE Generating Code for connecting SPORT1_DA to DAI_PIN4 SRU HIGH PBENO4 I SRU SPORT1_DA_O DAI_PBO4_ I Generating Code for connecting DAI_PIN1 to SPORTO_CLK Using the Expert DAI for SHARC Processors EE 243 Page 7 of 9 ANALOG DEVICES SRU LOW PBENO1_I SIU DA PEO SPORWO_ Cink ETI Generating Code for connecting DAI_PIN1 to SPORT1_CLK SRU LOW PBENO1_I SAU DAL PEO ROR TIECK i p Generating Code for connecting DAI_PIN2 to SPORTO_FS SRU LOW PBENO2_I SIU DAI PRO2 SPORIO_ S10 p Generating Code for connecting DAI_PIN2 to SPORT1_FS SRU LOW PBENO2_I SIU DAI PRO2 SPORWIL ISI p Generating Code for connecting DAI_PIN3 to SPORTO_DA SRU LOW PBENO3_I SRURDAITMEBO CLON C Relk Om Amale a Generating Code for connecting DPI_PIN14 to FLAG4 SRU LOW DPI_PBEN14_I SRU DPI_PB14 0 FLAG4 I Generating Code for connecting TIMERO to DPI_PIN8 SRU HIGH DPI_PBENO8_I SINW WIM IDE I_IPe0 E _IL p
6. Pin 5 Pin 6 Pin 3 Pin 11 Pin 12 Pin 13 Pin 14 Pin 15 Pin 16 Pin 17 Pin 18 Pin 13 Processor User Inputs ADSP 21261 Source Destination ADSP 21261 a ADSP 21262 PCG_CLKA PCG_EXTB ADSP 21266 PCG _CLKA PCG_EXTB a ADSP 21267 PCG_CLKB SPORTO_CLK ADSP 21363 PCG_FSA SPORT1_CLK Code Generation PCG_FSB SPORT2_CLK SPORTO_CLK SPORT3_CLK LIC Code SPORTO_LFS DAI_PIN1 C Assembly SPORTO_DA DAI_PIN2 Invert Pin20 J Invert Ext Misc A4 invert Pin19 Invert Ext Misc A5 Legend Save Configuration Load Configuration DAI PIN ASSIGNMENTS System Configuration DPI PIN ASSIGNMENTS Figure 2 Expert DAI window Using Expert DAI To generate code 1 In Processor select the processor for which you want to generate code 2 Under User Inputs configure connections between the source and destination signals by selecting the signals from the respective Source and Destination list boxes and clicking Add When you select a signal in the Source box the signals that appear in the Destination box are updated with valid destinations that correspond to the selected source signal If you try to route two source signals to the same destination signal the Expert DAI tool will signal an error Similarly the tool will generate an error if you select a DAI pin as a source of one connection and try to select the same DAI pin as a destination in a subsequent connection and vice versa As you add connections the System Co
7. at in addition to SRU and DAI the ADSP 21367 ADSP 21368 ADSP 21369 ADSP 2137x and ADSP 214xx processors have a secondary Signal Routing Unit SRU2 and 14 pins which are available on Copyright 2004 2010 Analog Devices Inc All rights reserved Analog Devices assumes no responsibility for customer product design or the use or application of customers products or for any infringements of patents or rights of others which may result from Analog Devices assistance All trademarks and logos are property of their respective holders Information furnished by Analog Devices applications and development tools engineers is believed to be accurate and reliable however no responsibility is assumed by Analog Devices regarding technical accuracy and topicality of the content provided in Analog Devices Engineer to Engineer Notes ANALOG DEVICES the Digital Peripheral Interface DPI SRU2 is used to map different peripheral signals to the DPI pins The Expert DAI plug in can be used to generate the C ASM code for the SRU and SRU2 Installing Expert DAI To install the Expert DAI plug in in the VisualDSP environment 1 Extract the file AdvancedExpertDAI d11 from the associated z1p file and place it in the VisualDSP system directory If VisualDSP 5 0 version is installed on your C drive copy the attached file into the following directory C Program Files Analog Devices VisualDSP 5 0 System 2 Register the AdvancedExpertDAI d11 file by typi
8. en create the code to configure the SRU Code Generation This section use examples to describe the code generation process Figure 3 demonstrates the generation of assembly code for configuring the SRU in ADSP 21262 processors AdvExpertDAI EXPERT SRU CODE GENERATOR FOR ADSP 21262 SRU Routing Pin 1 Pin 2 Pin 3 Pin 4 Pin 5 Pin 6 Ping Pin 10 sport0 cik sport0_fs sport0_da Pin 11 Pin 12 Processor ADSP 21262 ADSP 21261 ADSP 21262 J ADSP 21266 ADSP 21267 ADSP 21363 Y Code Generation COC Code Assembly Generate Code Legend DPI PIN ASSIGNMENTS Figure 3 Generating assembly code for configuring the SRU in ADSP 21262 processors Pin13 Pin 14 Pin15 Pin 16 Pin17 User Inputs Source DAI_PIN3 DAI_PIN1 Destination SPORTO_DA A PCG_EXTA PCG_EXTB SPORTO_CLK SPORTO FS SPORTO DA SPORTO_DB DAI_PIN SPORT1_CLK i C invert Pin 20 J Invert Ext Mise A4 Invert Pin19 7 Invert Ext Misc A5 Save Configuration Load Configuration Pin 18 Pin 19 Pin 20 System Configuration gt SPORTO CLK gt SPORTO_LFS gt SPORTO_DA Using the Expert DAI for SHARC Processors EE 243 ANALOG DEVICES Code is generated to perform the following connections DAI pin 1 DAT_PIN1 is configured as an input to provide the clock for SPORTO m DAI pin 2 DAI_PINZ2 is configured as an input to provide the frame sync for SPORTO DAI pin 3 DAI_PIN3 is configu
9. n 12 Pin 13 Pin 1 n18 Pin19 Pin 20 Processor User Inputs DESTINATIONS SPORTO_FS SPORT1_FS Source TIMERO System Configuration DAI PINT gt SPORTO CLK gt SPORT1_CLK gt SPORTO_FS gt SPORT1_FS gt SPORTO_DA DPI_PINT4 Code Generation TIMERO C Code Assembly Generate Code i DPL_PINS v CJ Invert Pin 20 Invert Ext Misc A4 CJ Invert Pin19 Invert Ext Misc A5 Save Configuration Load Configuration Legend DAI PIN ASSIGNMENTS DPI PIN ASSIGNMENTS Figure 5 Checking the destination signals routed to DAI pin 2 Once the C assembly code is generated you must add this file to your project For C code the main function must call the function InitSRuU For assembly code the main program must call the subroutine InitSRU Using the Expert DAI for SHARC Processors EE 243 Page 6 of 9 Appendix configdai asm ANALOG DEVICES include lt sru h gt include lt def21262 h gt This function will setup the SRU Registers section pm seg_pmco O opalin SRU TMS RU Enable pull up resistors on unused DAI pins 10 Osceiicicts 9 dm DAI_PIN_PULLUP r0 Generating Code for connecting DAI_PIN1 to SPORTO_CLK SRU LOW PBENO1_I SRU DAI_PBO1_0 SPORTO_CLK_I Generating Code for connecting DAI_PIN2 to SPORTO_FS SRU LOW PBENO2_ TI SIR IDVAL_ PBO2Z O SiPORNG SI p Generating Code for connecting DAI_PIN3 to SPORTO_DA SRU L
10. new processor support Furthermore updated document and Expert DAI plug in to include support for the ADSP 2146x SHARC processors Also fixed some known issues with the previous DLL file version Rev 3 June 29 2006 by Jeyanthi Jegadeesan Updated the application note and the ExpertDAI plug in to include support for the ADSP 21369 ADSP 21371 and ADSP 21375 processors Rev 2 June 01 2005 by R Jagadeesh Updated the application note and the ExpertDAI plug in to include support for the complete series of ADSP 2136x processors Rev 1 October 11 2004 by R Jagadeesh Initial release Using the Expert DAI for SHARC Processors EE 243 Page 9 of 9
11. nfiguration box and the SRU routing diagram update appropriately 3 Select the appropriate check boxes to invert various signals logic level of DAI pin 19 DAI pin 20 Ext Misc A4 and Ext Misc A5 4 Select the appropriate check boxes and click Generate Code to generate the C and or assembly code Using the Expert DAI for SHARC Processors EE 243 Page 3 of 9 ANALOG DEVICES If the processor type is changed after you have added the connections data in the SRU routing diagram and in the System Configuration is cleared automatically At the same time the signals that appear in the Source and Destination boxes are refreshed and updated for the selected processor To remove a connection select the connection in the System Configuration box and click Delete The SRU routing diagram refreshes automatically and the System Configuration box is updated The Expert DAI plug in also provides these features m Save Configuration Saves the information about the selected processor the added connections and the state of each check box Clicking Save Configuration stores the information in an output file with a cFG extension m Load Configuration Loads a saved configuration cFG file Clicking Load Configuration prompts you to select a crc file After selecting the crc file the Expert DAI window refreshes presenting the contents in the cFG file At this point you can add delete modify the connections per your new design and th
12. ng the following command line regsvr32 exe AdvancedExpertDAI dll Note Run regsvr32 exe from the System directory not from the root directory For Windows Vista as well as for Windows 7 operating system the command prompt should be opened in administrator mode as shown in Figure 1 dJ Accessories 8 Bluetooth File Transfer Wizard E Calculator E Command Promot 2 Connect to a Open a Notepad Run as administrator Favorites Recent Items F Paint Open file location mi Remote Desk D WinZip gt I Run amp Snipping Tool L Sound Record Sync Center Restore previous versions i Welcome Cen M Windows Expl Send To 3 E5 Windows Mok Cut Pin to Start Menu Add to Quick Launch BB Windows Side fA WordPad Copy Lp Ease of Acces Delete d System Tools Tenane J Tablet PC d Windows Pow Properties Figure 1 Accessing command prompt as administrator in Windows Vista operating system The Expert DAI tool now appears in the Settings gt Preferences gt Plugins menu You can access Expert DAI from the Tools gt Plugins menu Figure 2 shows the default state of the Expert DAI window Note that the Expert DAI plug in is only activated for the SHARC processors that have Signal Routing Units Using the Expert DAI for SHARC Processors EE 243 Page 2 of 9 ANALOG DEVICES AdvExpertDAI EXPERT SRU CODE GENERATOR FOR ADSP 21261 SRU Routing Pin 1 Pin 2 Pin 4
13. red as an input to provide the data for SPORTO DA The SRU routing diagram is also updated to reflect the added connections The assembly code generated for this configuration is shown in Listing 1 of the Appendix Figure 4 demonstrates the generation of C code for configuring the SRU and SRU2 in ADSP 21367 processors Code is generated to perform the following connections DAI pin 1 DAI_PIN1 is configured as an input to provide the clock for SPORTO and SPORT1 DAI pin 2 DAI_PIN2 is configured as an input to provide the frame sync for SPORTO and SPORT1 m DAI pin 3 DAI_PIN3 is configured as an input to provide the data for SPORTO DA SPORT DA provides the data for DAI pin 4 DAT_P1N4 which is configured as an output DPI pin 14 DPI_PIN14 is configured as an input to provide the signal for FLAG 4 m TIMER 0 provides the signal for DPI pin 8 DP1_PIN8 which is configured as an output AdvExpertDAI EXPERT SAU CODE GENERATOR FOR ADSP 21367 SRU Routing Pin 1 Pin 2 Pin 3 Pin 4 Pin 5 Pin 6 Pin 7 Pin 3 click here click here sport0_da_ sporti_da Pin 11 Pin 12 Pin 13 Pin 14 Pin 15 Pin 16 Pin 17 Pin 18 Pin 193 Pin 20 Processor User Inputs System Configuration poe etse7 Source Destination DAI_PIN1 gt SPORTO CLK ADSP 21364 ADSP 21265 TIMERO DPI_PINS ADSP 21366 TIMERO A DPI_PIN2 ADSP 21367 DPI_PIN3 ADSP 21368 v DPI_PIN4 i DPI_PINS DPI_PINT4 Code Generation DPI_PIN6 TIMERO C Code DPI_PIN Cl

Download Pdf Manuals

image

Related Search

ANALOG DEVICES EE 243 handbook

Related Contents

                ASRock 880GXH/USB3 Motherboard Installation Guide    

Copyright © All rights reserved.
DMCA: DMCA_mwitty#outlook.com.