]> git.sur5r.net Git - freertos/blob - Demo/ColdFire_MCF52233_Eclipse/RTOSDemo/MCF5223x/MCF52235_CFM.h
Still messing around trying to get the workspace to be distributable.
[freertos] / Demo / ColdFire_MCF52233_Eclipse / RTOSDemo / MCF5223x / MCF52235_CFM.h
1 /* Coldfire C Header File\r
2  * Copyright Freescale Semiconductor Inc\r
3  * All rights reserved.\r
4  *\r
5  * 2007/03/19 Revision: 0.91\r
6  */\r
7 \r
8 #ifndef __MCF52235_CFM_H__\r
9 #define __MCF52235_CFM_H__\r
10 \r
11 \r
12 /*********************************************************************\r
13 *\r
14 * ColdFire Flash Module (CFM)\r
15 *\r
16 *********************************************************************/\r
17 \r
18 /* Register read/write macros */\r
19 #define MCF_CFM_CFMMCR                       (*(vuint16*)(&__IPSBAR[0x1D0000]))\r
20 #define MCF_CFM_CFMCLKD                      (*(vuint8 *)(&__IPSBAR[0x1D0002]))\r
21 #define MCF_CFM_CFMSEC                       (*(vuint32*)(&__IPSBAR[0x1D0008]))\r
22 #define MCF_CFM_CFMPROT                      (*(vuint32*)(&__IPSBAR[0x1D0010]))\r
23 #define MCF_CFM_CFMSACC                      (*(vuint32*)(&__IPSBAR[0x1D0014]))\r
24 #define MCF_CFM_CFMDACC                      (*(vuint32*)(&__IPSBAR[0x1D0018]))\r
25 #define MCF_CFM_CFMUSTAT                     (*(vuint8 *)(&__IPSBAR[0x1D0020]))\r
26 #define MCF_CFM_CFMCMD                       (*(vuint8 *)(&__IPSBAR[0x1D0024]))\r
27 #define MCF_CFM_CFMCLKSEL                    (*(vuint16*)(&__IPSBAR[0x1D004A]))\r
28 \r
29 \r
30 /* Bit definitions and macros for MCF_CFM_CFMMCR */\r
31 #define MCF_CFM_CFMMCR_KEYACC                (0x20)\r
32 #define MCF_CFM_CFMMCR_CCIE                  (0x40)\r
33 #define MCF_CFM_CFMMCR_CBEIE                 (0x80)\r
34 #define MCF_CFM_CFMMCR_AEIE                  (0x100)\r
35 #define MCF_CFM_CFMMCR_PVIE                  (0x200)\r
36 #define MCF_CFM_CFMMCR_LOCK                  (0x400)\r
37 \r
38 /* Bit definitions and macros for MCF_CFM_CFMCLKD */\r
39 #define MCF_CFM_CFMCLKD_DIV(x)               (((x)&0x3F)<<0)\r
40 #define MCF_CFM_CFMCLKD_PRDIV8               (0x40)\r
41 #define MCF_CFM_CFMCLKD_DIVLD                (0x80)\r
42 \r
43 /* Bit definitions and macros for MCF_CFM_CFMSEC */\r
44 #define MCF_CFM_CFMSEC_SEC(x)                (((x)&0xFFFF)<<0)\r
45 #define MCF_CFM_CFMSEC_SECSTAT               (0x40000000)\r
46 #define MCF_CFM_CFMSEC_KEYEN                 (0x80000000)\r
47 \r
48 /* Bit definitions and macros for MCF_CFM_CFMPROT */\r
49 #define MCF_CFM_CFMPROT_PROTECT(x)           (((x)&0xFFFFFFFF)<<0)\r
50 \r
51 /* Bit definitions and macros for MCF_CFM_CFMSACC */\r
52 #define MCF_CFM_CFMSACC_SUPV(x)              (((x)&0xFFFFFFFF)<<0)\r
53 \r
54 /* Bit definitions and macros for MCF_CFM_CFMDACC */\r
55 #define MCF_CFM_CFMDACC_DACC(x)              (((x)&0xFFFFFFFF)<<0)\r
56 \r
57 /* Bit definitions and macros for MCF_CFM_CFMUSTAT */\r
58 #define MCF_CFM_CFMUSTAT_BLANK               (0x4)\r
59 #define MCF_CFM_CFMUSTAT_ACCERR              (0x10)\r
60 #define MCF_CFM_CFMUSTAT_PVIOL               (0x20)\r
61 #define MCF_CFM_CFMUSTAT_CCIF                (0x40)\r
62 #define MCF_CFM_CFMUSTAT_CBEIF               (0x80)\r
63 \r
64 /* Bit definitions and macros for MCF_CFM_CFMCMD */\r
65 #define MCF_CFM_CFMCMD_CMD(x)                (((x)&0x7F)<<0)\r
66 #define MCF_CFM_CFMCMD_BLANK_CHECK           (0x5)\r
67 #define MCF_CFM_CFMCMD_PAGE_ERASE_VERIFY     (0x6)\r
68 #define MCF_CFM_CFMCMD_WORD_PROGRAM          (0x20)\r
69 #define MCF_CFM_CFMCMD_PAGE_ERASE            (0x40)\r
70 #define MCF_CFM_CFMCMD_MASS_ERASE            (0x41)\r
71 \r
72 /* Bit definitions and macros for MCF_CFM_CFMCLKSEL */\r
73 #define MCF_CFM_CFMCLKSEL_CLKSEL(x)          (((x)&0x3)<<0)\r
74 \r
75 \r
76 #endif /* __MCF52235_CFM_H__ */\r