Forum Discussion
Altera_Forum
Honored Contributor
15 years agoHow to set Idle state ?
Hello, I'm a new user so be gentle :) I need to create an Idle state, I have ISR called by the clock every 1 ms, and I need to get rid of the for(;;) loop in the main function this is my...
Altera_Forum
Honored Contributor
15 years agoThere actually is a sleep mode in Nios 2. It's called usleep (). You can find it in the Nios II Software Developer’s Handbook.
int usleep (unsigned int us) and it can be found in <unistd.h>. But the best way to not let your program end is indeed to just put in a while(1) loop.