Commit 610eff4a by rene.zurbruegg undefined Committed by overleaf

### Update on Overleaf.

parent 1b1c720b
 ... ... @@ -143,6 +143,7 @@ It also decides which interrupt has priority and what interrupt service routine \item Deadline \textbf{D}: Maximal time between event arrival and finishing \end{itemize} \columnbreak \textbf{Polling}\\ Average Utilization: $\underline{u} = \frac{c}{P}$ \\ Limitation: $2c \leq c + P \leq D \leq T$ \\ ... ... @@ -151,7 +152,6 @@ Limitation: $2c \leq c + P \leq D \leq T$ \\ \textbf{Interrupts}\\ Average Utilization: $\underline{u} = \frac{h + c}{T}$ \\ Limitation: $h + c \leq D \leq T$\\ \columnbreak \textbf{Problem} \\ Often \verb|D| ,\verb|T|, \verb|c| and \verb|h| are given: \\ $D < min(c,h) \rightarrow \texttt{Impossible}$ \\ ... ... @@ -160,10 +160,11 @@ $h + c \leq D < 2c \rightarrow \texttt{Interrupt with:} u = \frac{h + c}{T}$\\ $c + max(c,h) \leq D \rightarrow \texttt{Both possible with:} u_p = \frac{c}{D-c}, u_i = \frac{h+c}{T}$ \ownsubsection{Clocks and Timers (3-60)} \textbf{Watchdog Timer (*-65)} \\ \textbf{Watchdog Timer (3-65)} \\ A Watchdog timer is a timer that runs in the background and as soon as it rolls over, it resets the state of the CPU. \\ These timer are often used for safety purposes since it makes sure that even if a program crashed or entered a infinity loop, the processor will recover. \\ A watchdog timer must continously be reset by the application as prrof that it is still working as expected. \\ A watchdog timer must continously be reset by the application as prrof that it is still working as expected. \vspace{3mm}\\ \textbf{Timers} \\ Timers are used for: \begin{itemize} ... ... @@ -171,4 +172,13 @@ Timers are used for: \item Generate interrupts when certain limits are reached \item Generate interrupts when overflow \item Generate output signals (PWM) \end{itemize} \ No newline at end of file \end{itemize} \textbf{Capture and Compare register (3-71)} There are two simple actions we can perform on a timer: \\ \textbf{Capture}: On a given event (e.g. GPIO High) the current value of the timer is stored in a register. \\ The value can then be read by software or an interrupt can be triggered.\\ \textbf{Compare}: Write a value to a compare register. When the timer reaches this value, an action can be triggered. (e.g. interrupt or software functions). \\
 ... ... @@ -40,13 +40,14 @@ $$I_i = \sum_{j=1}^{i-1} \Big\lceil\frac{t}{T_j}\Big\rceil C_j$$ The \textcolor{red}{longest response time} $R_i$ of a periodic task $i$ is at critical instance, $R_i=C_i+I_i$. Hence, compute in ascending order the smallest $R_i, ~i=1,...,n$ that satisfy $$R_i=C_i+\sum_{j=1}^{i-1}\Big\lceil\frac{R_i}{T_j}\Big\rceil C_j$$ and check whether $$\forall i=1,...,n: R_i\leq D_i$$ This condition is both necessary and sufficient. \begin{python} Algorithm: DM_guarantee(Gamma){ for (each tau_i in Gamma) { Algorithm: DM_guarantee($\Gamma$){ for (each $\tau_i \in \Gamma$) { I=0; do { R=I+C_i; if (R>D_i) return(UNSCHEDULABLE); I= sum(j=1,...i-1) ceil(R/T_j)*C_j; } while (I+C_i>R); //if previous operation had any effect do { $R=I+C_i;$ if ($R>D_i$) return(UNSCHEDULABLE); I= sum(j=1,...i-1) ( ceil($R/T_j$)*$C_j)$; } while ($I+C_i>R$); //while previous operation had any effect } return(SCHEDULABLE); } ... ...
 % !TeX root = main.tex \usepackage[utf8]{inputenc} \usepackage[margin = 1.5cm]{geometry} \usepackage[ngerman]{babel} %German (Umlouds, Dates, etc.) \usepackage{lmodern} ... ... @@ -127,26 +128,90 @@ \node[shape=circle,draw,inner sep=2pt] (char) {#1};}} % % Python style for highlighting % \newcommand\pythonstyle{\lstset{ % language=Python, % otherkeywords={self}, % Add keywords here % keywordstyle=\color{black}, % emph={MyClass,__init__}, % Custom highlighting % stringstyle=\color{red}, % frame=single, % Any extra options here % rulecolor=\color{lightgray}, % showstringspaces=false, % breaklines=true, % tabsize=2 % }} % % Python environment % \lstnewenvironment{python}[1][] % { % \pythonstyle % \lstset{#1} % } % {} % ----- New definition (Rene) --- % % Default fixed font does not support bold face \DeclareFixedFont{\ttb}{T1}{txtt}{bx}{n}{9} % for bold \DeclareFixedFont{\ttm}{T1}{txtt}{m}{n}{9} % for normal \definecolor{deepblue}{rgb}{0,0,0.5} \definecolor{deepred}{rgb}{0.6,0,0} \definecolor{deepgreen}{rgb}{0,0.5,0} \definecolor{mGreen}{rgb}{0,0.6,0} \definecolor{mGray}{rgb}{0.5,0.5,0.5} \definecolor{mPurple}{rgb}{0.58,0,0.82} \definecolor{backgroundColour}{rgb}{0.95,0.95,0.92} \usepackage{listings} % Python style for highlighting \newcommand\pythonstyle{\lstset{ language=Python, otherkeywords={self}, % Add keywords here keywordstyle=\color{black}, emph={MyClass,__init__}, % Custom highlighting stringstyle=\color{red}, frame=single, % Any extra options here rulecolor=\color{lightgray}, showstringspaces=false, breaklines=true, tabsize=2 % language=Python, % otherkeywords={self}, % Add keywords here % keywordstyle=\color{deepblue}, % emph={MyClass,__init__}, % Custom highlighting % emphstyle=\color{deepred}, % Custom highlighting style % stringstyle=\color{deepgreen}, % frame=tb, % Any extra options here % showstringspaces=false, % breaklines=true, % tabsize=2 backgroundcolor=\color{backgroundColour}, commentstyle=\color{mGreen}, keywordstyle=\color{magenta}, numberstyle=\tiny\color{mGray}, stringstyle=\color{mPurple}, basicstyle=\footnotesize, breakatwhitespace=false, breaklines=true, captionpos=b, keepspaces=true, numbers=left, numbersep=5pt, showspaces=false, showstringspaces=false, showtabs=false, tabsize=2, language=C }} % \newenvironment{python} % { % \begin{lstlisting}[mathescape] % \pythonstyle % } % {\end{lstlisting}} % Python environment \lstnewenvironment{python}[1][] \lstnewenvironment{python}[1][mathescape] { \pythonstyle \lstset{#1} } {} %------ end new definition --- % %Python inline \newcommand\pythoninline[1]{{\pythonstyle\lstinline!#1!}} ... ... @@ -155,10 +220,6 @@ tabsize=2 \setlength{\parindent}{0em} \definecolor{mGreen}{rgb}{0,0.6,0} \definecolor{mGray}{rgb}{0.5,0.5,0.5} \definecolor{mPurple}{rgb}{0.58,0,0.82} \definecolor{backgroundColour}{rgb}{0.95,0.95,0.92} \lstdefinestyle{CStyle}{ backgroundcolor=\color{backgroundColour}, ... ...
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!