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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [ColdFire_MCF52233_Eclipse/] [RTOSDemo/] [MCF5223x/] [MCF52235_FlexCAN.h] - Blame information for rev 600

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
 * 2007/03/19 Revision: 0.91
6
 */
7
 
8
#ifndef __MCF52235_FlexCAN_H__
9
#define __MCF52235_FlexCAN_H__
10
 
11
 
12
/*********************************************************************
13
*
14
* Flex Controller Area Network (FlexCAN)
15
*
16
*********************************************************************/
17
 
18
/* Register read/write macros */
19
#define MCF_FlexCAN_CANMCR                   (*(vuint32*)(&__IPSBAR[0x1C0000]))
20
#define MCF_FlexCAN_CANCTRL                  (*(vuint32*)(&__IPSBAR[0x1C0004]))
21
#define MCF_FlexCAN_TIMER                    (*(vuint32*)(&__IPSBAR[0x1C0008]))
22
#define MCF_FlexCAN_RXGMASK                  (*(vuint32*)(&__IPSBAR[0x1C0010]))
23
#define MCF_FlexCAN_RX14MASK                 (*(vuint32*)(&__IPSBAR[0x1C0014]))
24
#define MCF_FlexCAN_RX15MASK                 (*(vuint32*)(&__IPSBAR[0x1C0018]))
25
#define MCF_FlexCAN_ERRCNT                   (*(vuint32*)(&__IPSBAR[0x1C001C]))
26
#define MCF_FlexCAN_ERRSTAT                  (*(vuint32*)(&__IPSBAR[0x1C0020]))
27
#define MCF_FlexCAN_IMASK                    (*(vuint32*)(&__IPSBAR[0x1C0028]))
28
#define MCF_FlexCAN_IFLAG                    (*(vuint32*)(&__IPSBAR[0x1C0030]))
29
 
30
 
31
 
32
/* Bit definitions and macros for MCF_FlexCAN_CANMCR */
33
#define MCF_FlexCAN_CANMCR_MAXMB(x)          (((x)&0xF)<<0)
34
#define MCF_FlexCAN_CANMCR_LPMACK            (0x100000)
35
#define MCF_FlexCAN_CANMCR_SUPV              (0x800000)
36
#define MCF_FlexCAN_CANMCR_FRZACK            (0x1000000)
37
#define MCF_FlexCAN_CANMCR_SOFTRST           (0x2000000)
38
#define MCF_FlexCAN_CANMCR_NOTRDY            (0x8000000)
39
#define MCF_FlexCAN_CANMCR_HALT              (0x10000000)
40
#define MCF_FlexCAN_CANMCR_FRZ               (0x40000000)
41
#define MCF_FlexCAN_CANMCR_MDIS              (0x80000000)
42
 
43
/* Bit definitions and macros for MCF_FlexCAN_CANCTRL */
44
#define MCF_FlexCAN_CANCTRL_PROPSEG(x)       (((x)&0x7)<<0)
45
#define MCF_FlexCAN_CANCTRL_LOM              (0x8)
46
#define MCF_FlexCAN_CANCTRL_LBUF             (0x10)
47
#define MCF_FlexCAN_CANCTRL_TSYNC            (0x20)
48
#define MCF_FlexCAN_CANCTRL_BOFFREC          (0x40)
49
#define MCF_FlexCAN_CANCTRL_SAMP             (0x80)
50
#define MCF_FlexCAN_CANCTRL_LPB              (0x1000)
51
#define MCF_FlexCAN_CANCTRL_CLK_SRC          (0x2000)
52
#define MCF_FlexCAN_CANCTRL_ERRMSK           (0x4000)
53
#define MCF_FlexCAN_CANCTRL_BOFFMSK          (0x8000)
54
#define MCF_FlexCAN_CANCTRL_PSEG2(x)         (((x)&0x7)<<0x10)
55
#define MCF_FlexCAN_CANCTRL_PSEG1(x)         (((x)&0x7)<<0x13)
56
#define MCF_FlexCAN_CANCTRL_RJW(x)           (((x)&0x3)<<0x16)
57
#define MCF_FlexCAN_CANCTRL_PRESDIV(x)       (((x)&0xFF)<<0x18)
58
 
59
/* Bit definitions and macros for MCF_FlexCAN_TIMER */
60
#define MCF_FlexCAN_TIMER_TIMER(x)           (((x)&0xFFFF)<<0)
61
 
62
/* Bit definitions and macros for MCF_FlexCAN_RXGMASK */
63
#define MCF_FlexCAN_RXGMASK_MI(x)            (((x)&0x1FFFFFFF)<<0)
64
 
65
/* Bit definitions and macros for MCF_FlexCAN_RX14MASK */
66
#define MCF_FlexCAN_RX14MASK_MI(x)           (((x)&0x1FFFFFFF)<<0)
67
 
68
/* Bit definitions and macros for MCF_FlexCAN_RX15MASK */
69
#define MCF_FlexCAN_RX15MASK_MI(x)           (((x)&0x1FFFFFFF)<<0)
70
 
