RTEMS 6.3
Loading...
Searching...
No Matches
btimer.c File Reference

Timer for the Hitachi SH 703X. More...

#include <rtems.h>
#include <rtems/btimer.h>
#include <rtems/score/sh_io.h>
#include <rtems/score/ispsh7032.h>
#include <rtems/score/iosh7032.h>

Macros

#define I_CLK_PHI_1   0
#define I_CLK_PHI_2   1
#define I_CLK_PHI_4   2
#define I_CLK_PHI_8   3
#define I_CLK_PHI   I_CLK_PHI_4
#define CLOCK_SCALE   (1<<I_CLK_PHI)
#define ITU1_STARTMASK   0xfd
#define ITU1_SYNCMASK   0xfd
#define ITU1_MODEMASK   0xfd
#define ITU1_TCRMASK   (0x00 | I_CLK_PHI)
#define ITU1_TIORMASK   0x88
#define ITU1_STAT_MASK   0xf8
#define ITU1_TIERMASK   0xfc
#define IPRC_ITU1_MASK   0xfff0
#define ITU1_PRIO   15
#define ITU1_VECTOR   OVI1_ISP_V
#define AVG_OVERHEAD   1
#define LEAST_VALID   0

Functions

rtems_isr timerisr (void)
void benchmark_timer_initialize (void)
 Initialize the Benchmark Timer.
benchmark_timer_t benchmark_timer_read (void)
 Read the Benchmark Timer.
void benchmark_timer_disable_subtracting_average_overhead (bool find_flag)
 Disable Average Overhead Removal from the Benchmark Timer.

Variables

uint32_t bsp_clicks_per_second
bool benchmark_timer_find_average_overhead

Detailed Description

Timer for the Hitachi SH 703X.

Function Documentation

◆ benchmark_timer_disable_subtracting_average_overhead()

void benchmark_timer_disable_subtracting_average_overhead ( bool find_flag)

Disable Average Overhead Removal from the Benchmark Timer.

This method places the benchmark timer in a "raw" mode where it returns the actual number of units which have passed between calls to benchmark_timer_initialize and benchmark_timer_read counting.

Parameters
[in]find_flagindicates to enable or disable the mode

◆ benchmark_timer_initialize()

void benchmark_timer_initialize ( void )

Initialize the Benchmark Timer.

This method initializes the benchmark timer and resets it to begin counting.

◆ benchmark_timer_read()

benchmark_timer_t benchmark_timer_read ( void )

Read the Benchmark Timer.

This method stops the benchmark timer and returns the number of units that have passed since benchmark_timer_initialize was invoked.

Returns
This method returns the number of units with the average overhead removed. If the value is below the minimum trusted value, zero is returned.