18.07.2013 Views

R8C Family Implementing System Timer in MR8C/4 - Renesas ...

R8C Family Implementing System Timer in MR8C/4 - Renesas ...

R8C Family Implementing System Timer in MR8C/4 - Renesas ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>R8C</strong> <strong>Family</strong> <strong>Implement<strong>in</strong>g</strong> <strong>System</strong> <strong>Timer</strong> <strong>in</strong> M<strong>R8C</strong>/4<br />

Figure 5: Select<strong>in</strong>g <strong>Timer</strong> RA as <strong>System</strong> <strong>Timer</strong> <strong>in</strong> Configuration File<br />

5.2 Def<strong>in</strong><strong>in</strong>g <strong>System</strong> <strong>Timer</strong> Sett<strong>in</strong>gs<br />

The next step is to def<strong>in</strong>e the <strong>in</strong>terrupt priority level, MPU operat<strong>in</strong>g frequency and resolution of the system timer.<br />

For the def<strong>in</strong>itions of system timer <strong>in</strong>terrupt priority level, users will be able to specify a priority level between 1 to<br />

kernel mask level (as system timer <strong>in</strong>terrupt is a kernel <strong>in</strong>terrupt) for the “IPL” entry. This priority level also denotes the<br />

precedence of time event handlers (i.e. cyclic and alarm handlers).<br />

The resolution of the system timer <strong>in</strong>terrupt is determ<strong>in</strong>e by a computation of the time tick numerator and denom<strong>in</strong>ator<br />

as shown <strong>in</strong> Figure 6.<br />

Figure 7 illustrates the def<strong>in</strong>ition of system timer sett<strong>in</strong>gs.<br />

Figure 6: Def<strong>in</strong><strong>in</strong>g <strong>System</strong> <strong>Timer</strong> Resolution<br />

Figure 7: Def<strong>in</strong><strong>in</strong>g <strong>System</strong> <strong>Timer</strong> Sett<strong>in</strong>gs<br />

5.3 Def<strong>in</strong><strong>in</strong>g <strong>System</strong> <strong>Timer</strong> Interrupt Vector<br />

This step specifies the hardware timer (other than timers RA or RB) chosen to be the system timer. For example, if the<br />

<strong>R8C</strong> device chosen has a timer RC and the timer RC is selected as the system timer, users are required to specify the<br />

selection of timer RC as a system timer by assign<strong>in</strong>g the system timer handler to the entry address of timer RC <strong>in</strong>terrupt<br />

vector. Figure 8 illustrates the assignment of timer RC as the system timer for the <strong>R8C</strong>/Lx devices.<br />

R20AN0090ES0100 Rev.1.00 Page 6 of 9<br />

Mar 01, 2010

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!