Could anyone please let me know if there is a C function call to initialize the SPORT in 2191 EZKIT. Also, what is the 'sig' value in the interrupt function for SPORT transmit and/or receive. Thank you. Regards, Sumithira |
|
ADSP2191 Interrupt in C
Started by ●December 31, 2002
Reply by ●January 1, 20032003-01-01
--- In , sumithra anand <sumi_d18@y...> wrote: > Could anyone please let me know if there is a C > function call to > initialize the SPORT in 2191 EZKIT. Also, what is the > 'sig' value in > the interrupt function for SPORT transmit and/or > receive. Thank you. [please reply to only] The VDSP environment doesn't provide any library functions for any platform (EZKITs and other development boards) specific stuff. You need to write this yourself. What you can expect from the C library is a bunch of functions specific to the DSP as well as a whole bunch of math and DSP operations like fir and iir filters. The 'sig' value in the interrupt function is (I think) the value of the appropriate interrupt vector address you trying to hookup. I don't know much about the 2191, so I don't have specifics to offer, but these are usually defined in the def2191.h file. So you may be able to use one of the macro defines from this file for the interrupt you are trying to hook up. So your function call will probably look like interrupt(SPR0, spr0_isr); SPR0 (or something similar from the defxxx file) refers to the sport 0 receive port. spr0_isr is the isr name that you define in your C program. Cheers Bhaskar > > Regards, > Sumithira |
|
Reply by ●January 2, 20032003-01-02
Sumithira, I posted the talkthrough c example in the files. I think I may have accidentally emailed you earlier instead of posting to the list. For some reason when I reply it defaults to email the person who's message I'm responding to. Regards, Tim Dahin --- In , sumithra anand <sumi_d18@y...> wrote: > Could anyone please let me know if there is a C > function call to > initialize the SPORT in 2191 EZKIT. Also, what is the > 'sig' value in > the interrupt function for SPORT transmit and/or > receive. Thank you. > > Regards, > Sumithira |
Reply by ●January 2, 20032003-01-02
Hello Aumithra Anand, Have you already had a look at the "ADSP-219x/191 DSP hardware Reference". Start there. For the SIG values, I recommend you have a look at the "VisualDSP++ 2.0 (or 3.0, or whichever you have) C/C++ Compiler and Library Manual for ADSP-21xx DSPs". Kindest regards, Jaime Aranguren "bhaskar_thiagarajan <b...@yahoo.com>" <b...@yahoo.com> wrote: --- In a...@yahoogroups.com, sumithra anand wrote: |
Reply by ●January 2, 20032003-01-02
> Sumithira, > > You have to write your own function to init the > sport. > > You'll be using the following types of functions... > > sysreg_write(sysreg_IOPG, sport_X_iopg); //Set > Sport IOPG > io_space_write(io_memory_address , data); //Set > some Sport > Controller Register to a desired value > > When you use a signal value, you tie a service > routine to an > interrupt priority. When the interrupt handler is > called it will > invoke the interrupt service routine specified for > that signal. > > //Example > interrupt(signal9, sport_tx_dma_ISR); > > In the above, when an interrupt 9 occurs the > function > sport_tx_dma_ISR is called. The signal value > depends on what you > have set the IPR's (interrupt priority registers) to > <2191 Hardware > Manual Appendix B>. If these do not correspond you > could have a > Sport RX interrupt calling a UART RX interrupt > service routine. > Check out the Visual DSP++ 3.0 manual on the > following functions > interrupt, interrupts, and interruptf. It gives the > low down on the > degree of preservation for each handler routine... I > suggest checking > out the disassembly to get a better handle on what's > involved. > > You shouldg get ahold of the talkthrough c example. > Email me if you > need it. I also suggest going through the > talkthrough assembly > example too. > > To save yourself time... make sure to download the > latest updates for > Visual DSP from ftp.analog.com. > > Regards, > Tim Dahlin |