Question: Q 4 . ( 6 pts ) Timer Interrupts The following Thumr - 2 code shows an interrupt handler upon receiving a SysTick interrupt. You
Qpts Timer Interrupts The following Thumr code shows an interrupt handler upon receiving a SysTick interrupt. You don't have
to change it at all. Basically this handler invokes the timerupdate routine. Your task is to implement
timerupdate
The timerupdate function uses the following four parameters.
The timerupdate function reads the value of the SECONDLEFT address, decrements the value by
second checks the value, branches to timerupdatedone if the value hasn't reached otherwise it needs
to stop the timer and to invoke a user function whose address is maintained in the USRHANDLER address.
To stop the timer, write STCTRLSTOP to the address of STCTRLDont forget to save back a
decremented value into SECONDLEFT.
; Code the rest.
timerupdatedone
MON pc; return to SysTickHandler
The following C program defines sighandlerlines that is invoked upon receiving a SysTick interrupt
and that changes alarmed from to The main function lines initializes alarmed to line
schedules sighanlder to be invoked upon a SysTick interrupt line and starts SysTick to count down for
seconds line The main function falls into a while loop lines jumps sighandler upon
receiving a Sys Tick interrupt, and gets out of the while loop as alarmed eventually becomes
The following Thumr code shows an interrupt handler upon receiving a Sys Tick interrupt. You don't have
to change it at all. Basically this handler invokes the timerupdate routine. Your task is to implement
timerupdate
The timerupdate function uses the following four parameters.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
