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++

Program reset

Altera_Forum
Honored Contributor II
974 Views

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 Kudos
3 Replies
Altera_Forum
Honored Contributor II
261 Views

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
0 Kudos
Altera_Forum
Honored Contributor II
261 Views

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).

0 Kudos
Altera_Forum
Honored Contributor II
261 Views

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.

0 Kudos
Reply