This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
resources:fpga:altera:ced1z:ad7938 [29 Nov 2011 09:57] – [Load and Run the Demonstration Project] Changed screenshots ucprobeopen, ad7938intefaceopen, loadelfucprobe, loadelfsoftware. Removed reference to Quick evaluation folder. Renamed ucProbeInterface folder to ucProbe. Adrian Costina | resources:fpga:altera:ced1z:ad7938 [26 Jan 2021 01:23] (current) – update arrow links after their web site update Robin Getz | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== CED1Z FPGA Project for AD7938 with Nios driver | ====== CED1Z FPGA Project for AD7938 with Nios driver | ||
- | ====== Overview | + | ====== Overview ===== |
- | This document presents the steps to setup an environment for using the **[[adi> | + | This document presents the steps to setup an environment for using the **[[adi> |
{{ : | {{ : | ||
Line 18: | Line 18: | ||
* [[adi>/ | * [[adi>/ | ||
* [[http:// | * [[http:// | ||
- | * [[http:// | + | * [[https://www.micrium.com/ |
====== Getting Started ====== | ====== Getting Started ====== | ||
Line 37: | Line 37: | ||
* [[http:// | * [[http:// | ||
* [[https:// | * [[https:// | ||
- | * [[http:// | + | * [[https://www.micrium.com/ |
- | * {{: | + | |
The **Quartus II** design software and the **Nios II EDS** is available via the Altera Complete Design Suite DVD or by downloading from the web. | The **Quartus II** design software and the **Nios II EDS** is available via the Altera Complete Design Suite DVD or by downloading from the web. | ||
The **Micrium uC/Probe Trial** version is available via download from the web at [[http:// | The **Micrium uC/Probe Trial** version is available via download from the web at [[http:// | ||
+ | ===== Downloads ===== | ||
+ | * {{: | ||
===== Extract the Lab Files ===== | ===== Extract the Lab Files ===== | ||
Create a folder called “**// | Create a folder called “**// | ||
+ | ^ **Folder** ^ **Description** ^ | ||
+ | | FPGA | Contains all the files necessary to program the CED1Z board in order to evaluate the ADC. By executing the script // | ||
+ | | Hdl | Contains the source files for the AD7938 HDL driver: \\ - The //doc// subfolder contains a brief documentation for the driver. \\ - The //src// subfolder contains the HDL source files. | ||
+ | | NiosCpu | Contains the CED1Z Quartus evaluation project source files . The //ip// subfolder contains the AD7938 SOPC component. | | ||
+ | | Software | Contains the source files of the uCProbe library and the main file of the Nios2 SBT evaluation project.| | ||
+ | | uCProbe | Contains the uCProbe interface and data capture script used to acquire data from the evaluation board and store it in a local .csv file. | | ||
===== Install the USB-Blaster Device Driver ===== | ===== Install the USB-Blaster Device Driver ===== | ||
- | + | {{page>: | |
- | The USB Blaster is used to program the FPGA on the CED1Z board and also for data exchange between the system and a PC. To install the driver plug the Terasic USB Blaster into one of the PCs USB ports. Your Windows PC will find the new hardware and try to install the driver. | + | |
- | + | ||
- | {{ : | + | |
- | + | ||
- | Since Windows cannot locate the driver for the device the automatic installation will fail and the driver has to be installed manually. In the //Device Manager// right click on the **USB-Blaster** device and select **//Update Driver Software// | + | |
- | + | ||
- | {{ : | + | |
- | + | ||
- | In the next dialog box select the option **//Browse my computer for driver software// | + | |
- | + | ||
- | {{: | + | |
- | <WRAP clear></ | + | |
- | <note tip>If Windows presents you with a message that the drivers have not passed Windows Logo testing, please click “**// | + | |
- | + | ||
- | {{: | + | |
======= AD7938 Evaluation Project Overview ======= | ======= AD7938 Evaluation Project Overview ======= | ||
Line 157: | Line 149: | ||
^ Name ^ Offset ^ Width ^ Access ^ Description ^ | ^ Name ^ Offset ^ Width ^ Access ^ Description ^ | ||
- | | CONTROL_REGISTER | + | | CONTROL_REGISTER |
| ACQ_COUNT_REGISTER | | ACQ_COUNT_REGISTER | ||
| BASE_REGISTER | | BASE_REGISTER | ||
Line 165: | Line 157: | ||
======== Quick Evaluation ======== | ======== Quick Evaluation ======== | ||
+ | {{page>: | ||
- | The next sections of this document present all the steps needed to create a fully functional project that can be used for evaluating the operation of the ADI platform. It is possible to skip these steps and load into the FPGA an image that contains a fully functional system that can be used together with the uC-Probe interface for the ADI platform evalution. | + | ====== NIOS II Software Design ====== |
- | The first step of the quick evaluation process is to program the FPGA with the image provided in the lab files. Before the image can be loaded the **Quartus | + | |
- | To load the FPGA image you must first make sure that the USB cable is not connected to the CED1Z board. Connect the USB Blaster to the J6 connector of the CED1Z and power the board. Run the **// | + | |
- | Now the FPGA contains a fully functional system and it is possible to skip directly to the **Evaluation Project User Interface** section of this document. | + | |
- | |||
- | ====== NIOS II Software Design ====== | ||
This section presents the steps for developing a software application that will run on the **CED1Z** system and will be used for controlling and monitoring the operation of the ADI evaluation board. | This section presents the steps for developing a software application that will run on the **CED1Z** system and will be used for controlling and monitoring the operation of the ADI evaluation board. | ||
Line 180: | Line 168: | ||
Launch the **Nios II SBT** from the **//Start -> All Programs -> Altera -> Nios II EDS 11.0 -> Nios II 11.0 | Launch the **Nios II SBT** from the **//Start -> All Programs -> Altera -> Nios II EDS 11.0 -> Nios II 11.0 | ||
Software Build Tools for Eclipse (SBT)//**. | Software Build Tools for Eclipse (SBT)//**. | ||
- | <note tip> | + | <WRAP tip> |
=== 1. Initialize Eclipse workspace === | === 1. Initialize Eclipse workspace === | ||
Line 200: | Line 188: | ||
* Click the **// | * Click the **// | ||
- | {{ : | + | {{ : |
The tool will create two new software project directories. Each Nios II application has 2 project directories in the Eclipse workspace. | The tool will create two new software project directories. Each Nios II application has 2 project directories in the Eclipse workspace. | ||
Line 227: | Line 215: | ||
The memory used by the design is should be changed from OnChip ram to SRAM. | The memory used by the design is should be changed from OnChip ram to SRAM. | ||
* Select **//Linker Script//** tab. | * Select **//Linker Script//** tab. | ||
- | * Change all possible **//Linker Region Name//** from **// | + | * Change all possible **//Linker Region Name//** from **// |
- | {{ : | + | {{ : |
* Select **//File -> Save//** to save the board support package configuration to the // | * Select **//File -> Save//** to save the board support package configuration to the // | ||
* Click the **// | * Click the **// | ||
* When the generate has completed, select **//File -> Exit//** to close the BSP Editor. | * When the generate has completed, select **//File -> Exit//** to close the BSP Editor. | ||
- | |||
- | ===== Configure BSP Project Build Properties ===== | ||
- | |||
- | In addition to the board support package settings configured using the **//BSP Editor//**, there are other compilation settings managed by the Eclipse environment such as compiler flags and optimization level. | ||
- | * Right click on the **// | ||
- | * On the left-hand menu, select **//Nios II BSP Properties// | ||
- | * During compilation, | ||
- | * Since our software does not make use of C++, uncheck **//Support C++//**. | ||
- | * Check the **//Reduced device drivers//** option | ||
- | * Check the **//Small C library//** option | ||
- | * Press **// | ||
- | |||
- | {{ : | ||
===== Add source code to the project ===== | ===== Add source code to the project ===== | ||
Line 258: | Line 233: | ||
* A dialog box will appear to select the desired operation. Select the option **//Copy files and folders//** and press **//OK//**. | * A dialog box will appear to select the desired operation. Select the option **//Copy files and folders//** and press **//OK//**. | ||
- | {{ : | + | {{ : |
* This should cause the source files to be physically copied into the file system location of the software project directory and register these source files within the Eclipse workspace so that they appear in the Project Explorer file listing. | * This should cause the source files to be physically copied into the file system location of the software project directory and register these source files within the Eclipse workspace so that they appear in the Project Explorer file listing. | ||
{{ : | {{ : | ||
- | |||
- | ===== Configure Application Project Build Properties ===== | ||
- | |||
- | Just as you configured the optimization level for the BSP project, you should set the optimization level for the application software project **// | ||
- | * Right click on the **// | ||
- | * On the left-hand menu, select the **//Nios II Application Properties// | ||
- | * Change the **// | ||
- | * Press **// | ||
- | |||
- | {{ : | ||
===== Define Application Include Directories ===== | ===== Define Application Include Directories ===== | ||
Line 332: | Line 297: | ||
To run the software project on the Nios II processor: | To run the software project on the Nios II processor: | ||
- | | + | * Before running the the software project, the FPGA located on the CED1Z must be programmed with the Nios II system image. To program the FPGA run the // |
- | * Press the **//Run//** button in the **//Run Configurations// | + | |
{{ : | {{ : | ||
- | <note>The code size and start address might be different than the ones displayed in the above screenshot.</ | + | <WRAP round help>The code size and start address might be different than the ones displayed in the above screenshot.</ |
====== uC-Probe Interface ====== | ====== uC-Probe Interface ====== | ||
- | + | {{page>: | |
- | A notable challenge in embedded systems development is to overcome the lack of feedback that such systems typically provide. Many developers resort to blinking LEDs or instrumenting their code with // | + | |
- | This section presents the steps required to run the demonstration project for the ADI evaluation board. A description of the **uC-Probe** demonstration interface is provided. | + | |
- | + | ||
- | ===== Configure uC-Probe ===== | + | |
- | + | ||
- | Launch **uC-Probe** from the **//Start -> All Programs -> Micrium -> uC-Probe// | + | |
- | + | ||
- | Select **uC-Probe** options. | + | |
- | * Click on the **uC-Probe** icon on the top left portion of the screen. | + | |
- | * Click on the **// | + | |
- | + | ||
- | {{ : | + | |
- | + | ||
- | Set target board communication protocol as **//JTAG UART//** | + | |
- | * Click on the **// | + | |
- | * Select the **//JTAG UART//** option. | + | |
- | + | ||
- | {{ : | + | |
- | + | ||
- | Setup **//JTAG UART//** communication settings | + | |
- | * Select the **// | + | |
- | * Press the **//Open File//** button to select the JTAG Debug Information file (**// | + | |
- | * Navigate to the **// | + | |
- | * Type the value **//1//** in the the **//Device Id//** window. | + | |
- | + | ||
- | {{ : | + | |
- | + | ||
- | * Select **// | + | |
- | + | ||
- | {{ : | + | |
- | + | ||
- | * Press **// | + | |
===== Load and Run the Demonstration Project ===== | ===== Load and Run the Demonstration Project ===== | ||
Line 393: | Line 327: | ||
The following figure presents the uC-Probe interface that can be used for monitoring and controlling the operation of the EVAL-AD7938CBZ evaluation board. | The following figure presents the uC-Probe interface that can be used for monitoring and controlling the operation of the EVAL-AD7938CBZ evaluation board. | ||
- | {{ : | + | {{ : |
In order to capture data from the ADC using the uCProbe demonstration project the following steps must be performed: | In order to capture data from the ADC using the uCProbe demonstration project the following steps must be performed: | ||
Line 399: | Line 333: | ||
* Start **// | * Start **// | ||
* Depending on how the AD7938 part is configured set the data format to either //**Binary Offset**// or // | * Depending on how the AD7938 part is configured set the data format to either //**Binary Offset**// or // | ||
+ | * Set the states of the bits from the // | ||
* Press **// | * Press **// | ||
* The data stored in the CED1Z SRAM memory is transfered to the PC through the JTAG-UART link provided by the USB Blaster. The **// | * The data stored in the CED1Z SRAM memory is transfered to the PC through the JTAG-UART link provided by the USB Blaster. The **// | ||
Line 412: | Line 347: | ||
// | // | ||
====== Troubleshooting ====== | ====== Troubleshooting ====== | ||
- | + | {{page>: | |
- | In case there is a communication problem with the board the follwing actions can be perfomed in order to try to fix the issues: | + | |
- | * Check that the evaluation board is powered. | + | |
- | * Make sure the USB cable is not connected to the CED1Z. In case it is, disconnect it and reset the board. | + | |
- | * Check that the USB Blaster cable is properly connected to the device and to the computer and that the **//USB Blaster Device Driver//** driver is installed correctly. If the deriver is not correctly installed perform the steps described in the **//Getting Started -> Install te USB-Blaster Device Driver//** section. | + | |
- | * In uC-Probe right-click on the **//System Browser//** window select **//Remove Symbols// | + | |
- | + | ||
- | {{: | + | |
- | + | ||
- | * After removing the symbols a new set of symbols must be added in order for the interface to be functional. In uC-Probe right-click on the **//System Browser//** window select **//Add Symbols// | + | |
- | + | ||
- | {{ : | + | |
- | + | ||
- | * If the communication problem persists even after performing the previous steps, restart the uC-Probe application and try to run the interface again. | + | |