Question
a) what would be a strategy to handle this scenario, i.e. what would happen when a higher-priority interrupt (HPI) occurs while a lower-priority interrupt (LPI)
a) what would be a strategy to handle this scenario, i.e. what would happen when a higher-priority interrupt (HPI) occurs while a lower-priority interrupt (LPI) is being processed?
b) What could be some factors that you think affect the interrupt priorities?
2.Imagine you have the following tasks that must occur in your embedded system: a. Read a temperature sensor every 5 ms b. Write a character out a serial port every 12 ms c. Toggle an I/O pin every 100 ms.
Let us say the processor in this example has only a single timer to use, i.e. you have more tasks that need to occur at a specific interval than there are timers to use for each task. What strategies can you think of implementing, to accomplish all the jobs a-c listed above? Write a simple C code snippet that would be used in the timer ISR to handle the three intervals for the jobs listed. Hint: You may create your own variable names for each task's flags and timerCounts.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started