iLLD_TC27xC  1.0
IfxFlash_cfg.h
Go to the documentation of this file.
1 /**
2  * \file IfxFlash_cfg.h
3  * \brief Flash on-chip implementation data
4  * \ingroup IfxLld_Flash
5  *
6  * \version iLLD_0_1_0_10
7  * \copyright Copyright (c) 2013 Infineon Technologies AG. All rights reserved.
8  *
9  *
10  * IMPORTANT NOTICE
11  *
12  *
13  * Infineon Technologies AG (Infineon) is supplying this file for use
14  * exclusively with Infineon's microcontroller products. This file can be freely
15  * distributed within development tools that are supporting such microcontroller
16  * products.
17  *
18  * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
19  * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
20  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
21  * INFINEON SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL,
22  * OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
23  *
24  */
25 
26 #ifndef IFXFLASH_CFG_H
27 #define IFXFLASH_CFG_H 1
28 
29 /******************************************************************************/
30 /*----------------------------------Includes----------------------------------*/
31 /******************************************************************************/
32 
33 #include "Cpu/Std/IfxCpu.h"
35 #include "_Reg/IfxFlash_reg.h"
36 
37 /******************************************************************************/
38 /*-----------------------------------Macros-----------------------------------*/
39 /******************************************************************************/
40 
41 /** \brief base address for general command sequences
42  */
43 #define IFXFLASH_CMD_BASE_ADDRESS (0xaf000000)
44 
45 /** \brief number of flash modules
46  */
47 #define IFXFLASH_NUM_FLASH_MODULES (1)
48 
49 #define IFXFLASH_PFLASH_BANKS (2)
50 
51 #define IFXFLASH_PFLASH_NUM_LOG_SECTORS (IFXFLASH_PFLASH_BANKS * 27)
52 
53 /** \brief Phy sector for DF
54  */
55 #define IFXFLASH_DFLASH_NUM_PHYSICAL_SECTORS (1)
56 
57 #define IFXFLASH_DFLASH_NUM_LOG_SECTORS (48)
58 
59 #define IFXFLASH_DFLASH_START (0xaf000000)
60 
61 #define IFXFLASH_DFLASH_SIZE (IFXFLASH_DFLASH_NUM_LOG_SECTORS*0x2000)
62 
63 #define IFXFLASH_DFLASH_END (IFXFLASH_DFLASH_START+IFXFLASH_DFLASH_SIZE-1)
64 
65 #define IFXFLASH_DFLASH_NUM_HSM_LOG_SECTORS (8)
66 
67 #define IFXFLASH_DFLASH_NUM_UCB_LOG_SECTORS (16)
68 
69 #define IFXFLASH_DFLASH_BANKS (1)
70 
71 #define IFXFLASH_PFLASH_NUM_PHYSICAL_SECTORS (IFXFLASH_PFLASH_BANKS*4)
72 
73 #define IFXFLASH_DFLASH_PAGE_LENGTH (8)
74 
75 #define IFXFLASH_ERROR_TRACKING_MAX_CORRECTABLE_ERRORS (10)
76 
77 #define IFXFLASH_ERROR_TRACKING_MAX_UNCORRECTABLE_ERRORS (1)
78 
79 
80 
81 /******************************************************************************/
82 /*-------------------------------Enumerations---------------------------------*/
83 /******************************************************************************/
84 
85 typedef enum
86 {
87  IfxFlash_FlashType_Fa = 0, /**< \brief Flash Array */
88  IfxFlash_FlashType_D0 = 1, /**< \brief data flash #0 */
89  IfxFlash_FlashType_D1 = 2, /**< \brief data flash #1 */
90  IfxFlash_FlashType_P0 = 3, /**< \brief program flash #0 */
91  IfxFlash_FlashType_P1 = 4, /**< \brief program flash #1 */
92  IfxFlash_FlashType_P2 = 5, /**< \brief program flash #2 */
93  IfxFlash_FlashType_P3 = 6 /**< \brief program flash #3 */
95 
96 /** \brief user configuration block type
97  */
98 typedef enum
99 {
100  IfxFlash_UcbType_ucb0 = 0, /**< \brief UCB 0 */
101  IfxFlash_UcbType_ucb1 = 1, /**< \brief UCB 1 */
102  IfxFlash_UcbType_ucbHsmc = 5 /**< \brief HSM UCB */
104 
105 
106 /******************************************************************************/
107 /*-----------------------------Data Structures--------------------------------*/
108 /******************************************************************************/
109 
110 /** \brief contains start and end address of sectors
111  */
112 typedef struct
113 {
114  uint32 start; /**< \brief start address of sector */
115  uint32 end; /**< \brief end address of sector */
117 
118 
119 /******************************************************************************/
120 /*-------------------Global Exported Variables/Constants----------------------*/
121 /******************************************************************************/
122 
124 
126 
128 
130 
132 
134 
135 
136 #endif /* IFXFLASH_CFG_H */