Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
17 years ago

NEEK codec, please, help !

Dear all,

I'm a researcher here at the University and I am coordinating a group of PhD students who need to solve this problem to finish their work. We have already tryied to contact TERASIC but no useful reply was given to us.

We received the NEEK kit (Nios II Embedded Evaluation Kit with Altera Cyclone III FPGA) a time ago. For our project, which is related to speech processing, it is essential to use the codec. I developed C code, by using Nios II plataform ,version 8.0 with service pack 1, and now can see that the LCD touch screen, the SDCard, Ethernet, PS2, VGA, RS232, and video work very well, however, I am having a problem to work with the codec. I downloaded many examples from Altera and TERASIC, and also the NEEK cdrom from

http://www.terasic.com/downloads/cd-rom/mtdb/.

In this last cdrom, there is one particular useful project that is the Terasic SD Card Music Player. In this example, the demo batch and also the full source code are included. When I execute the demo batch, everything works fine and therefore I can conclude that the kit is perfect. However, when I recompile the source code and try to execute it, in order to adapt it to my needs, I got some errors. The message I have seen is "Audio Init Fail: Address + 1 NACK !". I searched for the specific point inside the code to see what is happening. In the AUDIO_Init function of the file AUDIO.c, the commands

bSuccess = AUDIO_SetInterface(AIF_MSB_LEFTJUST | AIF_16BIT);

and

bSuccess = AUDIO_SetActive(TRUE);

are returning false, i.e., something is wrong which makes the AUDIO_Init function returns false. Therefore, AUDIO_Init fails and I can not read or write to the codec and can not hear anything in the loudspeakers.

In fact, we only need a way to read from the codec and write to it, USING C LANGUAGE (NOT vhdl/verilog) under the NEEK kit (with Nios II 8.0 sp 1.0 and Cyclone III).

Please, help !
No RepliesBe the first to reply