

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
The procedures for completing lab 3 in ee 451, which involves using interrupts and visualization tools on the c6713 dsp. Students will learn about different types of threads and how to use hardware interrupts (hwis) to read signals from line in and output them through line out in real-time. The document also covers using visualization tools like the cpu load graph and log event log for monitoring and debugging.
Typology: Lab Reports
1 / 3
This page cannot be seen from the preview
Don't miss anything!
Interrupts and Visualization Tools In this laboratory you will use hardware and software interrupts in the C6713. You will also use visualization tools available in the CCS. Introduction In previous labs you have been using the polling method to generate a signal with the C6713. In polling mode, a function polls, or tests, the Transmit Ready bit ( XRDY ) of the MCBSP serial port control register (SPCR), until this indicates that the codec is ready to receive a new output sample. A new output sample is sent to the codec using the function MCBSP_write ( ). Although polling is simpler than the interrupt technique, it is less efficient since the processor spends nearly all of its time repeatedly testing whether the codec is ready to transmit data. In the interrupt mode, an interrupt stops the current CPU process to that it can perform a required task initiated by an interrupt, and it is redirected to an interrupt service routine ( ISR ). The DSP/BIOS real-time operating system available on the CCS provides real-time scheduling, analysis, and data transfer capabilities for an application running on the DSP. The DSP/BIOS has a preemptive real-time scheduler that determines which one of a number of different threads is executed by the DSP at any given time. Threads are DSP/BIOS objects that contain program code (functions). There are five different threads that can be used in a DSP/BIOS application:
The Lab Create a program that uses an ISR to read a signal from LINE IN and output it through the LINE OUT in real-time. Connect the function generator to the LINE IN input and verify that the program can reproduce the signal at the LINE OUT. Part 1: Hardware Interrupts (HWIs) 1 Start CCS and begin a new project. You may use the same program template you used in the previous laboratory with some changes. You need to delete the statement while(1). There is no need to supply an explicit idle loop in a DSP/BIOS application. Modify the main() function to include the set up required to use interrupts, as depicted in Figure 1. 2 Create and add a configuration file to the project. Select File → New → DSP/BIOS Configuration. Select dsk6713.cdb as the template. Expand Scheduling and HWI – Hardware Interrupt Service Routine Manager and click on HWI_INT11. Right-click on HWI_INT11 and select properties to set the function to the ISR (in the sample template shown in Figure 1, it will be “_generate_sample”). Under the dispatcher tab, check Use Dispatcher. Note: there has to be an underscore preceding the name of your ISR. 3 Select Project → Build Options to the Compiler and Linker options. In the Advanced category of compiler options set the Memory Model option to Far Calls & Data. 4 Set the function generator to output a sinusoidal signal and connect it to the LINE IN of the board. 5 Connect an oscilloscope to the LINE OUT of the board and make sure the board is patching through the signal. Part 2: Visualization Tools 1 Modify your code and use the printf() function to display the data from the function generator. 2 Turn on the CPU Load Graph from the DSP/BIOS → CPU Load Graph, run your code and record the CPU load. What is the CPU load? 3 Now we will create a log event. Add the following code to your program: #include <log.h> extern LOG_Obj LOG_YourLogVariable; 4 You need to print the value from the LINE IN input using a LOG_printf() function.