Embedded C What is the problem with putting a while1 or for

Embedded C:

What is the problem with putting a while(1) or for(;;) inside an ISR?

Solution

Ans) While(1) and for(;;) are infinte loops means the program counter will never get out of the loop because the condition is always true,when these loops are placed inside an ISR --interrupt service routine ,the PC-program counter will not go back to the main program once it comes to the ISR ,So remaining code in the main program will not be executed,to avoid this problem those loops should not be placed inside ISR

Embedded C: What is the problem with putting a while(1) or for(;;) inside an ISR?SolutionAns) While(1) and for(;;) are infinte loops means the program counter w

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site