71
/* Bit definitions and macros for MCF_FlexCAN_ERRCNT */
72
#define MCF_FlexCAN_ERRCNT_TXECTR(x)         (((x)&0xFF)<<0)
73
#define MCF_FlexCAN_ERRCNT_RXECTR(x)         (((x)&0xFF)<<0x8)
74
 
75
/* Bit definitions and macros for MCF_FlexCAN_ERRSTAT */
76
#define MCF_FlexCAN_ERRSTAT_ERRINT           (0x2)
77
#define MCF_FlexCAN_ERRSTAT_BOFFINT          (0x4)
78
#define MCF_FlexCAN_ERRSTAT_FLTCONF(x)       (((x)&0x3)<<0x4)
79
#define MCF_FlexCAN_ERRSTAT_FLTCONF_ACTIVE   (0)
80
#define MCF_FlexCAN_ERRSTAT_FLTCONF_PASSIVE  (0x10)
81
#define MCF_FlexCAN_ERRSTAT_FLTCONF_BUSOFF   (0x20)
82
#define MCF_FlexCAN_ERRSTAT_TXRX             (0x40)
83
#define MCF_FlexCAN_ERRSTAT_IDLE             (0x80)
84
#define MCF_FlexCAN_ERRSTAT_RXWRN            (0x100)
85
#define MCF_FlexCAN_ERRSTAT_TXWRN            (0x200)
86
#define MCF_FlexCAN_ERRSTAT_STFERR           (0x400)
87
#define MCF_FlexCAN_ERRSTAT_FRMERR           (0x800)
88
#define MCF_FlexCAN_ERRSTAT_CRCERR           (0x1000)
89
#define MCF_FlexCAN_ERRSTAT_ACKERR           (0x2000)
90
#define MCF_FlexCAN_ERRSTAT_BIT0ERR          (0x4000)
91
#define MCF_FlexCAN_ERRSTAT_BIT1ERR          (0x8000)
92
 
93
/* Bit definitions and macros for MCF_FlexCAN_IMASK */
94
#define MCF_FlexCAN_IMASK_BUF0M              (0x1)
95
#define MCF_FlexCAN_IMASK_BUF1M              (0x2)
96
#define MCF_FlexCAN_IMASK_BUF2M              (0x4)
97
#define MCF_FlexCAN_IMASK_BUF3M              (0x8)
98
#define MCF_FlexCAN_IMASK_BUF4M              (0x10)
99
#define MCF_FlexCAN_IMASK_BUF5M              (0x20)
100
#define MCF_FlexCAN_IMASK_BUF6M              (0x40)
101
#define MCF_FlexCAN_IMASK_BUF7M              (0x80)
102
#define MCF_FlexCAN_IMASK_BUF8M              (0x100)
103
#define MCF_FlexCAN_IMASK_BUF9M              (0x200)
104
#define MCF_FlexCAN_IMASK_BUF10M             (0x400)
105
#define MCF_FlexCAN_IMASK_BUF11M             (0x800)
106
#define MCF_FlexCAN_IMASK_BUF12M             (0x1000)
107
#define MCF_FlexCAN_IMASK_BUF13M             (0x2000)
108
#define MCF_FlexCAN_IMASK_BUF14M             (0x4000)
109
#define MCF_FlexCAN_IMASK_BUF15M             (0x8000)
110
#define MCF_FlexCAN_IMASK_BUF(x)             (0x1<<(x))
111
 
112
/* Bit definitions and macros for MCF_FlexCAN_IFLAG */
113
#define MCF_FlexCAN_IFLAG_BUF0I              (0x1)
114
#define MCF_FlexCAN_IFLAG_BUF1I              (0x2)
115
#define MCF_FlexCAN_IFLAG_BUF2I              (0x4)
116
#define MCF_FlexCAN_IFLAG_BUF3I              (0x8)
117
#define MCF_FlexCAN_IFLAG_BUF4I              (0x10)
118
#define MCF_FlexCAN_IFLAG_BUF5I              (0x20)
119
#define MCF_FlexCAN_IFLAG_BUF6I              (0x40)
120
#define MCF_FlexCAN_IFLAG_BUF7I              (0x80)
121
#define MCF_FlexCAN_IFLAG_BUF8I              (0x100)
122
#define MCF_FlexCAN_IFLAG_BUF9I              (0x200)
123
#define MCF_FlexCAN_IFLAG_BUF10I             (0x400)
124
#define MCF_FlexCAN_IFLAG_BUF11I             (0x800)
125
#define MCF_FlexCAN_IFLAG_BUF12I             (0x1000)
126
#define MCF_FlexCAN_IFLAG_BUF13I             (0x2000)
127
#define MCF_FlexCAN_IFLAG_BUF14I             (0x4000)
128
#define MCF_FlexCAN_IFLAG_BUF15I             (0x8000)
129
#define MCF_FlexCAN_IFLAG_BUF(x)             (0x1<<(x))
130
 
131
 
132
#endif /* __MCF52235_FlexCAN_H__ */

powered by: WebSVN 2.1.0

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