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 ago --- Quote Start --- Do a text search for 'alt_main' and that will get you close. But leave the while(1) loop in your embedded code regardless of processor, operating system, and the availability (or not) of 'Idle' instructions. The point is not to see if you can make something unusual work under exactly the right conditions, it is to make it most likely to work under all conditions. There are enough problems with getting good code to run right, you don't need to stack bad coding on top of that. --- Quote End --- Thank you, where did you get your training, i'm searching for a good book/site and It seems that this forum is the only place ... Always happy to write better code :)