source: rtems/bsps/m68k/mcf5225x/btimer/btimer.c @ 753873e5

Last change on this file since 753873e5 was 753873e5, checked in by Joel Sherrill <joel@…>, on 03/22/22 at 20:03:30

Update Eric Norum contact info and start to normalize file headers

  • Property mode set to 100644
File size: 890 bytes
RevLine 
[fe32208]1/*
2 *  Timer Init
3 *
4 *  Use the last DMA timer (DTIM3) as the diagnostic timer.
[753873e5]5 */
6
7/*
8 * Copyright (c) 2005 Eric Norum <eric@norum.ca>
[fe32208]9 *
[753873e5]10 * COPYRIGHT (c) 2005-2010.
11 * On-Line Applications Research Corporation (OAR).
[fe32208]12 *
[753873e5]13 * The license and distribution terms for this file may be
14 * found in the file LICENSE in this distribution or at
15 * http://www.rtems.org/license/LICENSE.
[fe32208]16 */
17
18#include <rtems.h>
[26c17377]19#include <rtems/btimer.h>
[fe32208]20#include <bsp.h>
21
22void benchmark_timer_initialize(void)
23{
24  uint32_t preScaleDivisor = bsp_get_CPU_clock_speed() / 1000000;
25
26  MCF_DTIM3_DTMR = 0;
27  MCF_DTIM3_DTMR = MCF_DTIM_DTMR_PS(preScaleDivisor - 1) |
28    MCF_DTIM_DTMR_CLK_DIV1 | MCF_DTIM_DTMR_RST;
29}
30
31/*
32 * Return timer value in microsecond units
33 */
[8fbe2e6]34benchmark_timer_t benchmark_timer_read(void)
[fe32208]35{
36  return MCF_DTIM3_DTCN;
37}
38
39void benchmark_timer_disable_subtracting_average_overhead(bool find_flag)
40{
41}
Note: See TracBrowser for help on using the repository browser.