Altera_Forum
Honored Contributor
14 years agoHelp! my program can't work with nios ii on DE1 board
Hi,there!
I built a nios project with the audio IP from university program IPs(version 10.1),and program as follow: int main(void) { alt_up_audio_dev *audio_dev; unsigned int r_buf=1000; unsigned int l_buf=1000; unsigned int fifospace; audio_dev=alt_up_audio_open_dev("/dev/audio_controller"); if(audio_dev==NULL) printf("Error:could not open audio device\n"); else printf("Opened audio device\n"); while(1) { fifospace=alt_up_audio_write_fifo_space(audio_dev,ALT_UP_AUDIO_RIGHT); if(fifospace>2) { alt_up_audio_write_fifo(audio_dev, &(l_buf),2,ALT_UP_AUDIO_LEFT); alt_up_audio_write_fifo(audio_dev,&(r_buf),2,ALT_UP_AUDIO_RIGHT); } } return 0; } I ensured that hardware connection was right,and a 18.4MHz clock signal from pll connected to wm8731 MCLK port,but when run as hardware in nios ii ide,no sound come out from line out port. I'm strongly puzzled.After looking for useful info in handbook pdf for a long time,found no. Can you help me? I'll sincerely appreciate that.