1 | /* The header file is generated by make_header.py from FLASH.json */ |
---|
2 | /* Current script's version can be found at: */ |
---|
3 | /* https://github.com/AoLaD/rtems-tms570-utils/tree/headers/headers/python */ |
---|
4 | |
---|
5 | /* |
---|
6 | * Copyright (c) 2014-2015, Premysl Houdek <kom541000@gmail.com> |
---|
7 | * |
---|
8 | * Czech Technical University in Prague |
---|
9 | * Zikova 1903/4 |
---|
10 | * 166 36 Praha 6 |
---|
11 | * Czech Republic |
---|
12 | * |
---|
13 | * All rights reserved. |
---|
14 | * |
---|
15 | * Redistribution and use in source and binary forms, with or without |
---|
16 | * modification, are permitted provided that the following conditions are met: |
---|
17 | * |
---|
18 | * 1. Redistributions of source code must retain the above copyright notice, this |
---|
19 | * list of conditions and the following disclaimer. |
---|
20 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
---|
21 | * this list of conditions and the following disclaimer in the documentation |
---|
22 | * and/or other materials provided with the distribution. |
---|
23 | * |
---|
24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
---|
25 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
---|
26 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
---|
27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR |
---|
28 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
---|
29 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
---|
30 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
---|
31 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
---|
32 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
---|
33 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
---|
34 | * |
---|
35 | * The views and conclusions contained in the software and documentation are those |
---|
36 | * of the authors and should not be interpreted as representing official policies, |
---|
37 | * either expressed or implied, of the FreeBSD Project. |
---|
38 | */ |
---|
39 | #ifndef LIBBSP_ARM_tms570_FLASH |
---|
40 | #define LIBBSP_ARM_tms570_FLASH |
---|
41 | |
---|
42 | #include <bsp/utility.h> |
---|
43 | |
---|
44 | typedef struct{ |
---|
45 | uint32_t FRDCNTL; /*Flash Option Control Register*/ |
---|
46 | uint8_t reserved1 [4]; |
---|
47 | uint32_t FEDACTRL1; /*Flash Error Detection and Correction Control Register 1*/ |
---|
48 | uint32_t FEDACTRL2; /*Flash Error Detection and Correction Control Register 2*/ |
---|
49 | uint32_t FCORERRCNT; /*Flash Correctable Error Count Register*/ |
---|
50 | uint32_t FCORERRADD; /*Flash Correctable Error Address Register*/ |
---|
51 | uint32_t FCORERRPOS; /*Flash Correctable Error Position Register*/ |
---|
52 | uint32_t FEDACSTATUS; /*Flash Error Detection and Correction Status Register*/ |
---|
53 | uint32_t FUNCERRADD; /*Flash Un-Correctable Error Address Register*/ |
---|
54 | uint32_t FEDACSDIS; /*Flash Error Detection and Correction Sector Disable Register*/ |
---|
55 | uint32_t FPRIMADDTAG; /*Flash Primary Address Tag Register*/ |
---|
56 | uint32_t FDUPADDTAG; /*Flash Duplicate Address Tag Register*/ |
---|
57 | uint32_t FBPROT; /*Flash Bank Protection Register*/ |
---|
58 | uint32_t FBSE; /*Flash Bank Sector Enable Register*/ |
---|
59 | uint32_t FBBUSY; /*Flash Bank Busy Register*/ |
---|
60 | uint32_t FBAC; /*Flash Bank Access Control Register*/ |
---|
61 | uint32_t FBFALLBACK; /*Flash Bank Fallback Power Register*/ |
---|
62 | uint32_t FBPRDY; /*Flash Bank/Pump Ready Register*/ |
---|
63 | uint32_t FPAC1; /*Flash Pump Access Control Register 1*/ |
---|
64 | uint32_t FPAC2; /*Flash Pump Access Control Register 2*/ |
---|
65 | uint32_t FMAC; /*Flash Module Access Control Register*/ |
---|
66 | uint32_t FMSTAT; /*Flash Module Status Register*/ |
---|
67 | uint32_t FEMUDMSW; /*EEPROM Emulation Data MSW Register*/ |
---|
68 | uint32_t FEMUDLSW; /*EEPROM Emulation Data LSW Register*/ |
---|
69 | uint32_t FEMUECC; /*EEPROM Emulation ECC Register*/ |
---|
70 | uint8_t reserved2 [4]; |
---|
71 | uint32_t FEMUADDR; /*EEPROM Emulation Address Register*/ |
---|
72 | uint32_t FDIAGCTRL; /*Diagnostic Control Register*/ |
---|
73 | uint32_t FRAWDATAH; /*Uncorrected Raw Data High Register*/ |
---|
74 | uint32_t FRAWDATAL; /*Uncorrected Raw Data Low Register*/ |
---|
75 | uint32_t FRAWECC; /*Uncorrected Raw ECC Register*/ |
---|
76 | uint32_t FPAROVR; /*Parity Override Register*/ |
---|
77 | uint8_t reserved3 [64]; |
---|
78 | uint32_t FEDACSDIS2; /*Flash Error Detection and Correction Sector Disable Register 2*/ |
---|
79 | uint8_t reserved4 [452]; |
---|
80 | uint32_t FSMWRENA; /*FSM Register Write Enable*/ |
---|
81 | uint8_t reserved5 [24]; |
---|
82 | uint32_t FSMSECTOR; /*FSM Sector Register*/ |
---|
83 | uint8_t reserved6 [16]; |
---|
84 | uint32_t EEPROMCONFIG; /*EEPROM Emulation Configuration Register*/ |
---|
85 | uint8_t reserved7 [76]; |
---|
86 | uint32_t EECTRL1; /*EEPROM Emulation Error Detection and Correction Control Register 1*/ |
---|
87 | uint32_t EECTRL2; /*EEPROM Emulation Error Detection and Correction Control Register 2*/ |
---|
88 | uint32_t EECORERRCNT; /*EEPROM Emulation Correctable Error Count Register*/ |
---|
89 | uint32_t EECORERRADD; /*EEPROM Emulation Correctable Error Address Register*/ |
---|
90 | uint32_t EECORERRPOS; /*EEPROM Emulation Correctable Error Bit Position Register*/ |
---|
91 | uint32_t EESTATUS; /*EEPROM Emulation Error Status Register*/ |
---|
92 | uint32_t EEUNCERRADD; /*EEPROM Emulation Un-Correctable Error Address Register*/ |
---|
93 | uint8_t reserved8 [220]; |
---|
94 | uint32_t FCFGBANK; /*Flash Bank Configuration Register*/ |
---|
95 | } tms570_flash_t; |
---|
96 | |
---|
97 | |
---|
98 | /*--------------------TMS570_FLASHFRDCNTL--------------------*/ |
---|
99 | /* field: RWAIT - Random/data Read Wait State */ |
---|
100 | #define TMS570_FLASH_FRDCNTL_RWAIT(val) BSP_FLD32(val,8, 11) |
---|
101 | #define TMS570_FLASH_FRDCNTL_RWAIT_GET(reg) BSP_FLD32GET(reg,8, 11) |
---|
102 | #define TMS570_FLASH_FRDCNTL_RWAIT_SET(reg,val) BSP_FLD32SET(reg, val,8, 11) |
---|
103 | |
---|
104 | /* field: ASWSTEN - Address Setup Wait State Enable */ |
---|
105 | #define TMS570_FLASH_FRDCNTL_ASWSTEN BSP_FLD32(4) |
---|
106 | |
---|
107 | /* field: ENPIPE - Enable Pipeline Mode */ |
---|
108 | #define TMS570_FLASH_FRDCNTL_ENPIPE BSP_FLD32(0) |
---|
109 | |
---|
110 | |
---|
111 | /*-------------------TMS570_FLASHFEDACTRL1-------------------*/ |
---|
112 | /* field: SUSP_IGNR - Suspend Ignore. */ |
---|
113 | #define TMS570_FLASH_FEDACTRL1_SUSP_IGNR BSP_FLD32(24) |
---|
114 | |
---|
115 | /* field: EDACMODE - Error Correction Mode. */ |
---|
116 | #define TMS570_FLASH_FEDACTRL1_EDACMODE(val) BSP_FLD32(val,16, 19) |
---|
117 | #define TMS570_FLASH_FEDACTRL1_EDACMODE_GET(reg) BSP_FLD32GET(reg,16, 19) |
---|
118 | #define TMS570_FLASH_FEDACTRL1_EDACMODE_SET(reg,val) BSP_FLD32SET(reg, val,16, 19) |
---|
119 | |
---|
120 | /* field: EOFEN - Event on Ones Fail Enable */ |
---|
121 | #define TMS570_FLASH_FEDACTRL1_EOFEN BSP_FLD32(10) |
---|
122 | |
---|
123 | /* field: EZFEN - Event on Zeros Fail Enable */ |
---|
124 | #define TMS570_FLASH_FEDACTRL1_EZFEN BSP_FLD32(9) |
---|
125 | |
---|
126 | /* field: EPEN - Error Profiling Enable. */ |
---|
127 | #define TMS570_FLASH_FEDACTRL1_EPEN BSP_FLD32(8) |
---|
128 | |
---|
129 | /* field: EDACEN - Error Detection and Correction Enable */ |
---|
130 | #define TMS570_FLASH_FEDACTRL1_EDACEN(val) BSP_FLD32(val,0, 3) |
---|
131 | #define TMS570_FLASH_FEDACTRL1_EDACEN_GET(reg) BSP_FLD32GET(reg,0, 3) |
---|
132 | #define TMS570_FLASH_FEDACTRL1_EDACEN_SET(reg,val) BSP_FLD32SET(reg, val,0, 3) |
---|
133 | |
---|
134 | |
---|
135 | /*-------------------TMS570_FLASHFEDACTRL2-------------------*/ |
---|
136 | /* field: SEC_THRESHOLD - Single Error Correction Threshold */ |
---|
137 | #define TMS570_FLASH_FEDACTRL2_SEC_THRESHOLD(val) BSP_FLD32(val,0, 15) |
---|
138 | #define TMS570_FLASH_FEDACTRL2_SEC_THRESHOLD_GET(reg) BSP_FLD32GET(reg,0, 15) |
---|
139 | #define TMS570_FLASH_FEDACTRL2_SEC_THRESHOLD_SET(reg,val) BSP_FLD32SET(reg, val,0, 15) |
---|
140 | |
---|
141 | |
---|
142 | /*-------------------TMS570_FLASHFCORERRCNT-------------------*/ |
---|
143 | /* field: FERRCNT - Single Error Correction Count */ |
---|
144 | #define TMS570_FLASH_FCORERRCNT_FERRCNT(val) BSP_FLD32(val,0, 15) |
---|
145 | #define TMS570_FLASH_FCORERRCNT_FERRCNT_GET(reg) BSP_FLD32GET(reg,0, 15) |
---|
146 | #define TMS570_FLASH_FCORERRCNT_FERRCNT_SET(reg,val) BSP_FLD32SET(reg, val,0, 15) |
---|
147 | |
---|
148 | |
---|
149 | /*-------------------TMS570_FLASHFCORERRADD-------------------*/ |
---|
150 | /* field: COR_ERR_ADD - Correctable Error Address */ |
---|
151 | #define TMS570_FLASH_FCORERRADD_COR_ERR_ADD(val) BSP_FLD32(val,3, 31) |
---|
152 | #define TMS570_FLASH_FCORERRADD_COR_ERR_ADD_GET(reg) BSP_FLD32GET(reg,3, 31) |
---|
153 | #define TMS570_FLASH_FCORERRADD_COR_ERR_ADD_SET(reg,val) BSP_FLD32SET(reg, val,3, 31) |
---|
154 | |
---|
155 | /* field: B_OFF - Byte Offset */ |
---|
156 | #define TMS570_FLASH_FCORERRADD_B_OFF(val) BSP_FLD32(val,0, 2) |
---|
157 | #define TMS570_FLASH_FCORERRADD_B_OFF_GET(reg) BSP_FLD32GET(reg,0, 2) |
---|
158 | #define TMS570_FLASH_FCORERRADD_B_OFF_SET(reg,val) BSP_FLD32SET(reg, val,0, 2) |
---|
159 | |
---|
160 | |
---|
161 | /*-------------------TMS570_FLASHFCORERRPOS-------------------*/ |
---|
162 | /* field: BUS2 - Bus 2 Error */ |
---|
163 | #define TMS570_FLASH_FCORERRPOS_BUS2 BSP_FLD32(9) |
---|
164 | |
---|
165 | /* field: TYPE - ErrorType */ |
---|
166 | #define TMS570_FLASH_FCORERRPOS_TYPE BSP_FLD32(8) |
---|
167 | |
---|
168 | /* field: ERR_POS - The bit address of the single bit error */ |
---|
169 | #define TMS570_FLASH_FCORERRPOS_ERR_POS(val) BSP_FLD32(val,0, 7) |
---|
170 | #define TMS570_FLASH_FCORERRPOS_ERR_POS_GET(reg) BSP_FLD32GET(reg,0, 7) |
---|
171 | #define TMS570_FLASH_FCORERRPOS_ERR_POS_SET(reg,val) BSP_FLD32SET(reg, val,0, 7) |
---|
172 | |
---|
173 | |
---|
174 | /*------------------TMS570_FLASHFEDACSTATUS------------------*/ |
---|
175 | /* field: Reserved - Read returns 0. Writes have no effect. */ |
---|
176 | #define TMS570_FLASH_FEDACSTATUS_Reserved(val) BSP_FLD32(val,26, 31) |
---|
177 | #define TMS570_FLASH_FEDACSTATUS_Reserved_GET(reg) BSP_FLD32GET(reg,26, 31) |
---|
178 | #define TMS570_FLASH_FEDACSTATUS_Reserved_SET(reg,val) BSP_FLD32SET(reg, val,26, 31) |
---|
179 | |
---|
180 | /* field: FSM_DONE - Flash State Machine Done */ |
---|
181 | #define TMS570_FLASH_FEDACSTATUS_FSM_DONE BSP_FLD32(24) |
---|
182 | |
---|
183 | /* field: COMB2_MAL_G - Bus 2 Compare Malfunction Flag. */ |
---|
184 | #define TMS570_FLASH_FEDACSTATUS_COMB2_MAL_G BSP_FLD32(19) |
---|
185 | |
---|
186 | /* field: ECC_B2_MAL_ - Bus 2 ECC Malfunction Error Flag */ |
---|
187 | #define TMS570_FLASH_FEDACSTATUS_ECC_B2_MAL_ BSP_FLD32(18) |
---|
188 | |
---|
189 | /* field: B2_UNC_ERR - Bus 2 uncorrectable error */ |
---|
190 | #define TMS570_FLASH_FEDACSTATUS_B2_UNC_ERR BSP_FLD32(17) |
---|
191 | |
---|
192 | /* field: B2_COR_ERR - Bus 2 Correctable Error */ |
---|
193 | #define TMS570_FLASH_FEDACSTATUS_B2_COR_ERR BSP_FLD32(16) |
---|
194 | |
---|
195 | /* field: D_UNC_ERR - Diagnostic Uncorrectable Error */ |
---|
196 | #define TMS570_FLASH_FEDACSTATUS_D_UNC_ERR BSP_FLD32(12) |
---|
197 | |
---|
198 | /* field: ADD_TAG_ERR - Address Tag Register Error Flag */ |
---|
199 | #define TMS570_FLASH_FEDACSTATUS_ADD_TAG_ERR BSP_FLD32(11) |
---|
200 | |
---|
201 | /* field: ADD_PAR_ERR - Address Parity Error Flag */ |
---|
202 | #define TMS570_FLASH_FEDACSTATUS_ADD_PAR_ERR BSP_FLD32(10) |
---|
203 | |
---|
204 | /* field: B1_UNC_ERR - Bus 1 Uncorrectable Error Flag */ |
---|
205 | #define TMS570_FLASH_FEDACSTATUS_B1_UNC_ERR BSP_FLD32(8) |
---|
206 | |
---|
207 | /* field: D_CORR_ERR - Diagnostic Correctable Error Status Flag */ |
---|
208 | #define TMS570_FLASH_FEDACSTATUS_D_CORR_ERR BSP_FLD32(3) |
---|
209 | |
---|
210 | /* field: ERR_ONE_FLG - Error on One Fail Status Flag */ |
---|
211 | #define TMS570_FLASH_FEDACSTATUS_ERR_ONE_FLG BSP_FLD32(2) |
---|
212 | |
---|
213 | /* field: ERR_ZERO__FLG - Error on Zero Fail Status Flag */ |
---|
214 | #define TMS570_FLASH_FEDACSTATUS_ERR_ZERO__FLG BSP_FLD32(1) |
---|
215 | |
---|
216 | /* field: ERR_PRF_FLG - Error Profiling Status Flag */ |
---|
217 | #define TMS570_FLASH_FEDACSTATUS_ERR_PRF_FLG BSP_FLD32(0) |
---|
218 | |
---|
219 | |
---|
220 | /*-------------------TMS570_FLASHFUNCERRADD-------------------*/ |
---|
221 | /* field: UNC_ERR_ADD - Un-correctable Error Address */ |
---|
222 | #define TMS570_FLASH_FUNCERRADD_UNC_ERR_ADD(val) BSP_FLD32(val,3, 31) |
---|
223 | #define TMS570_FLASH_FUNCERRADD_UNC_ERR_ADD_GET(reg) BSP_FLD32GET(reg,3, 31) |
---|
224 | #define TMS570_FLASH_FUNCERRADD_UNC_ERR_ADD_SET(reg,val) BSP_FLD32SET(reg, val,3, 31) |
---|
225 | |
---|
226 | /* field: B_OFF - Byte offset */ |
---|
227 | #define TMS570_FLASH_FUNCERRADD_B_OFF(val) BSP_FLD32(val,0, 2) |
---|
228 | #define TMS570_FLASH_FUNCERRADD_B_OFF_GET(reg) BSP_FLD32GET(reg,0, 2) |
---|
229 | #define TMS570_FLASH_FUNCERRADD_B_OFF_SET(reg,val) BSP_FLD32SET(reg, val,0, 2) |
---|
230 | |
---|
231 | |
---|
232 | /*-------------------TMS570_FLASHFEDACSDIS-------------------*/ |
---|
233 | /* field: BankID1_Inverse - The bank ID inverse bits are used with the bank ID bits to select the bank for which a sector */ |
---|
234 | #define TMS570_FLASH_FEDACSDIS_BankID1_Inverse(val) BSP_FLD32(val,29, 31) |
---|
235 | #define TMS570_FLASH_FEDACSDIS_BankID1_Inverse_GET(reg) BSP_FLD32GET(reg,29, 31) |
---|
236 | #define TMS570_FLASH_FEDACSDIS_BankID1_Inverse_SET(reg,val) BSP_FLD32SET(reg, val,29, 31) |
---|
237 | |
---|
238 | /* field: SectorID1_inverse - The sector ID inverse bits are used with the sector ID bits to determine which sector is */ |
---|
239 | #define TMS570_FLASH_FEDACSDIS_SectorID1_inverse(val) BSP_FLD32(val,24, 27) |
---|
240 | #define TMS570_FLASH_FEDACSDIS_SectorID1_inverse_GET(reg) BSP_FLD32GET(reg,24, 27) |
---|
241 | #define TMS570_FLASH_FEDACSDIS_SectorID1_inverse_SET(reg,val) BSP_FLD32SET(reg, val,24, 27) |
---|
242 | |
---|
243 | /* field: BankID1 - The bank ID bits are used with the bank ID inverse bits to select the bank for which a sector */ |
---|
244 | #define TMS570_FLASH_FEDACSDIS_BankID1(val) BSP_FLD32(val,21, 23) |
---|
245 | #define TMS570_FLASH_FEDACSDIS_BankID1_GET(reg) BSP_FLD32GET(reg,21, 23) |
---|
246 | #define TMS570_FLASH_FEDACSDIS_BankID1_SET(reg,val) BSP_FLD32SET(reg, val,21, 23) |
---|
247 | |
---|
248 | /* field: SectorID1 - The sector ID bits are used with the sector ID inverse bits to determine which sector is */ |
---|
249 | #define TMS570_FLASH_FEDACSDIS_SectorID1(val) BSP_FLD32(val,16, 19) |
---|
250 | #define TMS570_FLASH_FEDACSDIS_SectorID1_GET(reg) BSP_FLD32GET(reg,16, 19) |
---|
251 | #define TMS570_FLASH_FEDACSDIS_SectorID1_SET(reg,val) BSP_FLD32SET(reg, val,16, 19) |
---|
252 | |
---|
253 | /* field: BankID0_Inverse - The bank ID inverse bits are used with the bank ID bits to select the bank for which a sector */ |
---|
254 | #define TMS570_FLASH_FEDACSDIS_BankID0_Inverse(val) BSP_FLD32(val,13, 15) |
---|
255 | #define TMS570_FLASH_FEDACSDIS_BankID0_Inverse_GET(reg) BSP_FLD32GET(reg,13, 15) |
---|
256 | #define TMS570_FLASH_FEDACSDIS_BankID0_Inverse_SET(reg,val) BSP_FLD32SET(reg, val,13, 15) |
---|
257 | |
---|
258 | /* field: SectorID0_inverse - The sector ID inverse bits are used with the sector ID bits to determine which sector is */ |
---|
259 | #define TMS570_FLASH_FEDACSDIS_SectorID0_inverse(val) BSP_FLD32(val,8, 11) |
---|
260 | #define TMS570_FLASH_FEDACSDIS_SectorID0_inverse_GET(reg) BSP_FLD32GET(reg,8, 11) |
---|
261 | #define TMS570_FLASH_FEDACSDIS_SectorID0_inverse_SET(reg,val) BSP_FLD32SET(reg, val,8, 11) |
---|
262 | |
---|
263 | /* field: BankID0 - The bank ID bits are used with the bank ID inverse bits to select the bank for which a sector */ |
---|
264 | #define TMS570_FLASH_FEDACSDIS_BankID0(val) BSP_FLD32(val,5, 7) |
---|
265 | #define TMS570_FLASH_FEDACSDIS_BankID0_GET(reg) BSP_FLD32GET(reg,5, 7) |
---|
266 | #define TMS570_FLASH_FEDACSDIS_BankID0_SET(reg,val) BSP_FLD32SET(reg, val,5, 7) |
---|
267 | |
---|
268 | /* field: SectorID0 - The sector ID bits are used with the sector ID inverse bits to determine which sector is */ |
---|
269 | #define TMS570_FLASH_FEDACSDIS_SectorID0(val) BSP_FLD32(val,0, 3) |
---|
270 | #define TMS570_FLASH_FEDACSDIS_SectorID0_GET(reg) BSP_FLD32GET(reg,0, 3) |
---|
271 | #define TMS570_FLASH_FEDACSDIS_SectorID0_SET(reg,val) BSP_FLD32SET(reg, val,0, 3) |
---|
272 | |
---|
273 | |
---|
274 | /*------------------TMS570_FLASHFPRIMADDTAG------------------*/ |
---|
275 | /* field: PRIM_ADD_TAG - Primary Address Tag Register */ |
---|
276 | #define TMS570_FLASH_FPRIMADDTAG_PRIM_ADD_TAG(val) BSP_FLD32(val,4, 31) |
---|
277 | #define TMS570_FLASH_FPRIMADDTAG_PRIM_ADD_TAG_GET(reg) BSP_FLD32GET(reg,4, 31) |
---|
278 | #define TMS570_FLASH_FPRIMADDTAG_PRIM_ADD_TAG_SET(reg,val) BSP_FLD32SET(reg, val,4, 31) |
---|
279 | |
---|
280 | /* field: 0 - Always 0000 */ |
---|
281 | #define TMS570_FLASH_FPRIMADDTAG_0(val) BSP_FLD32(val,0, 3) |
---|
282 | #define TMS570_FLASH_FPRIMADDTAG_0_GET(reg) BSP_FLD32GET(reg,0, 3) |
---|
283 | #define TMS570_FLASH_FPRIMADDTAG_0_SET(reg,val) BSP_FLD32SET(reg, val,0, 3) |
---|
284 | |
---|
285 | |
---|
286 | /*-------------------TMS570_FLASHFDUPADDTAG-------------------*/ |
---|
287 | /* field: DUP_ADD_TAG - Primary Address Tag Register */ |
---|
288 | #define TMS570_FLASH_FDUPADDTAG_DUP_ADD_TAG(val) BSP_FLD32(val,4, 31) |
---|
289 | #define TMS570_FLASH_FDUPADDTAG_DUP_ADD_TAG_GET(reg) BSP_FLD32GET(reg,4, 31) |
---|
290 | #define TMS570_FLASH_FDUPADDTAG_DUP_ADD_TAG_SET(reg,val) BSP_FLD32SET(reg, val,4, 31) |
---|
291 | |
---|
292 | |
---|
293 | /*---------------------TMS570_FLASHFBPROT---------------------*/ |
---|
294 | /* field: PROTL1DIS - PROTL1DIS: Level 1 Protection Disabled */ |
---|
295 | #define TMS570_FLASH_FBPROT_PROTL1DIS BSP_FLD32(0) |
---|
296 | |
---|
297 | |
---|
298 | /*----------------------TMS570_FLASHFBSE----------------------*/ |
---|
299 | /* field: BSE - Bank Sector Enable */ |
---|
300 | #define TMS570_FLASH_FBSE_BSE(val) BSP_FLD32(val,0, 15) |
---|
301 | #define TMS570_FLASH_FBSE_BSE_GET(reg) BSP_FLD32GET(reg,0, 15) |
---|
302 | #define TMS570_FLASH_FBSE_BSE_SET(reg,val) BSP_FLD32SET(reg, val,0, 15) |
---|
303 | |
---|
304 | |
---|
305 | /*---------------------TMS570_FLASHFBBUSY---------------------*/ |
---|
306 | /* field: BUSY - Bank Busy */ |
---|
307 | #define TMS570_FLASH_FBBUSY_BUSY(val) BSP_FLD32(val,0, 7) |
---|
308 | #define TMS570_FLASH_FBBUSY_BUSY_GET(reg) BSP_FLD32GET(reg,0, 7) |
---|
309 | #define TMS570_FLASH_FBBUSY_BUSY_SET(reg,val) BSP_FLD32SET(reg, val,0, 7) |
---|
310 | |
---|
311 | |
---|
312 | /*----------------------TMS570_FLASHFBAC----------------------*/ |
---|
313 | /* field: OTPPROTDIS - OTP Sector Protection Disable. */ |
---|
314 | #define TMS570_FLASH_FBAC_OTPPROTDIS(val) BSP_FLD32(val,16, 23) |
---|
315 | #define TMS570_FLASH_FBAC_OTPPROTDIS_GET(reg) BSP_FLD32GET(reg,16, 23) |
---|
316 | #define TMS570_FLASH_FBAC_OTPPROTDIS_SET(reg,val) BSP_FLD32SET(reg, val,16, 23) |
---|
317 | |
---|
318 | /* field: 15_8 - BAGP 0-FFh Bank Active Grace Period. */ |
---|
319 | #define TMS570_FLASH_FBAC_15_8(val) BSP_FLD32(val,8, 15) |
---|
320 | #define TMS570_FLASH_FBAC_15_8_GET(reg) BSP_FLD32GET(reg,8, 15) |
---|
321 | #define TMS570_FLASH_FBAC_15_8_SET(reg,val) BSP_FLD32SET(reg, val,8, 15) |
---|
322 | |
---|
323 | /* field: VREADST - VREAD Setup. */ |
---|
324 | #define TMS570_FLASH_FBAC_VREADST(val) BSP_FLD32(val,0, 7) |
---|
325 | #define TMS570_FLASH_FBAC_VREADST_GET(reg) BSP_FLD32GET(reg,0, 7) |
---|
326 | #define TMS570_FLASH_FBAC_VREADST_SET(reg,val) BSP_FLD32SET(reg, val,0, 7) |
---|
327 | |
---|
328 | |
---|
329 | /*-------------------TMS570_FLASHFBFALLBACK-------------------*/ |
---|
330 | /* field: BANKPWR7 - Bank 7 Fallback Power Mode */ |
---|
331 | #define TMS570_FLASH_FBFALLBACK_BANKPWR7(val) BSP_FLD32(val,14, 15) |
---|
332 | #define TMS570_FLASH_FBFALLBACK_BANKPWR7_GET(reg) BSP_FLD32GET(reg,14, 15) |
---|
333 | #define TMS570_FLASH_FBFALLBACK_BANKPWR7_SET(reg,val) BSP_FLD32SET(reg, val,14, 15) |
---|
334 | |
---|
335 | /* field: BANKPWR1 - Bank 1 Fallback Power Mode */ |
---|
336 | #define TMS570_FLASH_FBFALLBACK_BANKPWR1(val) BSP_FLD32(val,2, 3) |
---|
337 | #define TMS570_FLASH_FBFALLBACK_BANKPWR1_GET(reg) BSP_FLD32GET(reg,2, 3) |
---|
338 | #define TMS570_FLASH_FBFALLBACK_BANKPWR1_SET(reg,val) BSP_FLD32SET(reg, val,2, 3) |
---|
339 | |
---|
340 | /* field: BANKPWR0 - Bank 0 Fallback Power Mode */ |
---|
341 | #define TMS570_FLASH_FBFALLBACK_BANKPWR0(val) BSP_FLD32(val,0, 1) |
---|
342 | #define TMS570_FLASH_FBFALLBACK_BANKPWR0_GET(reg) BSP_FLD32GET(reg,0, 1) |
---|
343 | #define TMS570_FLASH_FBFALLBACK_BANKPWR0_SET(reg,val) BSP_FLD32SET(reg, val,0, 1) |
---|
344 | |
---|
345 | |
---|
346 | /*---------------------TMS570_FLASHFBPRDY---------------------*/ |
---|
347 | /* field: BANKBUSY - Bank busy bits (one bit for each bank) */ |
---|
348 | #define TMS570_FLASH_FBPRDY_BANKBUSY(val) BSP_FLD32(val,16, 23) |
---|
349 | #define TMS570_FLASH_FBPRDY_BANKBUSY_GET(reg) BSP_FLD32GET(reg,16, 23) |
---|
350 | #define TMS570_FLASH_FBPRDY_BANKBUSY_SET(reg,val) BSP_FLD32SET(reg, val,16, 23) |
---|
351 | |
---|
352 | /* field: PUMPRDY - Flash pump ready flag */ |
---|
353 | #define TMS570_FLASH_FBPRDY_PUMPRDY BSP_FLD32(15) |
---|
354 | |
---|
355 | /* field: BANKRDY - Bank ready bits (one bit for each bank) */ |
---|
356 | #define TMS570_FLASH_FBPRDY_BANKRDY(val) BSP_FLD32(val,0, 7) |
---|
357 | #define TMS570_FLASH_FBPRDY_BANKRDY_GET(reg) BSP_FLD32GET(reg,0, 7) |
---|
358 | #define TMS570_FLASH_FBPRDY_BANKRDY_SET(reg,val) BSP_FLD32SET(reg, val,0, 7) |
---|
359 | |
---|
360 | |
---|
361 | /*---------------------TMS570_FLASHFPAC1---------------------*/ |
---|
362 | /* field: PSLEEP - Pump Sleep. */ |
---|
363 | #define TMS570_FLASH_FPAC1_PSLEEP(val) BSP_FLD32(val,16, 26) |
---|
364 | #define TMS570_FLASH_FPAC1_PSLEEP_GET(reg) BSP_FLD32GET(reg,16, 26) |
---|
365 | #define TMS570_FLASH_FPAC1_PSLEEP_SET(reg,val) BSP_FLD32SET(reg, val,16, 26) |
---|
366 | |
---|
367 | /* field: PUMPPWR - Flash Charge Pump Fallback Power Mode */ |
---|
368 | #define TMS570_FLASH_FPAC1_PUMPPWR BSP_FLD32(0) |
---|
369 | |
---|
370 | |
---|
371 | /*---------------------TMS570_FLASHFPAC2---------------------*/ |
---|
372 | /* field: PAGP - Pump Active Grace Period */ |
---|
373 | #define TMS570_FLASH_FPAC2_PAGP(val) BSP_FLD32(val,0, 15) |
---|
374 | #define TMS570_FLASH_FPAC2_PAGP_GET(reg) BSP_FLD32GET(reg,0, 15) |
---|
375 | #define TMS570_FLASH_FPAC2_PAGP_SET(reg,val) BSP_FLD32SET(reg, val,0, 15) |
---|
376 | |
---|
377 | |
---|
378 | /*----------------------TMS570_FLASHFMAC----------------------*/ |
---|
379 | /* field: BANK - Bank Enable. */ |
---|
380 | #define TMS570_FLASH_FMAC_BANK(val) BSP_FLD32(val,0, 2) |
---|
381 | #define TMS570_FLASH_FMAC_BANK_GET(reg) BSP_FLD32GET(reg,0, 2) |
---|
382 | #define TMS570_FLASH_FMAC_BANK_SET(reg,val) BSP_FLD32SET(reg, val,0, 2) |
---|
383 | |
---|
384 | |
---|
385 | /*---------------------TMS570_FLASHFMSTAT---------------------*/ |
---|
386 | /* field: ILA - Illegal Address */ |
---|
387 | #define TMS570_FLASH_FMSTAT_ILA BSP_FLD32(14) |
---|
388 | |
---|
389 | /* field: PGV - Program Verify */ |
---|
390 | #define TMS570_FLASH_FMSTAT_PGV BSP_FLD32(12) |
---|
391 | |
---|
392 | /* field: EV - Erase Verify */ |
---|
393 | #define TMS570_FLASH_FMSTAT_EV BSP_FLD32(10) |
---|
394 | |
---|
395 | /* field: BUSY - Busy */ |
---|
396 | #define TMS570_FLASH_FMSTAT_BUSY BSP_FLD32(8) |
---|
397 | |
---|
398 | /* field: ERS - Erase Active */ |
---|
399 | #define TMS570_FLASH_FMSTAT_ERS BSP_FLD32(7) |
---|
400 | |
---|
401 | /* field: PGM - Program Active */ |
---|
402 | #define TMS570_FLASH_FMSTAT_PGM BSP_FLD32(6) |
---|
403 | |
---|
404 | /* field: INVDAT - Invalid Data */ |
---|
405 | #define TMS570_FLASH_FMSTAT_INVDAT BSP_FLD32(5) |
---|
406 | |
---|
407 | /* field: CSTAT - Command Status */ |
---|
408 | #define TMS570_FLASH_FMSTAT_CSTAT BSP_FLD32(4) |
---|
409 | |
---|
410 | /* field: VOLTSTAT - Core Voltage Status */ |
---|
411 | #define TMS570_FLASH_FMSTAT_VOLTSTAT BSP_FLD32(3) |
---|
412 | |
---|
413 | /* field: ESUSP - Erase Suspended */ |
---|
414 | #define TMS570_FLASH_FMSTAT_ESUSP BSP_FLD32(2) |
---|
415 | |
---|
416 | /* field: PSUSP - Program Suspended */ |
---|
417 | #define TMS570_FLASH_FMSTAT_PSUSP BSP_FLD32(1) |
---|
418 | |
---|
419 | /* field: SLOCK - Sector Lock Status */ |
---|
420 | #define TMS570_FLASH_FMSTAT_SLOCK BSP_FLD32(0) |
---|
421 | |
---|
422 | |
---|
423 | /*--------------------TMS570_FLASHFEMUDMSW--------------------*/ |
---|
424 | /* field: EMU_DMSW - EEPROM Emulation Most Significant Data Word */ |
---|
425 | #define TMS570_FLASH_FEMUDMSW_EMU_DMSW(val) BSP_FLD32(val,0, 31) |
---|
426 | #define TMS570_FLASH_FEMUDMSW_EMU_DMSW_GET(reg) BSP_FLD32GET(reg,0, 31) |
---|
427 | #define TMS570_FLASH_FEMUDMSW_EMU_DMSW_SET(reg,val) BSP_FLD32SET(reg, val,0, 31) |
---|
428 | |
---|
429 | |
---|
430 | /*--------------------TMS570_FLASHFEMUDLSW--------------------*/ |
---|
431 | /* field: EMU_DLSW - EEPROM Emulation Least Significant Data Word */ |
---|
432 | #define TMS570_FLASH_FEMUDLSW_EMU_DLSW(val) BSP_FLD32(val,0, 31) |
---|
433 | #define TMS570_FLASH_FEMUDLSW_EMU_DLSW_GET(reg) BSP_FLD32GET(reg,0, 31) |
---|
434 | #define TMS570_FLASH_FEMUDLSW_EMU_DLSW_SET(reg,val) BSP_FLD32SET(reg, val,0, 31) |
---|
435 | |
---|
436 | |
---|
437 | /*--------------------TMS570_FLASHFEMUECC--------------------*/ |
---|
438 | /* field: EMU_ECC - This register can be written by the CPU in any mode. */ |
---|
439 | #define TMS570_FLASH_FEMUECC_EMU_ECC(val) BSP_FLD32(val,0, 7) |
---|
440 | #define TMS570_FLASH_FEMUECC_EMU_ECC_GET(reg) BSP_FLD32GET(reg,0, 7) |
---|
441 | #define TMS570_FLASH_FEMUECC_EMU_ECC_SET(reg,val) BSP_FLD32SET(reg, val,0, 7) |
---|
442 | |
---|
443 | |
---|
444 | /*--------------------TMS570_FLASHFEMUADDR--------------------*/ |
---|
445 | /* field: EMU_ADDR - EEPROM Emulation Address */ |
---|
446 | #define TMS570_FLASH_FEMUADDR_EMU_ADDR(val) BSP_FLD32(val,3, 21) |
---|
447 | #define TMS570_FLASH_FEMUADDR_EMU_ADDR_GET(reg) BSP_FLD32GET(reg,3, 21) |
---|
448 | #define TMS570_FLASH_FEMUADDR_EMU_ADDR_SET(reg,val) BSP_FLD32SET(reg, val,3, 21) |
---|
449 | |
---|
450 | |
---|
451 | /*-------------------TMS570_FLASHFDIAGCTRL-------------------*/ |
---|
452 | /* field: DIAG_TRIG - Diagnostic Trigger */ |
---|
453 | #define TMS570_FLASH_FDIAGCTRL_DIAG_TRIG BSP_FLD32(24) |
---|
454 | |
---|
455 | /* field: DIAG_EN_KEY - Diagnostic Enable Key */ |
---|
456 | #define TMS570_FLASH_FDIAGCTRL_DIAG_EN_KEY(val) BSP_FLD32(val,16, 19) |
---|
457 | #define TMS570_FLASH_FDIAGCTRL_DIAG_EN_KEY_GET(reg) BSP_FLD32GET(reg,16, 19) |
---|
458 | #define TMS570_FLASH_FDIAGCTRL_DIAG_EN_KEY_SET(reg,val) BSP_FLD32SET(reg, val,16, 19) |
---|
459 | |
---|
460 | /* field: DIAG_ECC_SEL - Diagnostic SECDED Select */ |
---|
461 | #define TMS570_FLASH_FDIAGCTRL_DIAG_ECC_SEL(val) BSP_FLD32(val,12, 14) |
---|
462 | #define TMS570_FLASH_FDIAGCTRL_DIAG_ECC_SEL_GET(reg) BSP_FLD32GET(reg,12, 14) |
---|
463 | #define TMS570_FLASH_FDIAGCTRL_DIAG_ECC_SEL_SET(reg,val) BSP_FLD32SET(reg, val,12, 14) |
---|
464 | |
---|
465 | |
---|
466 | /*-------------------TMS570_FLASHFRAWDATAH-------------------*/ |
---|
467 | /* field: RAW_DATA_ - Uncorrected Raw Data */ |
---|
468 | #define TMS570_FLASH_FRAWDATAH_RAW_DATA_(val) BSP_FLD32(val,0, 31) |
---|
469 | #define TMS570_FLASH_FRAWDATAH_RAW_DATA__GET(reg) BSP_FLD32GET(reg,0, 31) |
---|
470 | #define TMS570_FLASH_FRAWDATAH_RAW_DATA__SET(reg,val) BSP_FLD32SET(reg, val,0, 31) |
---|
471 | |
---|
472 | |
---|
473 | /*-------------------TMS570_FLASHFRAWDATAL-------------------*/ |
---|
474 | /* field: RAW_DATA_ - Uncorrected Raw Data. Same as FRAW_DATAH but stores lower 32 bits. */ |
---|
475 | #define TMS570_FLASH_FRAWDATAL_RAW_DATA_(val) BSP_FLD32(val,0, 31) |
---|
476 | #define TMS570_FLASH_FRAWDATAL_RAW_DATA__GET(reg) BSP_FLD32GET(reg,0, 31) |
---|
477 | #define TMS570_FLASH_FRAWDATAL_RAW_DATA__SET(reg,val) BSP_FLD32SET(reg, val,0, 31) |
---|
478 | |
---|
479 | |
---|
480 | /*--------------------TMS570_FLASHFRAWECC--------------------*/ |
---|
481 | /* field: PIPE_BUF - Error came from pipeline buffer hit */ |
---|
482 | #define TMS570_FLASH_FRAWECC_PIPE_BUF BSP_FLD32(8) |
---|
483 | |
---|
484 | /* field: RAW_ECC - Uncorrected Raw ECC */ |
---|
485 | #define TMS570_FLASH_FRAWECC_RAW_ECC(val) BSP_FLD32(val,0, 7) |
---|
486 | #define TMS570_FLASH_FRAWECC_RAW_ECC_GET(reg) BSP_FLD32GET(reg,0, 7) |
---|
487 | #define TMS570_FLASH_FRAWECC_RAW_ECC_SET(reg,val) BSP_FLD32SET(reg, val,0, 7) |
---|
488 | |
---|
489 | |
---|
490 | /*--------------------TMS570_FLASHFPAROVR--------------------*/ |
---|
491 | /* field: BNK_INV_PAR - Buffer Invert Parity */ |
---|
492 | #define TMS570_FLASH_FPAROVR_BNK_INV_PAR BSP_FLD32(16) |
---|
493 | |
---|
494 | /* field: BUS_PAR_DIS - Disable Bus Parity */ |
---|
495 | #define TMS570_FLASH_FPAROVR_BUS_PAR_DIS(val) BSP_FLD32(val,12, 15) |
---|
496 | #define TMS570_FLASH_FPAROVR_BUS_PAR_DIS_GET(reg) BSP_FLD32GET(reg,12, 15) |
---|
497 | #define TMS570_FLASH_FPAROVR_BUS_PAR_DIS_SET(reg,val) BSP_FLD32SET(reg, val,12, 15) |
---|
498 | |
---|
499 | /* field: PAR_OVR_KEY - When this value is 101, the selected ADD_INV_PAR and DAT_INV_PAR fields will become active. */ |
---|
500 | #define TMS570_FLASH_FPAROVR_PAR_OVR_KEY(val) BSP_FLD32(val,9, 11) |
---|
501 | #define TMS570_FLASH_FPAROVR_PAR_OVR_KEY_GET(reg) BSP_FLD32GET(reg,9, 11) |
---|
502 | #define TMS570_FLASH_FPAROVR_PAR_OVR_KEY_SET(reg,val) BSP_FLD32SET(reg, val,9, 11) |
---|
503 | |
---|
504 | /* field: ADD_INV_PAR - Address Odd Parity */ |
---|
505 | #define TMS570_FLASH_FPAROVR_ADD_INV_PAR BSP_FLD32(8) |
---|
506 | |
---|
507 | /* field: DAT_INV_PAR - Data Odd Parity */ |
---|
508 | #define TMS570_FLASH_FPAROVR_DAT_INV_PAR(val) BSP_FLD32(val,0, 7) |
---|
509 | #define TMS570_FLASH_FPAROVR_DAT_INV_PAR_GET(reg) BSP_FLD32GET(reg,0, 7) |
---|
510 | #define TMS570_FLASH_FPAROVR_DAT_INV_PAR_SET(reg,val) BSP_FLD32SET(reg, val,0, 7) |
---|
511 | |
---|
512 | |
---|
513 | /*-------------------TMS570_FLASHFEDACSDIS2-------------------*/ |
---|
514 | /* field: BankID3_Inverse - The bank ID inverse bits are used with the bank ID bits to select the bank for which a sector */ |
---|
515 | #define TMS570_FLASH_FEDACSDIS2_BankID3_Inverse(val) BSP_FLD32(val,29, 31) |
---|
516 | #define TMS570_FLASH_FEDACSDIS2_BankID3_Inverse_GET(reg) BSP_FLD32GET(reg,29, 31) |
---|
517 | #define TMS570_FLASH_FEDACSDIS2_BankID3_Inverse_SET(reg,val) BSP_FLD32SET(reg, val,29, 31) |
---|
518 | |
---|
519 | /* field: SectorID3_inverse - The sector ID inverse bits are used with the sector ID bits to determine which sector is disabled. */ |
---|
520 | #define TMS570_FLASH_FEDACSDIS2_SectorID3_inverse(val) BSP_FLD32(val,24, 27) |
---|
521 | #define TMS570_FLASH_FEDACSDIS2_SectorID3_inverse_GET(reg) BSP_FLD32GET(reg,24, 27) |
---|
522 | #define TMS570_FLASH_FEDACSDIS2_SectorID3_inverse_SET(reg,val) BSP_FLD32SET(reg, val,24, 27) |
---|
523 | |
---|
524 | /* field: BankID3 - The bank ID bits are used with the bank ID inverse bits to select the bank for which a sector */ |
---|
525 | #define TMS570_FLASH_FEDACSDIS2_BankID3(val) BSP_FLD32(val,21, 23) |
---|
526 | #define TMS570_FLASH_FEDACSDIS2_BankID3_GET(reg) BSP_FLD32GET(reg,21, 23) |
---|
527 | #define TMS570_FLASH_FEDACSDIS2_BankID3_SET(reg,val) BSP_FLD32SET(reg, val,21, 23) |
---|
528 | |
---|
529 | /* field: SectorID3 - The sector ID bits are used with the sector ID inverse bits to determine which sector is */ |
---|
530 | #define TMS570_FLASH_FEDACSDIS2_SectorID3(val) BSP_FLD32(val,16, 19) |
---|
531 | #define TMS570_FLASH_FEDACSDIS2_SectorID3_GET(reg) BSP_FLD32GET(reg,16, 19) |
---|
532 | #define TMS570_FLASH_FEDACSDIS2_SectorID3_SET(reg,val) BSP_FLD32SET(reg, val,16, 19) |
---|
533 | |
---|
534 | /* field: BankID2_Inverse - is disabled. The only bank that supports sector disable is bank 7. */ |
---|
535 | #define TMS570_FLASH_FEDACSDIS2_BankID2_Inverse(val) BSP_FLD32(val,13, 15) |
---|
536 | #define TMS570_FLASH_FEDACSDIS2_BankID2_Inverse_GET(reg) BSP_FLD32GET(reg,13, 15) |
---|
537 | #define TMS570_FLASH_FEDACSDIS2_BankID2_Inverse_SET(reg,val) BSP_FLD32SET(reg, val,13, 15) |
---|
538 | |
---|
539 | /* field: SectorID2_inverse - The sector ID inverse bits are used with the sector ID bits to determine which sector is */ |
---|
540 | #define TMS570_FLASH_FEDACSDIS2_SectorID2_inverse(val) BSP_FLD32(val,8, 11) |
---|
541 | #define TMS570_FLASH_FEDACSDIS2_SectorID2_inverse_GET(reg) BSP_FLD32GET(reg,8, 11) |
---|
542 | #define TMS570_FLASH_FEDACSDIS2_SectorID2_inverse_SET(reg,val) BSP_FLD32SET(reg, val,8, 11) |
---|
543 | |
---|
544 | /* field: BankID2 - The bank ID bits are used with the bank ID inverse bits to select the bank for which a sector */ |
---|
545 | #define TMS570_FLASH_FEDACSDIS2_BankID2(val) BSP_FLD32(val,5, 7) |
---|
546 | #define TMS570_FLASH_FEDACSDIS2_BankID2_GET(reg) BSP_FLD32GET(reg,5, 7) |
---|
547 | #define TMS570_FLASH_FEDACSDIS2_BankID2_SET(reg,val) BSP_FLD32SET(reg, val,5, 7) |
---|
548 | |
---|
549 | /* field: SectorID2 - The sector ID bits are used with the sector ID inverse bits to determine which sector is */ |
---|
550 | #define TMS570_FLASH_FEDACSDIS2_SectorID2(val) BSP_FLD32(val,0, 3) |
---|
551 | #define TMS570_FLASH_FEDACSDIS2_SectorID2_GET(reg) BSP_FLD32GET(reg,0, 3) |
---|
552 | #define TMS570_FLASH_FEDACSDIS2_SectorID2_SET(reg,val) BSP_FLD32SET(reg, val,0, 3) |
---|
553 | |
---|
554 | |
---|
555 | /*--------------------TMS570_FLASHFSMWRENA--------------------*/ |
---|
556 | /* field: WR_ENA - Flash State Machine Write Enable */ |
---|
557 | #define TMS570_FLASH_FSMWRENA_WR_ENA(val) BSP_FLD32(val,0, 2) |
---|
558 | #define TMS570_FLASH_FSMWRENA_WR_ENA_GET(reg) BSP_FLD32GET(reg,0, 2) |
---|
559 | #define TMS570_FLASH_FSMWRENA_WR_ENA_SET(reg,val) BSP_FLD32SET(reg, val,0, 2) |
---|
560 | |
---|
561 | |
---|
562 | /*-------------------TMS570_FLASHFSMSECTOR-------------------*/ |
---|
563 | /* field: SECT_ERASED - Sectors Erased */ |
---|
564 | #define TMS570_FLASH_FSMSECTOR_SECT_ERASED(val) BSP_FLD32(val,16, 31) |
---|
565 | #define TMS570_FLASH_FSMSECTOR_SECT_ERASED_GET(reg) BSP_FLD32GET(reg,16, 31) |
---|
566 | #define TMS570_FLASH_FSMSECTOR_SECT_ERASED_SET(reg,val) BSP_FLD32SET(reg, val,16, 31) |
---|
567 | |
---|
568 | |
---|
569 | /*------------------TMS570_FLASHEEPROMCONFIG------------------*/ |
---|
570 | /* field: EWAIT - EEPROM Wait state Counter */ |
---|
571 | #define TMS570_FLASH_EEPROMCONFIG_EWAIT(val) BSP_FLD32(val,16, 19) |
---|
572 | #define TMS570_FLASH_EEPROMCONFIG_EWAIT_GET(reg) BSP_FLD32GET(reg,16, 19) |
---|
573 | #define TMS570_FLASH_EEPROMCONFIG_EWAIT_SET(reg,val) BSP_FLD32SET(reg, val,16, 19) |
---|
574 | |
---|
575 | /* field: AUTOSUSP_EN - Auto Suspend Enable */ |
---|
576 | #define TMS570_FLASH_EEPROMCONFIG_AUTOSUSP_EN BSP_FLD32(8) |
---|
577 | |
---|
578 | /* field: AUTOSTART_GRACE - Auto-suspend Startup Grace Period */ |
---|
579 | #define TMS570_FLASH_EEPROMCONFIG_AUTOSTART_GRACE(val) BSP_FLD32(val,0, 7) |
---|
580 | #define TMS570_FLASH_EEPROMCONFIG_AUTOSTART_GRACE_GET(reg) BSP_FLD32GET(reg,0, 7) |
---|
581 | #define TMS570_FLASH_EEPROMCONFIG_AUTOSTART_GRACE_SET(reg,val) BSP_FLD32SET(reg, val,0, 7) |
---|
582 | |
---|
583 | |
---|
584 | /*--------------------TMS570_FLASHEECTRL1--------------------*/ |
---|
585 | /* field: EDACMODE - Error Correction Mode. */ |
---|
586 | #define TMS570_FLASH_EECTRL1_EDACMODE(val) BSP_FLD32(val,16, 19) |
---|
587 | #define TMS570_FLASH_EECTRL1_EDACMODE_GET(reg) BSP_FLD32GET(reg,16, 19) |
---|
588 | #define TMS570_FLASH_EECTRL1_EDACMODE_SET(reg,val) BSP_FLD32SET(reg, val,16, 19) |
---|
589 | |
---|
590 | /* field: EE_EOFEN - EEPROM Emulation Event on a correctable One's Fail Enable bit */ |
---|
591 | #define TMS570_FLASH_EECTRL1_EE_EOFEN BSP_FLD32(10) |
---|
592 | |
---|
593 | /* field: EE_EZFEN - EEPROM Emulation Event on a correctable Zero's Fail Enable bit */ |
---|
594 | #define TMS570_FLASH_EECTRL1_EE_EZFEN BSP_FLD32(9) |
---|
595 | |
---|
596 | /* field: EE_EPEN - EEPROM Emulation Error Profiling Enable. */ |
---|
597 | #define TMS570_FLASH_EECTRL1_EE_EPEN BSP_FLD32(8) |
---|
598 | |
---|
599 | |
---|
600 | /*--------------------TMS570_FLASHEECTRL2--------------------*/ |
---|
601 | /* field: EE_SEC_THRESHOLD - EEPROM Emulation Single Error Correction Threshold */ |
---|
602 | #define TMS570_FLASH_EECTRL2_EE_SEC_THRESHOLD(val) BSP_FLD32(val,0, 15) |
---|
603 | #define TMS570_FLASH_EECTRL2_EE_SEC_THRESHOLD_GET(reg) BSP_FLD32GET(reg,0, 15) |
---|
604 | #define TMS570_FLASH_EECTRL2_EE_SEC_THRESHOLD_SET(reg,val) BSP_FLD32SET(reg, val,0, 15) |
---|
605 | |
---|
606 | |
---|
607 | /*------------------TMS570_FLASHEECORERRCNT------------------*/ |
---|
608 | /* field: EE_ERRCNT - Single Error Correction Count */ |
---|
609 | #define TMS570_FLASH_EECORERRCNT_EE_ERRCNT(val) BSP_FLD32(val,0, 15) |
---|
610 | #define TMS570_FLASH_EECORERRCNT_EE_ERRCNT_GET(reg) BSP_FLD32GET(reg,0, 15) |
---|
611 | #define TMS570_FLASH_EECORERRCNT_EE_ERRCNT_SET(reg,val) BSP_FLD32SET(reg, val,0, 15) |
---|
612 | |
---|
613 | |
---|
614 | /*------------------TMS570_FLASHEECORERRADD------------------*/ |
---|
615 | /* field: COR_ERR_ADD - Correctable Error Address */ |
---|
616 | #define TMS570_FLASH_EECORERRADD_COR_ERR_ADD(val) BSP_FLD32(val,3, 31) |
---|
617 | #define TMS570_FLASH_EECORERRADD_COR_ERR_ADD_GET(reg) BSP_FLD32GET(reg,3, 31) |
---|
618 | #define TMS570_FLASH_EECORERRADD_COR_ERR_ADD_SET(reg,val) BSP_FLD32SET(reg, val,3, 31) |
---|
619 | |
---|
620 | /* field: B_OFF - Byte offset */ |
---|
621 | #define TMS570_FLASH_EECORERRADD_B_OFF(val) BSP_FLD32(val,0, 2) |
---|
622 | #define TMS570_FLASH_EECORERRADD_B_OFF_GET(reg) BSP_FLD32GET(reg,0, 2) |
---|
623 | #define TMS570_FLASH_EECORERRADD_B_OFF_SET(reg,val) BSP_FLD32SET(reg, val,0, 2) |
---|
624 | |
---|
625 | |
---|
626 | /*------------------TMS570_FLASHEECORERRPOS------------------*/ |
---|
627 | /* field: TYPE - ErrorType */ |
---|
628 | #define TMS570_FLASH_EECORERRPOS_TYPE BSP_FLD32(8) |
---|
629 | |
---|
630 | /* field: EE_ERR_POS - The bit address of the single bit error */ |
---|
631 | #define TMS570_FLASH_EECORERRPOS_EE_ERR_POS(val) BSP_FLD32(val,0, 7) |
---|
632 | #define TMS570_FLASH_EECORERRPOS_EE_ERR_POS_GET(reg) BSP_FLD32GET(reg,0, 7) |
---|
633 | #define TMS570_FLASH_EECORERRPOS_EE_ERR_POS_SET(reg,val) BSP_FLD32SET(reg, val,0, 7) |
---|
634 | |
---|
635 | |
---|
636 | /*--------------------TMS570_FLASHEESTATUS--------------------*/ |
---|
637 | /* field: EE_D_UNC_ERR - Diagnostic Mode Uncorrectable Error Status Flag */ |
---|
638 | #define TMS570_FLASH_EESTATUS_EE_D_UNC_ERR BSP_FLD32(12) |
---|
639 | |
---|
640 | /* field: EE_UNC_ERR - EEPROM Emulation Uncorrectable Error Flag */ |
---|
641 | #define TMS570_FLASH_EESTATUS_EE_UNC_ERR BSP_FLD32(8) |
---|
642 | |
---|
643 | /* field: EE_CMG - EEPROM Emulation Compare Malfunction Good */ |
---|
644 | #define TMS570_FLASH_EESTATUS_EE_CMG BSP_FLD32(6) |
---|
645 | |
---|
646 | /* field: EE_CME - . */ |
---|
647 | #define TMS570_FLASH_EESTATUS_EE_CME BSP_FLD32(4) |
---|
648 | |
---|
649 | /* field: EE_D_COR_ERR - Diagnostic Correctable Error Flag */ |
---|
650 | #define TMS570_FLASH_EESTATUS_EE_D_COR_ERR BSP_FLD32(3) |
---|
651 | |
---|
652 | /* field: EE_ERR_ONE_FLG - Error on One Fail Error Flag */ |
---|
653 | #define TMS570_FLASH_EESTATUS_EE_ERR_ONE_FLG BSP_FLD32(2) |
---|
654 | |
---|
655 | /* field: EE_ERR_ZERO_FLG - Error on Zero Fail Error Flag */ |
---|
656 | #define TMS570_FLASH_EESTATUS_EE_ERR_ZERO_FLG BSP_FLD32(1) |
---|
657 | |
---|
658 | /* field: EE_ERR_PRF_FLG - Error Profiling Error Flag */ |
---|
659 | #define TMS570_FLASH_EESTATUS_EE_ERR_PRF_FLG BSP_FLD32(0) |
---|
660 | |
---|
661 | |
---|
662 | /*------------------TMS570_FLASHEEUNCERRADD------------------*/ |
---|
663 | /* field: UNC_ERR_ADD - Un-correctable Error Address */ |
---|
664 | #define TMS570_FLASH_EEUNCERRADD_UNC_ERR_ADD(val) BSP_FLD32(val,3, 31) |
---|
665 | #define TMS570_FLASH_EEUNCERRADD_UNC_ERR_ADD_GET(reg) BSP_FLD32GET(reg,3, 31) |
---|
666 | #define TMS570_FLASH_EEUNCERRADD_UNC_ERR_ADD_SET(reg,val) BSP_FLD32SET(reg, val,3, 31) |
---|
667 | |
---|
668 | /* field: B_OFF - Byte offset */ |
---|
669 | #define TMS570_FLASH_EEUNCERRADD_B_OFF(val) BSP_FLD32(val,0, 2) |
---|
670 | #define TMS570_FLASH_EEUNCERRADD_B_OFF_GET(reg) BSP_FLD32GET(reg,0, 2) |
---|
671 | #define TMS570_FLASH_EEUNCERRADD_B_OFF_SET(reg,val) BSP_FLD32SET(reg, val,0, 2) |
---|
672 | |
---|
673 | |
---|
674 | /*--------------------TMS570_FLASHFCFGBANK--------------------*/ |
---|
675 | /* field: EE_BANK_WIDTH - Bank 7 width (144 bits wide) */ |
---|
676 | #define TMS570_FLASH_FCFGBANK_EE_BANK_WIDTH(val) BSP_FLD32(val,20, 31) |
---|
677 | #define TMS570_FLASH_FCFGBANK_EE_BANK_WIDTH_GET(reg) BSP_FLD32GET(reg,20, 31) |
---|
678 | #define TMS570_FLASH_FCFGBANK_EE_BANK_WIDTH_SET(reg,val) BSP_FLD32SET(reg, val,20, 31) |
---|
679 | |
---|
680 | /* field: MAIN_BANK_WIDTH - Width of main flash banks (144 bits wide) */ |
---|
681 | #define TMS570_FLASH_FCFGBANK_MAIN_BANK_WIDTH(val) BSP_FLD32(val,4, 15) |
---|
682 | #define TMS570_FLASH_FCFGBANK_MAIN_BANK_WIDTH_GET(reg) BSP_FLD32GET(reg,4, 15) |
---|
683 | #define TMS570_FLASH_FCFGBANK_MAIN_BANK_WIDTH_SET(reg,val) BSP_FLD32SET(reg, val,4, 15) |
---|
684 | |
---|
685 | |
---|
686 | |
---|
687 | #endif /* LIBBSP_ARM_tms570_FLASH */ |
---|