OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [lwIP_MCF5235_GCC/] [include/] [arch/] [mcf523x/] [mcf523x_timer.h] - Blame information for rev 609

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 583 jeremybenn
/*
2
 * These files are taken from the MCF523X source code example package
3
 * which is available on the Freescale website. Freescale explicitly
4
 * grants the redistribution and modification of these source files.
5
 * The complete licensing information is available in the file
6
 * LICENSE_FREESCALE.TXT.
7
 *
8
 * File:        mcf523x_timer.h
9
 * Purpose:     Register and bit definitions for the MCF523X
10
 *
11
 * Notes:
12
 *
13
 */
14
 
15
#ifndef __MCF523X_TIMER_H__
16
#define __MCF523X_TIMER_H__
17
 
18
/*********************************************************************
19
*
20
* DMA Timers (TIMER)
21
*
22
*********************************************************************/
23
 
24
/* Register read/write macros */
25
#define MCF_TIMER_DTMR0       (*(vuint16*)(void*)(&__IPSBAR[0x000400]))
26
#define MCF_TIMER_DTXMR0      (*(vuint8 *)(void*)(&__IPSBAR[0x000402]))
27
#define MCF_TIMER_DTER0       (*(vuint8 *)(void*)(&__IPSBAR[0x000403]))
28
#define MCF_TIMER_DTRR0       (*(vuint32*)(void*)(&__IPSBAR[0x000404]))
29
#define MCF_TIMER_DTCR0       (*(vuint32*)(void*)(&__IPSBAR[0x000408]))
30
#define MCF_TIMER_DTCN0       (*(vuint32*)(void*)(&__IPSBAR[0x00040C]))
31
#define MCF_TIMER_DTMR1       (*(vuint16*)(void*)(&__IPSBAR[0x000440]))
32
#define MCF_TIMER_DTXMR1      (*(vuint8 *)(void*)(&__IPSBAR[0x000442]))
33
#define MCF_TIMER_DTER1       (*(vuint8 *)(void*)(&__IPSBAR[0x000443]))
34
#define MCF_TIMER_DTRR1       (*(vuint32*)(void*)(&__IPSBAR[0x000444]))
35
#define MCF_TIMER_DTCR1       (*(vuint32*)(void*)(&__IPSBAR[0x000448]))
36
#define MCF_TIMER_DTCN1       (*(vuint32*)(void*)(&__IPSBAR[0x00044C]))
37
#define MCF_TIMER_DTMR2       (*(vuint16*)(void*)(&__IPSBAR[0x000480]))
38
#define MCF_TIMER_DTXMR2      (*(vuint8 *)(void*)(&__IPSBAR[0x000482]))
39
#define MCF_TIMER_DTER2       (*(vuint8 *)(void*)(&__IPSBAR[0x000483]))
40
#define MCF_TIMER_DTRR2       (*(vuint32*)(void*)(&__IPSBAR[0x000484]))
41
#define MCF_TIMER_DTCR2       (*(vuint32*)(void*)(&__IPSBAR[0x000488]))
42
#define MCF_TIMER_DTCN2       (*(vuint32*)(void*)(&__IPSBAR[0x00048C]))
43
#define MCF_TIMER_DTMR3       (*(vuint16*)(void*)(&__IPSBAR[0x0004C0]))
44
#define MCF_TIMER_DTXMR3      (*(vuint8 *)(void*)(&__IPSBAR[0x0004C2]))
45
#define MCF_TIMER_DTER3       (*(vuint8 *)(void*)(&__IPSBAR[0x0004C3]))
46
#define MCF_TIMER_DTRR3       (*(vuint32*)(void*)(&__IPSBAR[0x0004C4]))
47
#define MCF_TIMER_DTCR3       (*(vuint32*)(void*)(&__IPSBAR[0x0004C8]))
48
#define MCF_TIMER_DTCN3       (*(vuint32*)(void*)(&__IPSBAR[0x0004CC]))
49
#define MCF_TIMER_DTMR(x)     (*(vuint16*)(void*)(&__IPSBAR[0x000400+((x)*0x040)]))
50
#define MCF_TIMER_DTXMR(x)    (*(vuint8 *)(void*)(&__IPSBAR[0x000402+((x)*0x040)]))
51
#define MCF_TIMER_DTER(x)     (*(vuint8 *)(void*)(&__IPSBAR[0x000403+((x)*0x040)]))
52
#define MCF_TIMER_DTRR(x)     (*(vuint32*)(void*)(&__IPSBAR[0x000404+((x)*0x040)]))
53
#define MCF_TIMER_DTCR(x)     (*(vuint32*)(void*)(&__IPSBAR[0x000408+((x)*0x040)]))
54
#define MCF_TIMER_DTCN(x)     (*(vuint32*)(void*)(&__IPSBAR[0x00040C+((x)*0x040)]))
55
 
56
/* Bit definitions and macros for MCF_TIMER_DTMR */
57
#define MCF_TIMER_DTMR_RST          (0x0001)
58
#define MCF_TIMER_DTMR_CLK(x)       (((x)&0x0003)<<1)
59
#define MCF_TIMER_DTMR_FRR          (0x0008)
60
#define MCF_TIMER_DTMR_ORRI         (0x0010)
61
#define MCF_TIMER_DTMR_OM           (0x0020)
62
#define MCF_TIMER_DTMR_CE(x)        (((x)&0x0003)<<6)
63
#define MCF_TIMER_DTMR_PS(x)        (((x)&0x00FF)<<8)
64
#define MCF_TIMER_DTMR_CE_ANY       (0x00C0)
65
#define MCF_TIMER_DTMR_CE_FALL      (0x0080)
66
#define MCF_TIMER_DTMR_CE_RISE      (0x0040)
67
#define MCF_TIMER_DTMR_CE_NONE      (0x0000)
68
#define MCF_TIMER_DTMR_CLK_DTIN     (0x0006)
69
#define MCF_TIMER_DTMR_CLK_DIV16    (0x0004)
70
#define MCF_TIMER_DTMR_CLK_DIV1     (0x0002)
71
#define MCF_TIMER_DTMR_CLK_STOP     (0x0000)
72
 
73
/* Bit definitions and macros for MCF_TIMER_DTXMR */
74
#define MCF_TIMER_DTXMR_MODE16      (0x01)
75
#define MCF_TIMER_DTXMR_DMAEN       (0x80)
76
 
77
/* Bit definitions and macros for MCF_TIMER_DTER */
78
#define MCF_TIMER_DTER_CAP          (0x01)
79
#define MCF_TIMER_DTER_REF          (0x02)
80
 
81
/********************************************************************/
82
 
83
#endif /* __MCF523X_TIMER_H__ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.