Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12747 ディスカッション

Program reset

Altera_Forum
名誉コントリビューター II
1,163件の閲覧回数

Hello! 

I have the following problem. I created simple project by Quartus|| 4.1. And write primitive program in Nios || IDE: 

int main() { int i=0; while(1) {   if (i==0)      IOWR_ALTERA_AVALON_PIO_DATA ( PIODIOD_BASE, 1);       else  if (i==10000)      IOWR_ALTERA_AVALON_PIO_DATA ( PIODIOD_BASE, 0);       i++;   if (i==20000) i=0;     } return 0; } 

Then I compiled all project and create *.sof file. 

Then I download this *.sof file to real deivece and I saw the next picture: my program works during 13 s, then 13 s of reset and again. I didn't do the program reset. 

How can I resolve this problem? 

Thank you.
0 件の賞賛
3 返答(返信)
Altera_Forum
名誉コントリビューター II
450件の閲覧回数

Hi, 

 

What do you exactly mean with 'reset' ? 

 

How many pulses do you see on the led? (1 a few or many?) 

How do you detect this?  

 

Is it restarting automatically or do you have to download again? 

 

Stefaan
Altera_Forum
名誉コントリビューター II
450件の閲覧回数

I don't think it's your code doing this because I see nothing wrong with it. You don't happen to have a watchdog in your system by any chance do you (then this would actually make sense).

Altera_Forum
名誉コントリビューター II
450件の閲覧回数

Check to see in Quartus if your cpu reset pin is connected preperly and that it has the correct pin assignement. Maybe you haven't put a pin asignement on the reset pin so the P&R has assigned the reset pin to a random pin that happens to toggle periodically.

返信