this is for holding javascript data
Fernando Freitas Alves edited Part C: Timer B ISR with RTOS.tex
about 8 years ago
Commit id: 1856097bc97a6b8db3e9f3742c76e7f9e64490e3
deletions | additions
diff --git a/Part C: Timer B ISR with RTOS.tex b/Part C: Timer B ISR with RTOS.tex
index 17e1123..511fd7a 100644
--- a/Part C: Timer B ISR with RTOS.tex
+++ b/Part C: Timer B ISR with RTOS.tex
...
The main purpose of this procedure is to develop a program that counts Timer B interrupts and displays the interrupt overhead and after a RTOS program with the same functionalities added to the simulation of a PWM signal with a LED.
Appendix C shows the program code without RTOS with the proper special timer function register set up. Appendix D shows the program code with RTOS. This program uses the same structure of Part B with one event for a timer semaphore and two tasks and four simple procedures as follow:
* \begin{itemize}[label={--}]
\item TaskStart(): Task function that startup other tasks and update screen with its task's statistic;
* \item Real-time operational system kernel μC/OS-II;
\item Codes provided by the laboratory instructions and the official course website.
\item TaskScreenUpd(): Task function that updates screen with Timer B interrupts and overhead;
* \item InitTimerInt(): Procedure setup Timer B interrupts;
* \item Tmr_B_isr(): Procedure holds the IISR;
* \item UpdateStat(): Procedure update RTOS statistics;
* \item DispStr(): Procedure set the STDIO cursor location and display a string in the screen.
\end{itemize}
All Timer B special function register were set properly to enable its clock with perclk/16, priority 1, and B1 count register of 0x15E, as required. The IISR reads the timer counter, increments the necessary variables, post the semaphore when the count reaches 1000 in order to inform the function TaskScreenUpd() that updates screen with the number of interrupts happened and the timer overhead. This last value is calculated by the difference of the timer counter and the count register predefined.