Question: / / Main thread / / / / while ( 1 ) { / / 1 cycle to loop / / if ( 1 =

// Main thread
//
//while (1){//1 cycle to loop
// if (1==*pProcessInterrupt){//1 cycle to check the flag
// process(); //93 cycles to run the processing
//*pProcessInterrupt =0; //1 cycle to set the flag back to 0
//}// assume 0 cycles for this line
//}// assume 0 cycles for this line
// Assume 1 cycle to transition to the interrupt
//void interrupt_handler(){
//// interrupt takes 2 cycles
//*pProcessInterrupt =1;
//*interruptPending =0;
//}// Assume 1 cycle to transition back to the main program
/ / Main thread / / / / while ( 1 ) { / / 1 cycle

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!