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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [ColdFire_MCF52259_CodeWarrior/] [Freescale_Headers/] [MCF52259_FlexCAN.h] - Blame information for rev 597

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

Line No. Rev Author Line
1 578 jeremybenn
/* Coldfire C Header File
2
 * Copyright Freescale Semiconductor Inc
3
 * All rights reserved.
4
 *
5
 * 2008/04/17 Revision: 0.2
6
 *
7
 * (c) Copyright UNIS, spol. s r.o. 1997-2008
8
 * UNIS, spol. s r.o.
9
 * Jundrovska 33
10
 * 624 00 Brno
11
 * Czech Republic
12
 * http      : www.processorexpert.com
13
 * mail      : info@processorexpert.com
14
 */
15
 
16
#ifndef __MCF52259_FlexCAN_H__
17
#define __MCF52259_FlexCAN_H__
18
 
19
 
20
/*********************************************************************
21
*
22
* Flex Controller Area Network (FlexCAN)
23
*
24
*********************************************************************/
25
 
26
/* Register read/write macros */
27
#define MCF_FlexCAN_CANMCR                   (*(vuint32*)(0x40170000))
28
#define MCF_FlexCAN_CANCTRL                  (*(vuint32*)(0x40170004))
29
#define MCF_FlexCAN_TIMER                    (*(vuint32*)(0x40170008))
30
#define MCF_FlexCAN_RXGMASK                  (*(vuint32*)(0x40170010))
31
#define MCF_FlexCAN_RX14MASK                 (*(vuint32*)(0x40170014))
32
#define MCF_FlexCAN_RX15MASK                 (*(vuint32*)(0x40170018))
33
#define MCF_FlexCAN_ERRCNT                   (*(vuint32*)(0x4017001C))
34
#define MCF_FlexCAN_ERRSTAT                  (*(vuint32*)(0x40170020))
35
#define MCF_FlexCAN_IMASK                    (*(vuint32*)(0x40170028))
36
#define MCF_FlexCAN_IFLAG                    (*(vuint32*)(0x40170030))
37
 
38
 
39
 
40
/* Bit definitions and macros for MCF_FlexCAN_CANMCR */
41
#define MCF_FlexCAN_CANMCR_MAXMB(x)          (((x)&0xF)<<0)
42
#define MCF_FlexCAN_CANMCR_LPMACK            (0x100000)
43
#define MCF_FlexCAN_CANMCR_SUPV              (0x800000)
44
#define MCF_FlexCAN_CANMCR_FRZACK            (0x1000000)
45
#define MCF_FlexCAN_CANMCR_SOFTRST           (0x2000000)
46
#define MCF_FlexCAN_CANMCR_NOTRDY            (0x8000000)
47
#define MCF_FlexCAN_CANMCR_HALT              (0x10000000)
48
#define MCF_FlexCAN_CANMCR_FRZ               (0x40000000)
49
#define MCF_FlexCAN_CANMCR_MDIS              (0x80000000)
50
 
51
/* Bit definitions and macros for MCF_FlexCAN_CANCTRL */
52
#define MCF_FlexCAN_CANCTRL_PROPSEG(x)       (((x)&0x7)<<0)
53
#define MCF_FlexCAN_CANCTRL_LOM              (0x8)
54
#define MCF_FlexCAN_CANCTRL_LBUF             (0x10)
55
#define MCF_FlexCAN_CANCTRL_TSYNC            (0x20)
56
#define MCF_FlexCAN_CANCTRL_BOFFREC          (0x40)
57
#define MCF_FlexCAN_CANCTRL_SAMP             (0x80)
58
#define MCF_FlexCAN_CANCTRL_LPB              (0x1000)
59
#define MCF_FlexCAN_CANCTRL_CLK_SRC          (0x2000)
60
#define MCF_FlexCAN_CANCTRL_ERRMSK           (0x4000)
61
#define MCF_FlexCAN_CANCTRL_BOFFMSK          (0x8000)
62
#define MCF_FlexCAN_CANCTRL_PSEG2(x)         (((x)&0x7)<<0x10)
63
#define MCF_FlexCAN_CANCTRL_PSEG1(x)         (((x)&0x7)<<0x13)
64
#define MCF_FlexCAN_CANCTRL_RJW(x)           (((x)&0x3)<<0x16)
65
#define MCF_FlexCAN_CANCTRL_PRESDIV(x)       (((x)&0xFF)<<0x18)
66
 
67
/* Bit definitions and macros for MCF_FlexCAN_TIMER */
68
#define MCF_FlexCAN_TIMER_TIMER(x)           (((x)&0xFFFF)<<0)
69
 
70
/* Bit definitions and macros for MCF_FlexCAN_RXGMASK */
71
#define MCF_FlexCAN_RXGMASK_MI(x)            (((x)&0x1FFFFFFF)<<0)
72
 
73
/* Bit definitions and macros for MCF_FlexCAN_RX14MASK */
74
#define MCF_FlexCAN_RX14MASK_MI(x)           (((x)&0x1FFFFFFF)<<0)
75
 
