flash_driver.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016, Freescale Semiconductor, Inc.
3  * Copyright 2016 -2017 NXP
4  * All rights reserved.
5  *
6  * THIS SOFTWARE IS PROVIDED BY NXP "AS IS" AND ANY EXPRESSED OR
7  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
8  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
9  * IN NO EVENT SHALL NXP OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
10  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
11  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
12  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
13  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
14  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
15  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
16  * THE POSSIBILITY OF SUCH DAMAGE.
17  */
49 #ifndef FLASH_DRIVER_H
50 #define FLASH_DRIVER_H
51 
52 #include <stdbool.h>
53 #include <stddef.h>
54 #include "status.h"
55 #include "device_registers.h"
56 
64 /*******************************************************************************
65  * FTFx - Register instance definitions
66  *******************************************************************************/
67 /*******************************************************************************
68  * FTFE
69  *******************************************************************************/
70 #ifdef FTFE
71 #define FTFx_BASE FTFE_BASE
72 #define FTFx_FSTAT FTFE->FSTAT
73 #define FTFx_FCNFG FTFE->FCNFG
74 #define FTFx_FSEC FTFE->FSEC
75 #define FTFx_FOPT FTFE->FOPT
76 #define FTFx_FCCOB3 FTFE->FCCOB[0]
77 #define FTFx_FCCOB2 FTFE->FCCOB[1]
78 #define FTFx_FCCOB1 FTFE->FCCOB[2]
79 #define FTFx_FCCOB0 FTFE->FCCOB[3]
80 #define FTFx_FCCOB7 FTFE->FCCOB[4]
81 #define FTFx_FCCOB6 FTFE->FCCOB[5]
82 #define FTFx_FCCOB5 FTFE->FCCOB[6]
83 #define FTFx_FCCOB4 FTFE->FCCOB[7]
84 #define FTFx_FCCOBB FTFE->FCCOB[8]
85 #define FTFx_FCCOBA FTFE->FCCOB[9]
86 #define FTFx_FCCOB9 FTFE->FCCOB[10]
87 #define FTFx_FCCOB8 FTFE->FCCOB[11]
88 #define FTFx_FPROT3 FTFE->FPROT[0]
89 #define FTFx_FPROT2 FTFE->FPROT[1]
90 #define FTFx_FPROT1 FTFE->FPROT[2]
91 #define FTFx_FPROT0 FTFE->FPROT[3]
92 #define FTFx_FEPROT FTFE->FEPROT
93 #define FTFx_FDPROT FTFE->FDPROT
94 #if FEATURE_FLS_HAS_DETECT_ECC_ERROR
95 #define FTFx_FERSTAT FTFE->FERSTAT
96 #define FTFx_FERCNFG FTFE->FERCNFG
97 #endif
98 /* FSTAT Bit Fields */
99 #define FTFx_FSTAT_MGSTAT0_MASK FTFE_FSTAT_MGSTAT0_MASK
100 #define FTFx_FSTAT_MGSTAT0_SHIFT FTFE_FSTAT_MGSTAT0_SHIFT
101 #define FTFx_FSTAT_MGSTAT0_WIDTH FTFE_FSTAT_MGSTAT0_WIDTH
102 #define FTFx_FSTAT_MGSTAT0(x) FTFE_FSTAT_MGSTAT0(x)
103 #define FTFx_FSTAT_FPVIOL_MASK FTFE_FSTAT_FPVIOL_MASK
104 #define FTFx_FSTAT_FPVIOL_SHIFT FTFE_FSTAT_FPVIOL_SHIFT
105 #define FTFx_FSTAT_FPVIOL_WIDTH FTFE_FSTAT_FPVIOL_WIDTH
106 #define FTFx_FSTAT_FPVIOL(x) FTFE_FSTAT_FPVIOL(x)
107 #define FTFx_FSTAT_ACCERR_MASK FTFE_FSTAT_ACCERR_MASK
108 #define FTFx_FSTAT_ACCERR_SHIFT FTFE_FSTAT_ACCERR_SHIFT
109 #define FTFx_FSTAT_ACCERR_WIDTH FTFE_FSTAT_ACCERR_WIDTH
110 #define FTFx_FSTAT_ACCERR(x) FTFE_FSTAT_ACCERR(x)
111 #define FTFx_FSTAT_RDCOLERR_MASK FTFE_FSTAT_RDCOLERR_MASK
112 #define FTFx_FSTAT_RDCOLERR_SHIFT FTFE_FSTAT_RDCOLERR_SHIFT
113 #define FTFx_FSTAT_RDCOLERR_WIDTH FTFE_FSTAT_RDCOLERR_WIDTH
114 #define FTFx_FSTAT_RDCOLERR(x) FTFE_FSTAT_RDCOLERR(x)
115 #define FTFx_FSTAT_CCIF_MASK FTFE_FSTAT_CCIF_MASK
116 #define FTFx_FSTAT_CCIF_SHIFT FTFE_FSTAT_CCIF_SHIFT
117 #define FTFx_FSTAT_CCIF_WIDTH FTFE_FSTAT_CCIF_WIDTH
118 #define FTFx_FSTAT_CCIF(x) FTFE_FSTAT_CCIF(x)
119 /* FCNFG Bit Fields */
120 #define FTFx_FCNFG_EEERDY_MASK FTFE_FCNFG_EEERDY_MASK
121 #define FTFx_FCNFG_EEERDY_SHIFT FTFE_FCNFG_EEERDY_SHIFT
122 #define FTFx_FCNFG_EEERDY_WIDTH FTFE_FCNFG_EEERDY_WIDTH
123 #define FTFx_FCNFG_EEERDY(x) FTFE_FCNFG_EEERDY(x)
124 #define FTFx_FCNFG_RAMRDY_MASK FTFE_FCNFG_RAMRDY_MASK
125 #define FTFx_FCNFG_RAMRDY_SHIFT FTFE_FCNFG_RAMRDY_SHIFT
126 #define FTFx_FCNFG_RAMRDY_WIDTH FTFE_FCNFG_RAMRDY_WIDTH
127 #define FTFx_FCNFG_RAMRDY(x) FTFE_FCNFG_RAMRDY(x)
128 #define FTFx_FCNFG_PFLSH_MASK FTFE_FCNFG_PFLSH_MASK
129 #define FTFx_FCNFG_PFLSH_SHIFT FTFE_FCNFG_PFLSH_SHIFT
130 #define FTFx_FCNFG_PFLSH_WIDTH FTFE_FCNFG_PFLSH_WIDTH
131 #define FTFx_FCNFG_PFLSH(x) FTFE_FCNFG_PFLSH(x)
132 #define FTFx_FCNFG_ERSSUSP_MASK FTFE_FCNFG_ERSSUSP_MASK
133 #define FTFx_FCNFG_ERSSUSP_SHIFT FTFE_FCNFG_ERSSUSP_SHIFT
134 #define FTFx_FCNFG_ERSSUSP_WIDTH FTFE_FCNFG_ERSSUSP_WIDTH
135 #define FTFx_FCNFG_ERSSUSP(x) FTFE_FCNFG_ERSSUSP(x)
136 #define FTFx_FCNFG_ERSAREQ_MASK FTFE_FCNFG_ERSAREQ_MASK
137 #define FTFx_FCNFG_ERSAREQ_SHIFT FTFE_FCNFG_ERSAREQ_SHIFT
138 #define FTFx_FCNFG_ERSAREQ_WIDTH FTFE_FCNFG_ERSAREQ_WIDTH
139 #define FTFx_FCNFG_ERSAREQ(x) FTFE_FCNFG_ERSAREQ(x)
140 #define FTFx_FCNFG_RDCOLLIE_MASK FTFE_FCNFG_RDCOLLIE_MASK
141 #define FTFx_FCNFG_RDCOLLIE_SHIFT FTFE_FCNFG_RDCOLLIE_SHIFT
142 #define FTFx_FCNFG_RDCOLLIE_WIDTH FTFE_FCNFG_RDCOLLIE_WIDTH
143 #define FTFx_FCNFG_RDCOLLIE(x) FTFE_FCNFG_RDCOLLIE(x)
144 #define FTFx_FCNFG_CCIE_MASK FTFE_FCNFG_CCIE_MASK
145 #define FTFx_FCNFG_CCIE_SHIFT FTFE_FCNFG_CCIE_SHIFT
146 #define FTFx_FCNFG_CCIE_WIDTH FTFE_FCNFG_CCIE_WIDTH
147 #define FTFx_FCNFG_CCIE(x) FTFE_FCNFG_CCIE(x)
148 /* FSEC Bit Fields */
149 #define FTFx_FSEC_SEC_MASK FTFE_FSEC_SEC_MASK
150 #define FTFx_FSEC_SEC_SHIFT FTFE_FSEC_SEC_SHIFT
151 #define FTFx_FSEC_SEC_WIDTH FTFE_FSEC_SEC_WIDTH
152 #define FTFx_FSEC_SEC(x) FTFE_FSEC_SEC(x)
153 #define FTFx_FSEC_FSLACC_MASK FTFE_FSEC_FSLACC_MASK
154 #define FTFx_FSEC_FSLACC_SHIFT FTFE_FSEC_FSLACC_SHIFT
155 #define FTFx_FSEC_FSLACC_WIDTH FTFE_FSEC_FSLACC_WIDTH
156 #define FTFx_FSEC_FSLACC(x) FTFE_FSEC_FSLACC(x)
157 #define FTFx_FSEC_MEEN_MASK FTFE_FSEC_MEEN_MASK
158 #define FTFx_FSEC_MEEN_SHIFT FTFE_FSEC_MEEN_SHIFT
159 #define FTFx_FSEC_MEEN_WIDTH FTFE_FSEC_MEEN_WIDTH
160 #define FTFx_FSEC_MEEN(x) FTFE_FSEC_MEEN(x)
161 #define FTFx_FSEC_KEYEN_MASK FTFE_FSEC_KEYEN_MASK
162 #define FTFx_FSEC_KEYEN_SHIFT FTFE_FSEC_KEYEN_SHIFT
163 #define FTFx_FSEC_KEYEN_WIDTH FTFE_FSEC_KEYEN_WIDTH
164 #define FTFx_FSEC_KEYEN(x) FTFE_FSEC_KEYEN(x)
165 /* FOPT Bit Fields */
166 #define FTFx_FOPT_OPT_MASK FTFE_FOPT_OPT_MASK
167 #define FTFx_FOPT_OPT_SHIFT FTFE_FOPT_OPT_SHIFT
168 #define FTFx_FOPT_OPT_WIDTH FTFE_FOPT_OPT_WIDTH
169 #define FTFx_FOPT_OPT(x) FTFE_FOPT_OPT(x)
170 /* FCCOB Bit Fields */
171 #define FTFx_FCCOB_CCOBn_MASK FTFE_FCCOB_CCOBn_MASK
172 #define FTFx_FCCOB_CCOBn_SHIFT FTFE_FCCOB_CCOBn_SHIFT
173 #define FTFx_FCCOB_CCOBn_WIDTH FTFE_FCCOB_CCOBn_WIDTH
174 #define FTFx_FCCOB_CCOBn(x) FTFE_FCCOB_CCOBn(x)
175 /* FPROT Bit Fields */
176 #define FTFx_FPROT_PROT_MASK FTFE_FPROT_PROT_MASK
177 #define FTFx_FPROT_PROT_SHIFT FTFE_FPROT_PROT_SHIFT
178 #define FTFx_FPROT_PROT_WIDTH FTFE_FPROT_PROT_WIDTH
179 #define FTFx_FPROT_PROT(x) FTFE_FPROT_PROT(x)
180 /* FEPROT Bit Fields */
181 #define FTFx_FEPROT_EPROT_MASK FTFE_FEPROT_EPROT_MASK
182 #define FTFx_FEPROT_EPROT_SHIFT FTFE_FEPROT_EPROT_SHIFT
183 #define FTFx_FEPROT_EPROT_WIDTH FTFE_FEPROT_EPROT_WIDTH
184 #define FTFx_FEPROT_EPROT(x) FTFE_FEPROT_EPROT(x)
185 /* FDPROT Bit Fields */
186 #define FTFx_FDPROT_DPROT_MASK FTFE_FDPROT_DPROT_MASK
187 #define FTFx_FDPROT_DPROT_SHIFT FTFE_FDPROT_DPROT_SHIFT
188 #define FTFx_FDPROT_DPROT_WIDTH FTFE_FDPROT_DPROT_WIDTH
189 #define FTFx_FDPROT_DPROT(x) FTFE_FDPROT_DPROT(x)
190 #if FEATURE_FLS_HAS_DETECT_ECC_ERROR
191 /* FERSTAT Bit Fields */
192 #define FTFx_FERSTAT_DFDIF_MASK FTFE_FERSTAT_DFDIF_MASK
193 #define FTFx_FERSTAT_DFDIF_SHIFT FTFE_FERSTAT_DFDIF_SHIFT
194 #define FTFx_FERSTAT_DFDIF_WIDTH FTFE_FERSTAT_DFDIF_WIDTH
195 #define FTFx_FERSTAT_DFDIF(x) FTFE_FERSTAT_DFDIF(x)
196 /* FERCNFG Bit Fields */
197 #define FTFx_FERCNFG_DFDIE_MASK FTFE_FERCNFG_DFDIE_MASK
198 #define FTFx_FERCNFG_DFDIE_SHIFT FTFE_FERCNFG_DFDIE_SHIFT
199 #define FTFx_FERCNFG_DFDIE_WIDTH FTFE_FERCNFG_DFDIE_WIDTH
200 #define FTFx_FERCNFG_DFDIE(x) FTFE_FERCNFG_DFDIE(x)
201 #define FTFx_FERCNFG_FDFD_MASK FTFE_FERCNFG_FDFD_MASK
202 #define FTFx_FERCNFG_FDFD_SHIFT FTFE_FERCNFG_FDFD_SHIFT
203 #define FTFx_FERCNFG_FDFD_WIDTH FTFE_FERCNFG_FDFD_WIDTH
204 #define FTFx_FERCNFG_FDFD(x) FTFE_FERCNFG_FDFD(x)
205 #endif
206 /*******************************************************************************
207  * FTFC
208  *******************************************************************************/
209 #elif defined(FTFC)
210 #define FTFx_BASE FTFC_BASE
211 #define FTFx_FSTAT FTFC->FSTAT
212 #define FTFx_FCNFG FTFC->FCNFG
213 #define FTFx_FSEC FTFC->FSEC
214 #define FTFx_FOPT FTFC->FOPT
215 #define FTFx_FCCOB3 FTFC->FCCOB[0]
216 #define FTFx_FCCOB2 FTFC->FCCOB[1]
217 #define FTFx_FCCOB1 FTFC->FCCOB[2]
218 #define FTFx_FCCOB0 FTFC->FCCOB[3]
219 #define FTFx_FCCOB7 FTFC->FCCOB[4]
220 #define FTFx_FCCOB6 FTFC->FCCOB[5]
221 #define FTFx_FCCOB5 FTFC->FCCOB[6]
222 #define FTFx_FCCOB4 FTFC->FCCOB[7]
223 #define FTFx_FCCOBB FTFC->FCCOB[8]
224 #define FTFx_FCCOBA FTFC->FCCOB[9]
225 #define FTFx_FCCOB9 FTFC->FCCOB[10]
226 #define FTFx_FCCOB8 FTFC->FCCOB[11]
227 #define FTFx_FPROT3 FTFC->FPROT[0]
228 #define FTFx_FPROT2 FTFC->FPROT[1]
229 #define FTFx_FPROT1 FTFC->FPROT[2]
230 #define FTFx_FPROT0 FTFC->FPROT[3]
231 #define FTFx_FEPROT FTFC->FEPROT
232 #define FTFx_FDPROT FTFC->FDPROT
233 #define FTFx_FCSESTAT FTFC->FCSESTAT
234 #if FEATURE_FLS_HAS_DETECT_ECC_ERROR
235 #define FTFx_FERSTAT FTFC->FERSTAT
236 #define FTFx_FERCNFG FTFC->FERCNFG
237 #endif
238 /* FSTAT Bit Fields */
239 #define FTFx_FSTAT_MGSTAT0_MASK FTFC_FSTAT_MGSTAT0_MASK
240 #define FTFx_FSTAT_MGSTAT0_SHIFT FTFC_FSTAT_MGSTAT0_SHIFT
241 #define FTFx_FSTAT_MGSTAT0_WIDTH FTFC_FSTAT_MGSTAT0_WIDTH
242 #define FTFx_FSTAT_MGSTAT0(x) FTFC_FSTAT_MGSTAT0(x)
243 #define FTFx_FSTAT_FPVIOL_MASK FTFC_FSTAT_FPVIOL_MASK
244 #define FTFx_FSTAT_FPVIOL_SHIFT FTFC_FSTAT_FPVIOL_SHIFT
245 #define FTFx_FSTAT_FPVIOL_WIDTH FTFC_FSTAT_FPVIOL_WIDTH
246 #define FTFx_FSTAT_FPVIOL(x) FTFC_FSTAT_FPVIOL(x)
247 #define FTFx_FSTAT_ACCERR_MASK FTFC_FSTAT_ACCERR_MASK
248 #define FTFx_FSTAT_ACCERR_SHIFT FTFC_FSTAT_ACCERR_SHIFT
249 #define FTFx_FSTAT_ACCERR_WIDTH FTFC_FSTAT_ACCERR_WIDTH
250 #define FTFx_FSTAT_ACCERR(x) FTFC_FSTAT_ACCERR(x)
251 #define FTFx_FSTAT_RDCOLERR_MASK FTFC_FSTAT_RDCOLERR_MASK
252 #define FTFx_FSTAT_RDCOLERR_SHIFT FTFC_FSTAT_RDCOLERR_SHIFT
253 #define FTFx_FSTAT_RDCOLERR_WIDTH FTFC_FSTAT_RDCOLERR_WIDTH
254 #define FTFx_FSTAT_RDCOLERR(x) FTFC_FSTAT_RDCOLERR(x)
255 #define FTFx_FSTAT_CCIF_MASK FTFC_FSTAT_CCIF_MASK
256 #define FTFx_FSTAT_CCIF_SHIFT FTFC_FSTAT_CCIF_SHIFT
257 #define FTFx_FSTAT_CCIF_WIDTH FTFC_FSTAT_CCIF_WIDTH
258 #define FTFx_FSTAT_CCIF(x) FTFC_FSTAT_CCIF(x)
259 /* FCNFG Bit Fields */
260 #define FTFx_FCNFG_EEERDY_MASK FTFC_FCNFG_EEERDY_MASK
261 #define FTFx_FCNFG_EEERDY_SHIFT FTFC_FCNFG_EEERDY_SHIFT
262 #define FTFx_FCNFG_EEERDY_WIDTH FTFC_FCNFG_EEERDY_WIDTH
263 #define FTFx_FCNFG_EEERDY(x) FTFC_FCNFG_EEERDY(x)
264 #define FTFx_FCNFG_RAMRDY_MASK FTFC_FCNFG_RAMRDY_MASK
265 #define FTFx_FCNFG_RAMRDY_SHIFT FTFC_FCNFG_RAMRDY_SHIFT
266 #define FTFx_FCNFG_RAMRDY_WIDTH FTFC_FCNFG_RAMRDY_WIDTH
267 #define FTFx_FCNFG_RAMRDY(x) FTFC_FCNFG_RAMRDY(x)
268 #define FTFx_FCNFG_ERSSUSP_MASK FTFC_FCNFG_ERSSUSP_MASK
269 #define FTFx_FCNFG_ERSSUSP_SHIFT FTFC_FCNFG_ERSSUSP_SHIFT
270 #define FTFx_FCNFG_ERSSUSP_WIDTH FTFC_FCNFG_ERSSUSP_WIDTH
271 #define FTFx_FCNFG_ERSSUSP(x) FTFC_FCNFG_ERSSUSP(x)
272 #define FTFx_FCNFG_ERSAREQ_MASK FTFC_FCNFG_ERSAREQ_MASK
273 #define FTFx_FCNFG_ERSAREQ_SHIFT FTFC_FCNFG_ERSAREQ_SHIFT
274 #define FTFx_FCNFG_ERSAREQ_WIDTH FTFC_FCNFG_ERSAREQ_WIDTH
275 #define FTFx_FCNFG_ERSAREQ(x) FTFC_FCNFG_ERSAREQ(x)
276 #define FTFx_FCNFG_RDCOLLIE_MASK FTFC_FCNFG_RDCOLLIE_MASK
277 #define FTFx_FCNFG_RDCOLLIE_SHIFT FTFC_FCNFG_RDCOLLIE_SHIFT
278 #define FTFx_FCNFG_RDCOLLIE_WIDTH FTFC_FCNFG_RDCOLLIE_WIDTH
279 #define FTFx_FCNFG_RDCOLLIE(x) FTFC_FCNFG_RDCOLLIE(x)
280 #define FTFx_FCNFG_CCIE_MASK FTFC_FCNFG_CCIE_MASK
281 #define FTFx_FCNFG_CCIE_SHIFT FTFC_FCNFG_CCIE_SHIFT
282 #define FTFx_FCNFG_CCIE_WIDTH FTFC_FCNFG_CCIE_WIDTH
283 #define FTFx_FCNFG_CCIE(x) FTFC_FCNFG_CCIE(x)
284 /* FSEC Bit Fields */
285 #define FTFx_FSEC_SEC_MASK FTFC_FSEC_SEC_MASK
286 #define FTFx_FSEC_SEC_SHIFT FTFC_FSEC_SEC_SHIFT
287 #define FTFx_FSEC_SEC_WIDTH FTFC_FSEC_SEC_WIDTH
288 #define FTFx_FSEC_SEC(x) FTFC_FSEC_SEC(x)
289 #define FTFx_FSEC_FSLACC_MASK FTFC_FSEC_FSLACC_MASK
290 #define FTFx_FSEC_FSLACC_SHIFT FTFC_FSEC_FSLACC_SHIFT
291 #define FTFx_FSEC_FSLACC_WIDTH FTFC_FSEC_FSLACC_WIDTH
292 #define FTFx_FSEC_FSLACC(x) FTFC_FSEC_FSLACC(x)
293 #define FTFx_FSEC_MEEN_MASK FTFC_FSEC_MEEN_MASK
294 #define FTFx_FSEC_MEEN_SHIFT FTFC_FSEC_MEEN_SHIFT
295 #define FTFx_FSEC_MEEN_WIDTH FTFC_FSEC_MEEN_WIDTH
296 #define FTFx_FSEC_MEEN(x) FTFC_FSEC_MEEN(x)
297 #define FTFx_FSEC_KEYEN_MASK FTFC_FSEC_KEYEN_MASK
298 #define FTFx_FSEC_KEYEN_SHIFT FTFC_FSEC_KEYEN_SHIFT
299 #define FTFx_FSEC_KEYEN_WIDTH FTFC_FSEC_KEYEN_WIDTH
300 #define FTFx_FSEC_KEYEN(x) FTFC_FSEC_KEYEN(x)
301 /* FOPT Bit Fields */
302 #define FTFx_FOPT_OPT_MASK FTFC_FOPT_OPT_MASK
303 #define FTFx_FOPT_OPT_SHIFT FTFC_FOPT_OPT_SHIFT
304 #define FTFx_FOPT_OPT_WIDTH FTFC_FOPT_OPT_WIDTH
305 #define FTFx_FOPT_OPT(x) FTFC_FOPT_OPT(x)
306 /* FCCOB Bit Fields */
307 #define FTFx_FCCOB_CCOBn_MASK FTFC_FCCOB_CCOBn_MASK
308 #define FTFx_FCCOB_CCOBn_SHIFT FTFC_FCCOB_CCOBn_SHIFT
309 #define FTFx_FCCOB_CCOBn_WIDTH FTFC_FCCOB_CCOBn_WIDTH
310 #define FTFx_FCCOB_CCOBn(x) FTFC_FCCOB_CCOBn(x)
311 /* FPROT Bit Fields */
312 #define FTFx_FPROT_PROT_MASK FTFC_FPROT_PROT_MASK
313 #define FTFx_FPROT_PROT_SHIFT FTFC_FPROT_PROT_SHIFT
314 #define FTFx_FPROT_PROT_WIDTH FTFC_FPROT_PROT_WIDTH
315 #define FTFx_FPROT_PROT(x) FTFC_FPROT_PROT(x)
316 /* FEPROT Bit Fields */
317 #define FTFx_FEPROT_EPROT_MASK FTFC_FEPROT_EPROT_MASK
318 #define FTFx_FEPROT_EPROT_SHIFT FTFC_FEPROT_EPROT_SHIFT
319 #define FTFx_FEPROT_EPROT_WIDTH FTFC_FEPROT_EPROT_WIDTH
320 #define FTFx_FEPROT_EPROT(x) FTFC_FEPROT_EPROT(x)
321 /* FDPROT Bit Fields */
322 #define FTFx_FDPROT_DPROT_MASK FTFC_FDPROT_DPROT_MASK
323 #define FTFx_FDPROT_DPROT_SHIFT FTFC_FDPROT_DPROT_SHIFT
324 #define FTFx_FDPROT_DPROT_WIDTH FTFC_FDPROT_DPROT_WIDTH
325 #define FTFx_FDPROT_DPROT(x) FTFC_FDPROT_DPROT(x)
326 /* FCSESTAT Bit Fields */
327 #define FTFx_FCSESTAT_IDB_MASK FTFC_FCSESTAT_IDB_MASK
328 #define FTFx_FCSESTAT_IDB_SHIFT FTFC_FCSESTAT_IDB_SHIFT
329 #define FTFx_FCSESTAT_IDB_WIDTH FTFC_FCSESTAT_IDB_WIDTH
330 #define FTFx_FCSESTAT_IDB(x) FTFC_FCSESTAT_IDB(x)
331 #define FTFx_FCSESTAT_EDB_MASK FTFC_FCSESTAT_EDB_MASK
332 #define FTFx_FCSESTAT_EDB_SHIFT FTFC_FCSESTAT_EDB_SHIFT
333 #define FTFx_FCSESTAT_EDB_WIDTH FTFC_FCSESTAT_EDB_WIDTH
334 #define FTFx_FCSESTAT_EDB(x) FTFC_FCSESTAT_EDB(x)
335 #define FTFx_FCSESTAT_RIN_MASK FTFC_FCSESTAT_RIN_MASK
336 #define FTFx_FCSESTAT_RIN_SHIFT FTFC_FCSESTAT_RIN_SHIFT
337 #define FTFx_FCSESTAT_RIN_WIDTH FTFC_FCSESTAT_RIN_WIDTH
338 #define FTFx_FCSESTAT_RIN(x) FTFC_FCSESTAT_RIN(x)
339 #define FTFx_FCSESTAT_BOK_MASK FTFC_FCSESTAT_BOK_MASK
340 #define FTFx_FCSESTAT_BOK_SHIFT FTFC_FCSESTAT_BOK_SHIFT
341 #define FTFx_FCSESTAT_BOK_WIDTH FTFC_FCSESTAT_BOK_WIDTH
342 #define FTFx_FCSESTAT_BOK(x) FTFC_FCSESTAT_BOK(x)
343 #define FTFx_FCSESTAT_BFN_MASK FTFC_FCSESTAT_BFN_MASK
344 #define FTFx_FCSESTAT_BFN_SHIFT FTFC_FCSESTAT_BFN_SHIFT
345 #define FTFx_FCSESTAT_BFN_WIDTH FTFC_FCSESTAT_BFN_WIDTH
346 #define FTFx_FCSESTAT_BFN(x) FTFC_FCSESTAT_BFN(x)
347 #define FTFx_FCSESTAT_BIN_MASK FTFC_FCSESTAT_BIN_MASK
348 #define FTFx_FCSESTAT_BIN_SHIFT FTFC_FCSESTAT_BIN_SHIFT
349 #define FTFx_FCSESTAT_BIN_WIDTH FTFC_FCSESTAT_BIN_WIDTH
350 #define FTFx_FCSESTAT_BIN(x) FTFC_FCSESTAT_BIN(x)
351 #define FTFx_FCSESTAT_SB_MASK FTFC_FCSESTAT_SB_MASK
352 #define FTFx_FCSESTAT_SB_SHIFT FTFC_FCSESTAT_SB_SHIFT
353 #define FTFx_FCSESTAT_SB_WIDTH FTFC_FCSESTAT_SB_WIDTH
354 #define FTFx_FCSESTAT_SB(x) FTFC_FCSESTAT_SB(x)
355 #define FTFx_FCSESTAT_BSY_MASK FTFC_FCSESTAT_BSY_MASK
356 #define FTFx_FCSESTAT_BSY_SHIFT FTFC_FCSESTAT_BSY_SHIFT
357 #define FTFx_FCSESTAT_BSY_WIDTH FTFC_FCSESTAT_BSY_WIDTH
358 #define FTFx_FCSESTAT_BSY(x) FTFC_FCSESTAT_BSY(x)
359 #if FEATURE_FLS_HAS_DETECT_ECC_ERROR
360 /* FERSTAT Bit Fields */
361 #define FTFx_FERSTAT_DFDIF_MASK FTFC_FERSTAT_DFDIF_MASK
362 #define FTFx_FERSTAT_DFDIF_SHIFT FTFC_FERSTAT_DFDIF_SHIFT
363 #define FTFxFERSTAT_DFDIF_WIDTH FTFC_FERSTAT_DFDIF_WIDTH
364 #define FTFx_FERSTAT_DFDIF(x) FTFC_FERSTAT_DFDIF(x)
365 /* FERCNFG Bit Fields */
366 #define FTFx_FERCNFG_DFDIE_MASK FTFC_FERCNFG_DFDIE_MASK
367 #define FTFx_FERCNFG_DFDIE_SHIFT FTFC_FERCNFG_DFDIE_SHIFT
368 #define FTFx_FERCNFG_DFDIE_WIDTH FTFC_FERCNFG_DFDIE_WIDTH
369 #define FTFx_FERCNFG_DFDIE(x) FTFC_FERCNFG_DFDIE(x)
370 #define FTFx_FERCNFG_FDFD_MASK FTFC_FERCNFG_FDFD_MASK
371 #define FTFx_FERCNFG_FDFD_SHIFT FTFC_FERCNFG_FDFD_SHIFT
372 #define FTFx_FERCNFG_FDFD_WIDTH FTFC_FERCNFG_FDFD_WIDTH
373 #define FTFx_FERCNFG_FDFD(x) FTFC_FERCNFG_FDFD(x)
374 #endif
375 
376 #else /* ifndef FTFE */
377 #endif /* ifdef FTFE */
378 
379 
380 #define CLEAR_FTFx_FSTAT_ERROR_BITS FTFx_FSTAT = (uint8_t)(FTFx_FSTAT_FPVIOL_MASK | FTFx_FSTAT_ACCERR_MASK | FTFx_FSTAT_RDCOLERR_MASK)
381 
382 /* Word size 2 bytes */
383 #define FTFx_WORD_SIZE 0x0002U
384 /* Long word size 4 bytes */
385 #define FTFx_LONGWORD_SIZE 0x0004U
386 /* Phrase size 8 bytes */
387 #define FTFx_PHRASE_SIZE 0x0008U
388 /* Double-phrase size 16 bytes */
389 #define FTFx_DPHRASE_SIZE 0x0010U
390 
391 /* FCCOB offset address to store resource code */
392 #if (FEATURE_FLS_PF_BLOCK_WRITE_UNIT_SIZE == FTFx_PHRASE_SIZE)
393 #define FTFx_RSRC_CODE_REG FTFx_FCCOB4
394 #else
395 #define FTFx_RSRC_CODE_REG FTFx_FCCOB8
396 #endif
397 
398 /*******************************************************************************
399 * Flash hardware algorithm operation commands
400 *******************************************************************************/
401 #define FTFx_VERIFY_BLOCK 0x00U
402 #define FTFx_VERIFY_SECTION 0x01U
403 #define FTFx_PROGRAM_CHECK 0x02U
404 #define FTFx_READ_RESOURCE 0x03U
405 #define FTFx_PROGRAM_LONGWORD 0x06U
406 #define FTFx_PROGRAM_PHRASE 0x07U
407 #define FTFx_ERASE_BLOCK 0x08U
408 #define FTFx_ERASE_SECTOR 0x09U
409 #define FTFx_PROGRAM_SECTION 0x0BU
410 #define FTFx_VERIFY_ALL_BLOCK 0x40U
411 #define FTFx_READ_ONCE 0x41U
412 #define FTFx_PROGRAM_ONCE 0x43U
413 #define FTFx_ERASE_ALL_BLOCK 0x44U
414 #define FTFx_SECURITY_BY_PASS 0x45U
415 #define FTFx_PFLASH_SWAP 0x46U
416 #define FTFx_ERASE_ALL_BLOCK_UNSECURE 0x49U
417 #define FTFx_PROGRAM_PARTITION 0x80U
418 #define FTFx_SET_EERAM 0x81U
419 
420 
426 #define FTFx_SWAP_SET_INDICATOR_ADDR 0x01U
427 
428 #define FTFx_SWAP_SET_IN_PREPARE 0x02U
429 
430 #define FTFx_SWAP_SET_IN_COMPLETE 0x04U
431 
432 #define FTFx_SWAP_REPORT_STATUS 0x08U
433 
440 #define FTFx_SWAP_UNINIT 0x00U
441 
442 #define FTFx_SWAP_READY 0x01U
443 
444 #define FTFx_SWAP_UPDATE 0x02U
445 
446 #define FTFx_SWAP_UPDATE_ERASED 0x03U
447 
448 #define FTFx_SWAP_COMPLETE 0x04U
449 
452 #define RESUME_WAIT_CNT 0x20U
453 
454 #define SUSPEND_WAIT_CNT 0x40U
455 
456 #if (FEATURE_FLS_IS_FTFE == 1U)
457 #define DFLASH_IFR_READRESOURCE_ADDRESS 0x8003F8U
458 #else /* FEATURE_FLASH_IS_FTFL == 1 or FEATURE_FLASH_IS_FTFA == 1 */
459 #define DFLASH_IFR_READRESOURCE_ADDRESS 0x8000FCU
460 #endif
461 
462 #define GET_BIT_0_7(value) ((uint8_t)(((uint32_t)(value)) & 0xFFU))
463 #define GET_BIT_8_15(value) ((uint8_t)((((uint32_t)(value)) >> 8) & 0xFFU))
464 #define GET_BIT_16_23(value) ((uint8_t)((((uint32_t)(value)) >> 16) & 0xFFU))
465 #define GET_BIT_24_31(value) ((uint8_t)(((uint32_t)(value)) >> 24))
466 
467 /* Flash security status */
468 #define FLASH_SECURITY_STATE_KEYEN 0x80U
469 #define FLASH_SECURITY_STATE_UNSECURED 0x02U
470 
471 /* CSEc user key size */
472 #define CSE_KEY_SIZE_CODE_MAX 0x03U
473 
484 typedef enum
485 {
486  EEE_ENABLE = 0x00U,
487  EEE_QUICK_WRITE = 0x55U,
490  EEE_DISABLE = 0xFFU,
492 
498 #define FLASH_NOT_SECURE 0x01U
499 
500 #define FLASH_SECURE_BACKDOOR_ENABLED 0x02U
501 
502 #define FLASH_SECURE_BACKDOOR_DISABLED 0x04U
503 
505 /*******************************************************************************
506 * CallBack function period
507 *******************************************************************************/
508 #ifndef FLASH_CALLBACK_CS
509 
515 #define FLASH_CALLBACK_CS 0x0AU
516 #endif
517 
518 /*******************************************************************************
519 * Null Callback function definition
520 *******************************************************************************/
526 #define NULL_CALLBACK ((flash_callback_t)0xFFFFFFFFU)
527 
528 #if FEATURE_FLS_HAS_PF_BLOCK_SWAP
529 
530 #define NULL_SWAP_CALLBACK ((flash_swap_callback_t)0xFFFFFFFFU)
531 #endif
532 
534 /*******************************************************************************
535 * Callback function prototype
536 *******************************************************************************/
543 typedef void (* flash_callback_t)(void);
544 #if FEATURE_FLS_HAS_PF_BLOCK_SWAP
545 
546 typedef bool (* flash_swap_callback_t)(uint8_t function);
547 #endif
548 
549 /*******************************************************************************
550 * Flash SSD Configuration Structure
551 *******************************************************************************/
557 typedef struct
558 {
559  uint32_t PFlashBase;
560  uint32_t PFlashSize;
561  uint32_t DFlashBase;
563  uint32_t EERAMBase;
568 
581 typedef struct
582 {
583  uint32_t PFlashBase;
584  uint32_t PFlashSize;
585  uint32_t DFlashBase;
587  uint32_t DFlashSize;
590  uint32_t EERAMBase;
592  uint32_t EEESize;
597 
603 typedef struct
604 {
605  uint8_t brownOutCode;
607  uint16_t sectorEraseCount;
609 
610 /*******************************************************************************
611 * Function Prototypes for Flash SSD
612 *******************************************************************************/
618 #if defined(__cplusplus)
619 extern "C" {
620 #endif
621 
622 
634 status_t FLASH_DRV_Init(const flash_user_config_t * const pUserConf,
635  flash_ssd_config_t * const pSSDConfig);
636 
654 void FLASH_DRV_GetPFlashProtection(uint32_t * protectStatus);
655 
677 status_t FLASH_DRV_SetPFlashProtection(uint32_t protectStatus);
678 
692 void FLASH_DRV_GetSecurityState(uint8_t * securityState);
693 
709  const uint8_t * keyBuffer);
710 
725 
744  uint8_t marginLevel);
745 
774  uint32_t dest,
775  uint32_t size);
776 
803  uint32_t dest,
804  uint16_t number,
805  uint8_t marginLevel);
806 
814 void FLASH_DRV_EraseSuspend(void);
815 
823 void FLASH_DRV_EraseResume(void);
824 
841  uint8_t recordIndex,
842  uint8_t * pDataArray);
843 
862  uint8_t recordIndex,
863  const uint8_t * pDataArray);
864 
865 #if FEATURE_FLS_HAS_READ_RESOURCE_CMD
866 
884 status_t FLASH_DRV_ReadResource(const flash_ssd_config_t * pSSDConfig,
885  uint32_t dest,
886  uint8_t * pDataArray,
887  uint8_t resourceSelectCode);
888 #endif
889 
911  uint32_t dest,
912  uint32_t size,
913  const uint8_t * pData);
914 
939  uint32_t dest,
940  uint32_t size,
941  const uint8_t * pExpectedData,
942  uint32_t * pFailAddr,
943  uint8_t marginLevel);
944 
966  uint32_t dest,
967  uint32_t size,
968  uint32_t * pSum);
969 
970 #if FEATURE_FLS_HAS_PROGRAM_SECTION_CMD
971 
1002  uint32_t dest,
1003  uint16_t number);
1004 #endif
1005 
1006 #if FEATURE_FLS_HAS_ERASE_BLOCK_CMD
1007 
1027  uint32_t dest);
1028 #endif
1029 
1030 #if FEATURE_FLS_HAS_READ_1S_BLOCK_CMD
1031 
1051  uint32_t dest,
1052  uint8_t marginLevel);
1053 #endif
1054 
1055 #if FEATURE_FLS_HAS_FLEX_NVM
1056 
1078 status_t FLASH_DRV_GetEERAMProtection(uint8_t * protectStatus);
1079 
1104 status_t FLASH_DRV_SetEERAMProtection(uint8_t protectStatus);
1105 
1138  flash_flexRam_function_control_code_t flexRamFuncCode,
1139  uint16_t byteOfQuickWrite,
1140  flash_eeprom_status_t * const pEEPROMStatus);
1141 
1170  uint32_t dest,
1171  uint32_t size,
1172  const uint8_t * pData);
1173 
1208  uint8_t uEEEDataSizeCode,
1209  uint8_t uDEPartitionCode,
1210  uint8_t uCSEcKeySize,
1211  bool uSFE,
1212  bool flexRamEnableLoadEEEData);
1213 
1235  uint8_t * protectStatus);
1236 
1259  uint8_t protectStatus);
1260 #endif /* End of FEATURE_FLS_HAS_FLEX_NVM */
1261 
1262 #if FEATURE_FLS_HAS_PF_BLOCK_SWAP
1263 
1322 status_t FLASH_DRV_PFlashSwap(const flash_ssd_config_t * pSSDConfig,
1323  uint32_t addr,
1324  flash_swap_callback_t pSwapCallback);
1325 
1355 status_t FLASH_DRV_PFlashSwapCtl(const flash_ssd_config_t * pSSDConfig,
1356  uint32_t addr,
1357  uint8_t swapcmd,
1358  uint8_t * pCurrentSwapMode,
1359  uint8_t * pCurrentSwapBlockStatus,
1360  uint8_t * pNextSwapBlockStatus);
1361 
1362 #endif /* End of FEATURE_FLS_HAS_PF_BLOCK_SWAP */
1363 
1364 #if FEATURE_FLS_HAS_ERASE_ALL_BLOCKS_UNSECURE_CMD
1365 
1378 #endif /* End of FEATURE_FLS_HAS_ERASE_ALL_BLOCKS_UNSECURE_CMD */
1379 
1390 
1396 
1406 static inline bool FLASH_DRV_GetCmdCompleteFlag(void)
1407 {
1408  return (((FTFx_FSTAT & FTFx_FSTAT_CCIF_MASK) >> FTFx_FSTAT_CCIF_SHIFT) != 0U);
1409 }
1410 
1421 
1427 
1437 static inline bool FLASH_DRV_GetReadColisionFlag(void)
1438 {
1440 }
1441 
1447 static inline void FLASH_DRV_ClearReadColisionFlag(void)
1448 {
1450 }
1451 
1452 #if FEATURE_FLS_HAS_DETECT_ECC_ERROR
1453 
1464 
1470 
1481 static inline bool FLASH_DRV_GetDoubleBitFaultFlag(void)
1482 {
1484 }
1485 
1491 static inline void FLASH_DRV_ClearDoubleBitFaultFlag(void)
1492 {
1494 }
1495 
1506 static inline void FLASH_DRV_ForceDoubleBitFaultDetectCmd(bool isEnable)
1507 {
1508  if (true == isEnable)
1509  {
1511  }
1512  else
1513  {
1514  FTFx_FERCNFG &= (uint8_t)(~FTFx_FERCNFG_FDFD_MASK);
1515  }
1516 }
1517 #endif /* End of FEATURE_FLS_HAS_DETECT_ECC_ERROR */
1518 
1519 #if defined(__cplusplus)
1520 }
1521 #endif
1522  /* End of Flash driver APIs*/ /* End of addtogroup flash_driver */
1525 
1526 #endif /* FLASH_DRIVER_H */
status_t FLASH_DRV_DEFlashPartition(const flash_ssd_config_t *pSSDConfig, uint8_t uEEEDataSizeCode, uint8_t uDEPartitionCode, uint8_t uCSEcKeySize, bool uSFE, bool flexRamEnableLoadEEEData)
Flash D/E-Flash Partition.
status_t FLASH_DRV_GetDFlashProtection(const flash_ssd_config_t *pSSDConfig, uint8_t *protectStatus)
D-Flash get protection.
status_t FLASH_DRV_VerifyAllBlock(const flash_ssd_config_t *pSSDConfig, uint8_t marginLevel)
Flash verify all blocks.
#define FTFx_FERSTAT_DFDIF_MASK
Definition: flash_driver.h:361
void FLASH_DRV_EraseResume(void)
Flash erase resume.
status_t FLASH_DRV_SetEERAMProtection(uint8_t protectStatus)
EERAM set protection.
flash_callback_t CallBack
Definition: flash_driver.h:565
status_t FLASH_DRV_GetEERAMProtection(uint8_t *protectStatus)
EERAM get protection.
static void FLASH_DRV_ClearDoubleBitFaultFlag(void)
Clear the double bit fault detect flag.
void FLASH_DRV_EraseSuspend(void)
Flash erase suspend.
status_t FLASH_DRV_EEEWrite(const flash_ssd_config_t *pSSDConfig, uint32_t dest, uint32_t size, const uint8_t *pData)
EEPROM Emulator Write.
status_t FLASH_DRV_EraseSector(const flash_ssd_config_t *pSSDConfig, uint32_t dest, uint32_t size)
Flash erase sector.
void FLASH_DRV_DisableDoubleBitFaultInterupt(void)
Disable the double bit fault detect interrupt.
#define FTFx_FSTAT_RDCOLERR_MASK
Definition: flash_driver.h:251
status_t FLASH_DRV_Init(const flash_user_config_t *const pUserConf, flash_ssd_config_t *const pSSDConfig)
Initializes Flash.
void(* flash_callback_t)(void)
Call back function pointer data type.
Definition: flash_driver.h:543
#define FTFx_FERSTAT
Definition: flash_driver.h:235
status_t FLASH_DRV_Program(const flash_ssd_config_t *pSSDConfig, uint32_t dest, uint32_t size, const uint8_t *pData)
Flash program.
status_t FLASH_DRV_EnableReadColisionInterupt(void)
Enable the read collision error interrupt.
status_t FLASH_DRV_VerifyBlock(const flash_ssd_config_t *pSSDConfig, uint32_t dest, uint8_t marginLevel)
Flash verify block.
flash_flexRam_function_control_code_t
FlexRAM Function control Code.
Definition: flash_driver.h:484
#define FTFx_FSTAT
Definition: flash_driver.h:211
static void FLASH_DRV_ClearReadColisionFlag(void)
Clear the read collision error flag.
void FLASH_DRV_GetPFlashProtection(uint32_t *protectStatus)
P-Flash get protection.
status_t FLASH_DRV_ProgramCheck(const flash_ssd_config_t *pSSDConfig, uint32_t dest, uint32_t size, const uint8_t *pExpectedData, uint32_t *pFailAddr, uint8_t marginLevel)
Flash program check.
status_t FLASH_DRV_SetFlexRamFunction(const flash_ssd_config_t *pSSDConfig, flash_flexRam_function_control_code_t flexRamFuncCode, uint16_t byteOfQuickWrite, flash_eeprom_status_t *const pEEPROMStatus)
Set FlexRAM function.
status_t FLASH_DRV_CheckSum(const flash_ssd_config_t *pSSDConfig, uint32_t dest, uint32_t size, uint32_t *pSum)
Calculates check sum.
status_t FLASH_DRV_SetDFlashProtection(const flash_ssd_config_t *pSSDConfig, uint8_t protectStatus)
D-Flash set protection.
status_t FLASH_DRV_EraseBlock(const flash_ssd_config_t *pSSDConfig, uint32_t dest)
Flash erase block.
static bool FLASH_DRV_GetCmdCompleteFlag(void)
Check the command complete flag has completed or not.
status_t
Status return codes. Common error codes will be a unified enumeration (C enum) that will contain all ...
Definition: status.h:44
status_t FLASH_DRV_ProgramSection(const flash_ssd_config_t *pSSDConfig, uint32_t dest, uint16_t number)
Flash program section.
#define FTFx_FERSTAT_DFDIF_SHIFT
Definition: flash_driver.h:362
EEPROM status structure.
Definition: flash_driver.h:603
#define FTFx_FSTAT_CCIF_MASK
Definition: flash_driver.h:255
status_t FLASH_DRV_EnableCmdCompleteInterupt(void)
Enable the command complete interrupt.
void FLASH_DRV_DisableCmdCompleteInterupt(void)
Disable the command complete interrupt.
uint16_t numOfRecordReqMaintain
Definition: flash_driver.h:606
status_t FLASH_DRV_SetPFlashProtection(uint32_t protectStatus)
P-Flash set protection.
#define FTFx_FERCNFG_FDFD_MASK
Definition: flash_driver.h:370
static void FLASH_DRV_ForceDoubleBitFaultDetectCmd(bool isEnable)
Force Double Bit Fault Detect.
status_t FLASH_DRV_VerifySection(const flash_ssd_config_t *pSSDConfig, uint32_t dest, uint16_t number, uint8_t marginLevel)
Flash verify section.
status_t FLASH_DRV_ReadOnce(const flash_ssd_config_t *pSSDConfig, uint8_t recordIndex, uint8_t *pDataArray)
Flash read once.
static bool FLASH_DRV_GetDoubleBitFaultFlag(void)
Check the double bit fault flag is detected during a valid flash read access.
#define FTFx_FERCNFG
Definition: flash_driver.h:236
Flash SSD Configuration Structure.
Definition: flash_driver.h:581
static bool FLASH_DRV_GetReadColisionFlag(void)
Check the read collision error flag is detected or not.
status_t FLASH_DRV_EraseAllBlock(const flash_ssd_config_t *pSSDConfig)
Flash erase all blocks.
#define FTFx_FSTAT_RDCOLERR_SHIFT
Definition: flash_driver.h:252
#define FTFx_FSTAT_CCIF_SHIFT
Definition: flash_driver.h:256
status_t FLASH_DRV_EnableDoubleBitFaultInterupt(void)
Enable the double bit fault detect interrupt.
void FLASH_DRV_DisableReadColisionInterupt(void)
Disable the read collision error interrupt.
status_t FLASH_DRV_EraseAllBlockUnsecure(const flash_ssd_config_t *pSSDConfig)
Flash erase all blocks unsecure.
Flash User Configuration Structure.
Definition: flash_driver.h:557
status_t FLASH_DRV_SecurityBypass(const flash_ssd_config_t *pSSDConfig, const uint8_t *keyBuffer)
Flash security bypass.
status_t FLASH_DRV_ProgramOnce(const flash_ssd_config_t *pSSDConfig, uint8_t recordIndex, const uint8_t *pDataArray)
Flash program once.
void FLASH_DRV_GetSecurityState(uint8_t *securityState)
Flash get security state.