DSPRelated.com
Forums

ADSP-21364: Code from Application Note EE-268 won't work in VisualDSP 4

Started by konkurrence konkurrence January 13, 2006
Hello,

I tried running the code from application note EE-268 in VisualDSP 4 but it won't work.

I get the following error-message:

----------------Configuration: SRC_Test_1 - Debug----------------
.\SRC0_SRC1 with DAI.c
.\SPORT0 and SPORT1 with SRCs.c
.\main.c
".\main.c", line 74: cc0020: error: identifier "SRC0_RESET" is undefined
*pSRCCTL0 = SRC0_SMODEIN0 | SRC0_SMODEOUT0 | SRC0_RESET | SRC1_SMODEIN0 | SRC1_SMODEOUT0 | SRC1_RESET;//VDSP++3.5
^
".\main.c", line 74: cc0020: error: identifier "SRC1_RESET" is undefined
*pSRCCTL0 = SRC0_SMODEIN0 | SRC0_SMODEOUT0 | SRC0_RESET | SRC1_SMODEIN0 | SRC1_SMODEOUT0 | SRC1_RESET;//VDSP++3.5
^
2 errors detected in the compilation of ".\main.c".
cc3089: fatal error: Compilation failed
Tool failed with exit/exception code: 1.
Build was unsuccessful. ______________________________________________________________

Because of this error I tried to modify the SRC0Init-routine so it looked like this:

void SRC0Init()
{
*pSRCRAT0 |= SRC1_MUTEOUT;
*pSRCMUTE = SRC1_MUTE_EN;
*pSRCCTL0 = SRC0_SMODEIN0 | SRC0_SMODEOUT0 | SRC0_ENABLE ;
// *pSRCCTL0 = SRC0_SMODEIN0 | SRC0_SMODEOUT0 | SRC0_RESET | SRC1_SMODEIN0 | SRC1_SMODEOUT0 | SRC1_RESET;//VDSP++3.5
}

Now, it was possible to build and run without errors, but I don't hear any sound thru the speakers. I tried to connect the speakers to OUT1, OUT2, OUT3 and finally OUT4 but that didn't help.

Can anybody tell me what the problem is?

Thanks.

The code can be downloaded from here:

http://www.analog.com/UploadedFiles/Associated_Docs/52132174153372EE268v01.zip

Application note EE268:

http://search.analog.com/DSPKB/search.aspx?QT&8&Locale=en
Cheers