Bryan and Naved Debub monitor
timer0.cpp File Reference
---------------------------------------------------------------------------- More...
Go to the source code of this file.
Detailed Description
----------------------------------------------------------------------------
-- -- -- ECEN 5803 Mastering Embedded System Architecture -- -- Project 1 Module 4 -- -- Microcontroller Firmware -- -- Timer0.cpp -- -- -- ------------------------------------------------------------------------------- -- -- Designed for: University of Colorado at Boulder -- -- -- Designed by: Tim Scherr -- Revised by: Student's name -- -- Version: 2.1 -- Date of current revision: 2017-09-25 -- Target Microcontroller: Freescale MKL25ZVMT4 -- Tools used: ARM mbed compiler -- ARM mbed SDK -- Freescale FRDM-KL25Z Freedom Board -- -- Functional Description: This file contains code for the only interrupt routine, based on the System Timer. The System Timer interrupt happens every 100 us as determined by mbed Component Configuration. The System Timer interrupt acts as the real time scheduler for the firmware. Each time the interrupt occurs, different tasks are done based on critical timing requirement for each task. There are 256 timer states (an 8-bit counter that rolls over) so the period of the scheduler is 25.6 ms. However, some tasks are executed every other time (the 200 us group) and some every 4th time (the 400 us group) and so on. Some high priority tasks are executed every time. The code for the tasks is divided up into the groups which define how often the task is executed. The structure of the code is shown below:
I. Entry and timer state calculation II. 100 us group A. Fast Software timers B. Read Sensors C. Update III. 200 us group A. B. IV. 400 us group A. Medium Software timers B. V. 800 us group A. Set 420 PWM Period VI 1.6 ms group A. Display timer and flag B. Heartbeat/ LED outputs VII 3.2 ms group A. Slow Software Timers VIII 6.4 ms group A A. Very Slow Software Timers IX. Long time group A. Determine Mode B. Heartbeat/ LED outputs X. Exit
-- -- Copyright (c) 2015 Tim Scherr All rights reserved.
Definition in file timer0.cpp.
Generated on Thu Jul 21 2022 22:29:23 by
1.7.2