76
/* Bit definitions and macros for MCF_FlexCAN_RX15MASK */
77
#define MCF_FlexCAN_RX15MASK_MI(x)           (((x)&0x1FFFFFFF)<<0)
78
 
79
/* Bit definitions and macros for MCF_FlexCAN_ERRCNT */
80
#define MCF_FlexCAN_ERRCNT_TXECTR(x)         (((x)&0xFF)<<0)
81
#define MCF_FlexCAN_ERRCNT_RXECTR(x)         (((x)&0xFF)<<0x8)
82
 
83
/* Bit definitions and macros for MCF_FlexCAN_ERRSTAT */
84
#define MCF_FlexCAN_ERRSTAT_ERRINT           (0x2)
85
#define MCF_FlexCAN_ERRSTAT_BOFFINT          (0x4)
86
#define MCF_FlexCAN_ERRSTAT_FLTCONF(x)       (((x)&0x3)<<0x4)
87
#define MCF_FlexCAN_ERRSTAT_FLTCONF_ACTIVE   (0)
88
#define MCF_FlexCAN_ERRSTAT_FLTCONF_PASSIVE  (0x10)
89
#define MCF_FlexCAN_ERRSTAT_FLTCONF_BUSOFF   (0x20)
90
#define MCF_FlexCAN_ERRSTAT_TXRX             (0x40)
91
#define MCF_FlexCAN_ERRSTAT_IDLE             (0x80)
92
#define MCF_FlexCAN_ERRSTAT_RXWRN            (0x100)
93
#define MCF_FlexCAN_ERRSTAT_TXWRN            (0x200)
94
#define MCF_FlexCAN_ERRSTAT_STFERR           (0x400)
95
#define MCF_FlexCAN_ERRSTAT_FRMERR           (0x800)
96
#define MCF_FlexCAN_ERRSTAT_CRCERR           (0x1000)
97
#define MCF_FlexCAN_ERRSTAT_ACKERR           (0x2000)
98
#define MCF_FlexCAN_ERRSTAT_BIT0ERR          (0x4000)
99
#define MCF_FlexCAN_ERRSTAT_BIT1ERR          (0x8000)
100
 
101
/* Bit definitions and macros for MCF_FlexCAN_IMASK */
102
#define MCF_FlexCAN_IMASK_BUF0M              (0x1)
103
#define MCF_FlexCAN_IMASK_BUF1M              (0x2)
104
#define MCF_FlexCAN_IMASK_BUF2M              (0x4)
105
#define MCF_FlexCAN_IMASK_BUF3M              (0x8)
106
#define MCF_FlexCAN_IMASK_BUF4M              (0x10)
107
#define MCF_FlexCAN_IMASK_BUF5M              (0x20)
108
#define MCF_FlexCAN_IMASK_BUF6M              (0x40)
109
#define MCF_FlexCAN_IMASK_BUF7M              (0x80)
110
#define MCF_FlexCAN_IMASK_BUF8M              (0x100)
111
#define MCF_FlexCAN_IMASK_BUF9M              (0x200)
112
#define MCF_FlexCAN_IMASK_BUF10M             (0x400)
113
#define MCF_FlexCAN_IMASK_BUF11M             (0x800)
114
#define MCF_FlexCAN_IMASK_BUF12M             (0x1000)
115
#define MCF_FlexCAN_IMASK_BUF13M             (0x2000)
116
#define MCF_FlexCAN_IMASK_BUF14M             (0x4000)
117
#define MCF_FlexCAN_IMASK_BUF15M             (0x8000)
118
#define MCF_FlexCAN_IMASK_BUF(x)             (0x1<<(x))
119
 
120
/* Bit definitions and macros for MCF_FlexCAN_IFLAG */
121
#define MCF_FlexCAN_IFLAG_BUF0I              (0x1)
122
#define MCF_FlexCAN_IFLAG_BUF1I              (0x2)
123
#define MCF_FlexCAN_IFLAG_BUF2I              (0x4)
124
#define MCF_FlexCAN_IFLAG_BUF3I              (0x8)
125
#define MCF_FlexCAN_IFLAG_BUF4I              (0x10)
126
#define MCF_FlexCAN_IFLAG_BUF5I              (0x20)
127
#define MCF_FlexCAN_IFLAG_BUF6I              (0x40)
128
#define MCF_FlexCAN_IFLAG_BUF7I              (0x80)
129
#define MCF_FlexCAN_IFLAG_BUF8I              (0x100)
130
#define MCF_FlexCAN_IFLAG_BUF9I              (0x200)
131
#define MCF_FlexCAN_IFLAG_BUF10I             (0x400)
132
#define MCF_FlexCAN_IFLAG_BUF11I             (0x800)
133
#define MCF_FlexCAN_IFLAG_BUF12I             (0x1000)
134
#define MCF_FlexCAN_IFLAG_BUF13I             (0x2000)
135
#define MCF_FlexCAN_IFLAG_BUF14I             (0x4000)
136
#define MCF_FlexCAN_IFLAG_BUF15I             (0x8000)
137
#define MCF_FlexCAN_IFLAG_BUF(x)             (0x1<<(x))
138
 
139
 
140
#endif /* __MCF52259_FlexCAN_H__ */

powered by: WebSVN 2.1.0

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