UART LED Project Part 3
Overview
Modify your Part 2 project to use the System Timer (AKA SysTick) interrupt mode for timing.
UI Requirements
- See 11.7 System Timer in the textbook or see the Cortex M4 Generic User Guide Chapter 4.4 System timer.
- Use the System Timer (AKA SysTick) for timing
- Set the Reload 24 bit value (use about 1 million to start) in SysTick_LOAD
- Create the SysTick_Handler as shown on page 13 of the SysTick slides. In this handler only simple
operations like incrementing or decrementing a counter.
- After creating the handler enable the SysTick Interrupt. You can do this by just setting bit 1 in the CTRL register.
- In SysTick_CTRL Set the clock source to processor clock and set the Enable
- Use the counter from the interrupt handler to control timing. Do NOT use the COUNTFLAG bit.
- Be sure to NOT wait for more than 100 ms at any point in your code.
Rubric and Late Policy
100 possible points as described below. The grading for Part 3 is ONLY for the required changes to Part 2.
Incomplete Part 2 functionality will be ignored as much as is practical.
- Demo Sheet
- 40 -- System Timer initialization requirements:
- A reasonable reload value (not more than 24 bits).
- The SysTick_CTRL must set the clock source to the processor clock and enable the timer.
- The TICKINT is set and there is a corresponding interrupt service routine.
- 30 -- There is a section of code that correctly uses a counter or variable that is set in the SysTick_Handler.
This code must effectively provide an appropriate delay. The Part 2 code that used COUNTFLAG must not be used.
- 20 -- The normal operation of the program must not wait more than approximately 100 ms.
This will be confirmed by code inspection and reasonable responsiveness to keyboard inputs.
- 10 -- The code shows good variable naming and formatting.
- Late penalties of 5% per day apply.
References
Submission
Submit your UART LED project (all files except subdirectories) to the UART LED project Part 3 dropbox by the due date on the schedule.