Analog Devices ee-145 Application Notes

Engineer To Engineer Note EE - 145
Notes on using Analog Devices’ DSP componentsand development tools Phone: (800) ANALOG-D or (781) 461-3881, FAX: (781) 461-3010, EMAIL: dsp.support@analog.com
SPI Booting of the ADSP-2191 using the Atmel AT25020N on an EZ-KIT LITE Evaluation Board
Introduction:
Analog Devices ADSP-2191 i s the first DSP that provides booting via SPI. This note shows how to interface an ATMEL EEPROM (AT25020) in order to boot the ADSP-2191 via the SPI interface. With the help of a little project, this app note will describe how to create a loader file which is stored in the EEPROM and used to boot the DSP. The loader file format as well as the Hardware will be covered in order to build the whole project.
W2.0:
The latest version of VisualDSP++2.0 creates loader files suitable for SPI booting (Serial Peripheral Interface) automatically. Open Analog Devices VisualDSP++2.0 and make a new project. Add the linker description file (LDF) of the ADSP-2191 to the project first. This file defines the entire address range of the DSP and identifiers individual sections of memory with labels.
Figure 1 create a new project with VisualDSP++ 2.0
Copyright 2001, Analog Devices, Inc. All rights reserved. Analog Devices assumes no responsibility for customer productdesign ort he use or applicationof customers’ products or for any infringements of patents or rights of others which m ay result from Analog Devices assistance. All trademarks andlogos are property of their respective holders. Information furnished by AnalogDevices Applications and DevelopmentTools Engineers is believed to be accurate and reliable, however no responsibility is assumedbyAnalogDevices
regarding thetechnical accuracy of the content provided in allAnalog Devices’ Engineer-to-Engineer Notes.
1
Engineer To Engineer Note EE - 145
Notes on using Analog Devices’ DSP componentsand development tools Phone: (800) ANALOG-D or (781) 461-3881, FAX: (781) 461-3010, EMAIL: dsp.support@analog.com
Finally, add an existing assembly file of your choice (or create a new asm file to add) and the header file “def2191.h” which defines all of the ADSP-2191’s memory-mapped registers. If the ADSP-2191 processor is selected the project can now be build.
This way VisualDSP++2.0 will build an executable file “filename.dxe” which is required for debugging your program on the simulator or l oading it to and debugging it on the DSP via the emulator.
Note:
Ensure you have the most recent loader “elfloader.exe”. Find one in the zip file.
To prepare VisualDSP++ 2.0 SPI booting please open the “Project Options” dialog box from the “Project” menu. As shown in figure 2, on the project option tab change the option “type” in the “target” frame from “DSP e xecutable file” to “ Loader file”. This causes VisualDSP++ 2.0 to create a l oader file which can be stored in non-volatile memory of your choice. The ADSP-2191 is able to boot from different memory types. To select the appropriate booting device, select the “Loader” tab control in the “Project Options” box and set the Boot Type” to “SPI”. Select binary format in the “Format” frame to create a binary file that i s suitable for the most common programmers as shown in figure 3. The ASCII format lets the VisualDSP++ 2.0 l oader “elfloader.exe” build a loader file in ASCII format. This file can be accessed by any text editor easily. The binary file can be accessed by using a binary editor only. Finally, press the “OK” button on the dialog “Project Options” and again rebuild the whole project again. A file with the same name as the project and the extension .ldr will be generated. This .ldr file can be loaded by a programmer and written to the booting device (in this case to the AT25020 EEPROM) straight forward.
Figure 2 “Project” options dedicated to your project Figure 3 “Loader” options dedicated to your project
Copyright 2001, Analog Devices, Inc. All rights reserved. Analog Devices assumes no responsibility for customer productdesign ort he use or application of customers’products or for any infringements of patents or rights of others which m ay result from Analog Devices assistance. All trademarks andlogos are property of their respective holders. Information furnished by AnalogDevices Applications and DevelopmentTools Engineers is believed to be accurate and reliable, however no responsibility is assumedbyAnalogDevices
regarding thetechnical accuracy of the content provided in allAnalog Devices’ Engineer-to-Engineer Notes.
2
Engineer To Engineer Note EE - 145
Notes on using Analog Devices’ DSP componentsand development tools Phone: (800) ANALOG-D or (781) 461-3881, FAX: (781) 461-3010, EMAIL: dsp.support@analog.com
ADSP-2191 Startup basics:
The ADSP-2191 has a booting scheme that is different from former ADI DSPs. The boot kernel is located on-chip and stored in a 24-bit wide, 1K ROM. After a hardware reset the processor starts running at address FF0000h. Automatically the boot kernel will be processed. There are three input pins on the ADSP-2191 whose input state upon hard /RESET determines the booting mode. The state of the three pins (OPMODE, BMODE0 and BMODE1) are sampled on the rising edge of /RESET and are captured into the corresponding bits (0,1 and 2) of the System Configuration Register by software (boot kernel). In the case of SPI booting the kernel branches to the SPI booting subroutine. It initializes the SPI port using SPISS0 and sends the first commands to the SPI EEPOM. Referring to the AT25020 data sheet the first byte sent to the EEPROM in order to receive data is the value “0x3” (Read Timing). Followed by this command the starting address is sent ( 0x0 in this case). For more information see, section titled Hardware investigations. Received data coming from the serial EEPROM will then be unpacked and stored in the appropriate memory locations as the following section will explain.
Figure 4 Memory Map of the ADSP2191
Copyright 2001, Analog Devices, Inc. All rights reserved. Analog Devices assumes no responsibility for customer productdesign ort he use or application of customers’products or for any infringements of patents or rights of others which m ay result from Analog Devices assistance. All trademarks andlogos are property of their respective holders. Information furnished by AnalogDevices Applications and DevelopmentTools Engineers is believed to be accurate and reliable, however no responsibility is assumedbyAnalogDevices
regarding thetechnical accuracy of the content provided in allAnalog Devices’ Engineer-to-Engineer Notes.
3
Loading...
+ 7 hidden pages