]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/headers/MCF52221_CFM.h
Add FreeRTOS-Plus directory.
[freertos] / FreeRTOS / Demo / ColdFire_MCF52221_CodeWarrior / headers / MCF52221_CFM.h
1 /* Coldfire C Header File\r
2  * Copyright Freescale Semiconductor Inc\r
3  * All rights reserved.\r
4  *\r
5  * 2008/05/23 Revision: 0.95\r
6  *\r
7  * (c) Copyright UNIS, a.s. 1997-2008\r
8  * UNIS, a.s.\r
9  * Jundrovska 33\r
10  * 624 00 Brno\r
11  * Czech Republic\r
12  * http      : www.processorexpert.com\r
13  * mail      : info@processorexpert.com\r
14  */\r
15 \r
16 #ifndef __MCF52221_CFM_H__\r
17 #define __MCF52221_CFM_H__\r
18 \r
19 \r
20 /*********************************************************************\r
21 *\r
22 * ColdFire Flash Module (CFM)\r
23 *\r
24 *********************************************************************/\r
25 \r
26 /* Register read/write macros */\r
27 #define MCF_CFM_CFMMCR                       (*(vuint16*)(0x401D0000))\r
28 #define MCF_CFM_CFMCLKD                      (*(vuint8 *)(0x401D0002))\r
29 #define MCF_CFM_CFMSEC                       (*(vuint32*)(0x401D0008))\r
30 #define MCF_CFM_CFMPROT                      (*(vuint32*)(0x401D0010))\r
31 #define MCF_CFM_CFMSACC                      (*(vuint32*)(0x401D0014))\r
32 #define MCF_CFM_CFMDACC                      (*(vuint32*)(0x401D0018))\r
33 #define MCF_CFM_CFMUSTAT                     (*(vuint8 *)(0x401D0020))\r
34 #define MCF_CFM_CFMCMD                       (*(vuint8 *)(0x401D0024))\r
35 #define MCF_CFM_CFMCLKSEL                    (*(vuint16*)(0x401D004A))\r
36 \r
37 \r
38 /* Bit definitions and macros for MCF_CFM_CFMMCR */\r
39 #define MCF_CFM_CFMMCR_KEYACC                (0x20)\r
40 #define MCF_CFM_CFMMCR_CCIE                  (0x40)\r
41 #define MCF_CFM_CFMMCR_CBEIE                 (0x80)\r
42 #define MCF_CFM_CFMMCR_AEIE                  (0x100)\r
43 #define MCF_CFM_CFMMCR_PVIE                  (0x200)\r
44 #define MCF_CFM_CFMMCR_LOCK                  (0x400)\r
45 \r
46 /* Bit definitions and macros for MCF_CFM_CFMCLKD */\r
47 #define MCF_CFM_CFMCLKD_DIV(x)               (((x)&0x3F)<<0)\r
48 #define MCF_CFM_CFMCLKD_PRDIV8               (0x40)\r
49 #define MCF_CFM_CFMCLKD_DIVLD                (0x80)\r
50 \r
51 /* Bit definitions and macros for MCF_CFM_CFMSEC */\r
52 #define MCF_CFM_CFMSEC_SEC(x)                (((x)&0xFFFF)<<0)\r
53 #define MCF_CFM_CFMSEC_SECSTAT               (0x40000000)\r
54 #define MCF_CFM_CFMSEC_KEYEN                 (0x80000000)\r
55 \r
56 /* Bit definitions and macros for MCF_CFM_CFMPROT */\r
57 #define MCF_CFM_CFMPROT_PROTECT(x)           (((x)&0xFFFFFFFF)<<0)\r
58 \r
59 /* Bit definitions and macros for MCF_CFM_CFMSACC */\r
60 #define MCF_CFM_CFMSACC_SUPV(x)              (((x)&0xFFFFFFFF)<<0)\r
61 \r
62 /* Bit definitions and macros for MCF_CFM_CFMDACC */\r
63 #define MCF_CFM_CFMDACC_DACC(x)              (((x)&0xFFFFFFFF)<<0)\r
64 \r
65 /* Bit definitions and macros for MCF_CFM_CFMUSTAT */\r
66 #define MCF_CFM_CFMUSTAT_BLANK               (0x4)\r
67 #define MCF_CFM_CFMUSTAT_ACCERR              (0x10)\r
68 #define MCF_CFM_CFMUSTAT_PVIOL               (0x20)\r
69 #define MCF_CFM_CFMUSTAT_CCIF                (0x40)\r
70 #define MCF_CFM_CFMUSTAT_CBEIF               (0x80)\r
71 \r
72 /* Bit definitions and macros for MCF_CFM_CFMCMD */\r
73 #define MCF_CFM_CFMCMD_CMD(x)                (((x)&0x7F)<<0)\r
74 #define MCF_CFM_CFMCMD_BLANK_CHECK           (0x5)\r
75 #define MCF_CFM_CFMCMD_PAGE_ERASE_VERIFY     (0x6)\r
76 #define MCF_CFM_CFMCMD_WORD_PROGRAM          (0x20)\r
77 #define MCF_CFM_CFMCMD_PAGE_ERASE            (0x40)\r
78 #define MCF_CFM_CFMCMD_MASS_ERASE            (0x41)\r
79 \r
80 /* Bit definitions and macros for MCF_CFM_CFMCLKSEL */\r
81 #define MCF_CFM_CFMCLKSEL_CLKSEL(x)          (((x)&0x3)<<0)\r
82 \r
83 \r
84 #endif /* __MCF52221_CFM_H__ */\r