1 #ifndef NRF53_ERRATAS_H
2 #define NRF53_ERRATAS_H
3
4 /*
5
6 Copyright (c) 2010 - 2024, Nordic Semiconductor ASA All rights reserved.
7
8 SPDX-License-Identifier: BSD-3-Clause
9
10 Redistribution and use in source and binary forms, with or without
11 modification, are permitted provided that the following conditions are met:
12
13 1. Redistributions of source code must retain the above copyright notice, this
14 list of conditions and the following disclaimer.
15
16 2. Redistributions in binary form must reproduce the above copyright
17 notice, this list of conditions and the following disclaimer in the
18 documentation and/or other materials provided with the distribution.
19
20 3. Neither the name of Nordic Semiconductor ASA nor the names of its
21 contributors may be used to endorse or promote products derived from this
22 software without specific prior written permission.
23
24 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE
27 ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
28 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 POSSIBILITY OF SUCH DAMAGE.
35
36 */
37
38 #include <stdint.h>
39 #include <stdbool.h>
40 #include "compiler_abstraction.h"
41
42 static bool nrf53_errata_1(void) __UNUSED;
43 static bool nrf53_errata_2(void) __UNUSED;
44 static bool nrf53_errata_3(void) __UNUSED;
45 static bool nrf53_errata_4(void) __UNUSED;
46 static bool nrf53_errata_5(void) __UNUSED;
47 static bool nrf53_errata_6(void) __UNUSED;
48 static bool nrf53_errata_7(void) __UNUSED;
49 static bool nrf53_errata_8(void) __UNUSED;
50 static bool nrf53_errata_9(void) __UNUSED;
51 static bool nrf53_errata_10(void) __UNUSED;
52 static bool nrf53_errata_11(void) __UNUSED;
53 static bool nrf53_errata_12(void) __UNUSED;
54 static bool nrf53_errata_13(void) __UNUSED;
55 static bool nrf53_errata_14(void) __UNUSED;
56 static bool nrf53_errata_15(void) __UNUSED;
57 static bool nrf53_errata_16(void) __UNUSED;
58 static bool nrf53_errata_18(void) __UNUSED;
59 static bool nrf53_errata_19(void) __UNUSED;
60 static bool nrf53_errata_20(void) __UNUSED;
61 static bool nrf53_errata_21(void) __UNUSED;
62 static bool nrf53_errata_22(void) __UNUSED;
63 static bool nrf53_errata_23(void) __UNUSED;
64 static bool nrf53_errata_26(void) __UNUSED;
65 static bool nrf53_errata_27(void) __UNUSED;
66 static bool nrf53_errata_28(void) __UNUSED;
67 static bool nrf53_errata_29(void) __UNUSED;
68 static bool nrf53_errata_30(void) __UNUSED;
69 static bool nrf53_errata_31(void) __UNUSED;
70 static bool nrf53_errata_32(void) __UNUSED;
71 static bool nrf53_errata_33(void) __UNUSED;
72 static bool nrf53_errata_34(void) __UNUSED;
73 static bool nrf53_errata_36(void) __UNUSED;
74 static bool nrf53_errata_37(void) __UNUSED;
75 static bool nrf53_errata_42(void) __UNUSED;
76 static bool nrf53_errata_43(void) __UNUSED;
77 static bool nrf53_errata_44(void) __UNUSED;
78 static bool nrf53_errata_45(void) __UNUSED;
79 static bool nrf53_errata_46(void) __UNUSED;
80 static bool nrf53_errata_47(void) __UNUSED;
81 static bool nrf53_errata_49(void) __UNUSED;
82 static bool nrf53_errata_50(void) __UNUSED;
83 static bool nrf53_errata_51(void) __UNUSED;
84 static bool nrf53_errata_52(void) __UNUSED;
85 static bool nrf53_errata_53(void) __UNUSED;
86 static bool nrf53_errata_54(void) __UNUSED;
87 static bool nrf53_errata_55(void) __UNUSED;
88 static bool nrf53_errata_57(void) __UNUSED;
89 static bool nrf53_errata_58(void) __UNUSED;
90 static bool nrf53_errata_59(void) __UNUSED;
91 static bool nrf53_errata_62(void) __UNUSED;
92 static bool nrf53_errata_64(void) __UNUSED;
93 static bool nrf53_errata_65(void) __UNUSED;
94 static bool nrf53_errata_66(void) __UNUSED;
95 static bool nrf53_errata_67(void) __UNUSED;
96 static bool nrf53_errata_69(void) __UNUSED;
97 static bool nrf53_errata_70(void) __UNUSED;
98 static bool nrf53_errata_71(void) __UNUSED;
99 static bool nrf53_errata_72(void) __UNUSED;
100 static bool nrf53_errata_73(void) __UNUSED;
101 static bool nrf53_errata_74(void) __UNUSED;
102 static bool nrf53_errata_75(void) __UNUSED;
103 static bool nrf53_errata_76(void) __UNUSED;
104 static bool nrf53_errata_77(void) __UNUSED;
105 static bool nrf53_errata_79(void) __UNUSED;
106 static bool nrf53_errata_80(void) __UNUSED;
107 static bool nrf53_errata_81(void) __UNUSED;
108 static bool nrf53_errata_82(void) __UNUSED;
109 static bool nrf53_errata_83(void) __UNUSED;
110 static bool nrf53_errata_84(void) __UNUSED;
111 static bool nrf53_errata_85(void) __UNUSED;
112 static bool nrf53_errata_86(void) __UNUSED;
113 static bool nrf53_errata_87(void) __UNUSED;
114 static bool nrf53_errata_90(void) __UNUSED;
115 static bool nrf53_errata_91(void) __UNUSED;
116 static bool nrf53_errata_93(void) __UNUSED;
117 static bool nrf53_errata_95(void) __UNUSED;
118 static bool nrf53_errata_97(void) __UNUSED;
119 static bool nrf53_errata_99(void) __UNUSED;
120 static bool nrf53_errata_103(void) __UNUSED;
121 static bool nrf53_errata_105(void) __UNUSED;
122 static bool nrf53_errata_106(void) __UNUSED;
123 static bool nrf53_errata_107(void) __UNUSED;
124 static bool nrf53_errata_109(void) __UNUSED;
125 static bool nrf53_errata_110(void) __UNUSED;
126 static bool nrf53_errata_112(void) __UNUSED;
127 static bool nrf53_errata_113(void) __UNUSED;
128 static bool nrf53_errata_114(void) __UNUSED;
129 static bool nrf53_errata_115(void) __UNUSED;
130 static bool nrf53_errata_116(void) __UNUSED;
131 static bool nrf53_errata_117(void) __UNUSED;
132 static bool nrf53_errata_119(void) __UNUSED;
133 static bool nrf53_errata_121(void) __UNUSED;
134 static bool nrf53_errata_122(void) __UNUSED;
135 static bool nrf53_errata_133(void) __UNUSED;
136 static bool nrf53_errata_134(void) __UNUSED;
137 static bool nrf53_errata_135(void) __UNUSED;
138 static bool nrf53_errata_136(void) __UNUSED;
139 static bool nrf53_errata_137(void) __UNUSED;
140 static bool nrf53_errata_138(void) __UNUSED;
141 static bool nrf53_errata_140(void) __UNUSED;
142 static bool nrf53_errata_152(void) __UNUSED;
143 static bool nrf53_errata_153(void) __UNUSED;
144 static bool nrf53_errata_154(void) __UNUSED;
145 static bool nrf53_errata_155(void) __UNUSED;
146 static bool nrf53_errata_157(void) __UNUSED;
147 static bool nrf53_errata_158(void) __UNUSED;
148 static bool nrf53_errata_159(void) __UNUSED;
149 static bool nrf53_errata_160(void) __UNUSED;
150 static bool nrf53_errata_161(void) __UNUSED;
151 static bool nrf53_errata_162(void) __UNUSED;
152 static bool nrf53_errata_163(void) __UNUSED;
153 static bool nrf53_errata_165(void) __UNUSED;
154 static bool nrf53_errata_166(void) __UNUSED;
155 static bool nrf53_errata_167(void) __UNUSED;
156 static bool nrf53_errata_168(void) __UNUSED;
157 static bool nrf53_errata_169(void) __UNUSED;
158
159 /* ========= Errata 1 ========= */
160 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
161 #if defined(NRF_APPLICATION)
162 #define NRF53_ERRATA_1_PRESENT 1
163 #else
164 #define NRF53_ERRATA_1_PRESENT 0
165 #endif
166 #else
167 #define NRF53_ERRATA_1_PRESENT 0
168 #endif
169
170 #ifndef NRF53_ERRATA_1_ENABLE_WORKAROUND
171 #define NRF53_ERRATA_1_ENABLE_WORKAROUND NRF53_ERRATA_1_PRESENT
172 #endif
173
nrf53_errata_1(void)174 static bool nrf53_errata_1(void)
175 {
176 #ifndef NRF53_SERIES
177 return false;
178 #else
179 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
180 #if defined(NRF_APPLICATION)
181 #if defined(NRF_TRUSTZONE_NONSECURE)
182 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
183 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
184 #else
185 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
186 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
187 #endif
188 #endif
189 #endif
190 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
191 #if defined (NRF_APPLICATION)
192 if (var1 == 0x07)
193 {
194 switch(var2)
195 {
196 case 0x02ul:
197 return true;
198 case 0x03ul:
199 return false;
200 case 0x04ul:
201 return false;
202 case 0x05ul:
203 return false;
204 default:
205 return false;
206 }
207 }
208 #endif
209 #endif
210 return false;
211 #endif
212 }
213
214 /* ========= Errata 2 ========= */
215 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
216 #if defined(NRF_APPLICATION)
217 #define NRF53_ERRATA_2_PRESENT 1
218 #else
219 #define NRF53_ERRATA_2_PRESENT 0
220 #endif
221 #else
222 #define NRF53_ERRATA_2_PRESENT 0
223 #endif
224
225 #ifndef NRF53_ERRATA_2_ENABLE_WORKAROUND
226 #define NRF53_ERRATA_2_ENABLE_WORKAROUND NRF53_ERRATA_2_PRESENT
227 #endif
228
nrf53_errata_2(void)229 static bool nrf53_errata_2(void)
230 {
231 #ifndef NRF53_SERIES
232 return false;
233 #else
234 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
235 #if defined(NRF_APPLICATION)
236 #if defined(NRF_TRUSTZONE_NONSECURE)
237 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
238 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
239 #else
240 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
241 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
242 #endif
243 #endif
244 #endif
245 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
246 #if defined (NRF_APPLICATION)
247 if (var1 == 0x07)
248 {
249 switch(var2)
250 {
251 case 0x02ul:
252 return true;
253 case 0x03ul:
254 return false;
255 case 0x04ul:
256 return false;
257 case 0x05ul:
258 return false;
259 default:
260 return false;
261 }
262 }
263 #endif
264 #endif
265 return false;
266 #endif
267 }
268
269 /* ========= Errata 3 ========= */
270 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
271 #if defined(NRF_APPLICATION)
272 #define NRF53_ERRATA_3_PRESENT 1
273 #else
274 #define NRF53_ERRATA_3_PRESENT 0
275 #endif
276 #else
277 #define NRF53_ERRATA_3_PRESENT 0
278 #endif
279
280 #ifndef NRF53_ERRATA_3_ENABLE_WORKAROUND
281 #define NRF53_ERRATA_3_ENABLE_WORKAROUND NRF53_ERRATA_3_PRESENT
282 #endif
283
nrf53_errata_3(void)284 static bool nrf53_errata_3(void)
285 {
286 #ifndef NRF53_SERIES
287 return false;
288 #else
289 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
290 #if defined(NRF_APPLICATION)
291 #if defined(NRF_TRUSTZONE_NONSECURE)
292 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
293 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
294 #else
295 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
296 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
297 #endif
298 #endif
299 #endif
300 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
301 #if defined (NRF_APPLICATION)
302 if (var1 == 0x07)
303 {
304 switch(var2)
305 {
306 case 0x02ul:
307 return true;
308 case 0x03ul:
309 return false;
310 case 0x04ul:
311 return false;
312 case 0x05ul:
313 return false;
314 default:
315 return false;
316 }
317 }
318 #endif
319 #endif
320 return false;
321 #endif
322 }
323
324 /* ========= Errata 4 ========= */
325 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
326 #if defined(NRF_APPLICATION)
327 #define NRF53_ERRATA_4_PRESENT 1
328 #else
329 #define NRF53_ERRATA_4_PRESENT 0
330 #endif
331 #else
332 #define NRF53_ERRATA_4_PRESENT 0
333 #endif
334
335 #ifndef NRF53_ERRATA_4_ENABLE_WORKAROUND
336 #define NRF53_ERRATA_4_ENABLE_WORKAROUND NRF53_ERRATA_4_PRESENT
337 #endif
338
nrf53_errata_4(void)339 static bool nrf53_errata_4(void)
340 {
341 #ifndef NRF53_SERIES
342 return false;
343 #else
344 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
345 #if defined(NRF_APPLICATION)
346 #if defined(NRF_TRUSTZONE_NONSECURE)
347 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
348 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
349 #else
350 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
351 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
352 #endif
353 #endif
354 #endif
355 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
356 #if defined (NRF_APPLICATION)
357 if (var1 == 0x07)
358 {
359 switch(var2)
360 {
361 case 0x02ul:
362 return true;
363 case 0x03ul:
364 return false;
365 case 0x04ul:
366 return false;
367 case 0x05ul:
368 return false;
369 default:
370 return false;
371 }
372 }
373 #endif
374 #endif
375 return false;
376 #endif
377 }
378
379 /* ========= Errata 5 ========= */
380 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
381 #if defined(NRF_APPLICATION)
382 #define NRF53_ERRATA_5_PRESENT 1
383 #else
384 #define NRF53_ERRATA_5_PRESENT 0
385 #endif
386 #else
387 #define NRF53_ERRATA_5_PRESENT 0
388 #endif
389
390 #ifndef NRF53_ERRATA_5_ENABLE_WORKAROUND
391 #define NRF53_ERRATA_5_ENABLE_WORKAROUND NRF53_ERRATA_5_PRESENT
392 #endif
393
nrf53_errata_5(void)394 static bool nrf53_errata_5(void)
395 {
396 #ifndef NRF53_SERIES
397 return false;
398 #else
399 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
400 #if defined(NRF_APPLICATION)
401 #if defined(NRF_TRUSTZONE_NONSECURE)
402 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
403 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
404 #else
405 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
406 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
407 #endif
408 #endif
409 #endif
410 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
411 #if defined (NRF_APPLICATION)
412 if (var1 == 0x07)
413 {
414 switch(var2)
415 {
416 case 0x02ul:
417 return true;
418 case 0x03ul:
419 return false;
420 case 0x04ul:
421 return false;
422 case 0x05ul:
423 return false;
424 default:
425 return false;
426 }
427 }
428 #endif
429 #endif
430 return false;
431 #endif
432 }
433
434 /* ========= Errata 6 ========= */
435 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
436 #if defined(NRF_NETWORK)
437 #define NRF53_ERRATA_6_PRESENT 1
438 #else
439 #define NRF53_ERRATA_6_PRESENT 0
440 #endif
441 #else
442 #define NRF53_ERRATA_6_PRESENT 0
443 #endif
444
445 #ifndef NRF53_ERRATA_6_ENABLE_WORKAROUND
446 #define NRF53_ERRATA_6_ENABLE_WORKAROUND NRF53_ERRATA_6_PRESENT
447 #endif
448
nrf53_errata_6(void)449 static bool nrf53_errata_6(void)
450 {
451 #ifndef NRF53_SERIES
452 return false;
453 #else
454 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
455 #if defined(NRF_NETWORK)
456 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
457 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
458 #endif
459 #endif
460 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
461 #if defined (NRF_NETWORK)
462 if (var1 == 0x07)
463 {
464 switch(var2)
465 {
466 case 0x02ul:
467 return true;
468 case 0x03ul:
469 return true;
470 case 0x04ul:
471 return true;
472 case 0x05ul:
473 return true;
474 default:
475 return true;
476 }
477 }
478 #endif
479 #endif
480 return false;
481 #endif
482 }
483
484 /* ========= Errata 7 ========= */
485 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
486 #if defined(NRF_APPLICATION)
487 #define NRF53_ERRATA_7_PRESENT 1
488 #else
489 #define NRF53_ERRATA_7_PRESENT 0
490 #endif
491 #else
492 #define NRF53_ERRATA_7_PRESENT 0
493 #endif
494
495 #ifndef NRF53_ERRATA_7_ENABLE_WORKAROUND
496 #define NRF53_ERRATA_7_ENABLE_WORKAROUND NRF53_ERRATA_7_PRESENT
497 #endif
498
nrf53_errata_7(void)499 static bool nrf53_errata_7(void)
500 {
501 #ifndef NRF53_SERIES
502 return false;
503 #else
504 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
505 #if defined(NRF_APPLICATION)
506 #if defined(NRF_TRUSTZONE_NONSECURE)
507 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
508 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
509 #else
510 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
511 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
512 #endif
513 #endif
514 #endif
515 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
516 #if defined (NRF_APPLICATION)
517 if (var1 == 0x07)
518 {
519 switch(var2)
520 {
521 case 0x02ul:
522 return true;
523 case 0x03ul:
524 return false;
525 case 0x04ul:
526 return false;
527 case 0x05ul:
528 return false;
529 default:
530 return false;
531 }
532 }
533 #endif
534 #endif
535 return false;
536 #endif
537 }
538
539 /* ========= Errata 8 ========= */
540 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
541 #if defined(NRF_APPLICATION)
542 #define NRF53_ERRATA_8_PRESENT 1
543 #else
544 #define NRF53_ERRATA_8_PRESENT 0
545 #endif
546 #else
547 #define NRF53_ERRATA_8_PRESENT 0
548 #endif
549
550 #ifndef NRF53_ERRATA_8_ENABLE_WORKAROUND
551 #define NRF53_ERRATA_8_ENABLE_WORKAROUND NRF53_ERRATA_8_PRESENT
552 #endif
553
nrf53_errata_8(void)554 static bool nrf53_errata_8(void)
555 {
556 #ifndef NRF53_SERIES
557 return false;
558 #else
559 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
560 #if defined(NRF_APPLICATION)
561 #if defined(NRF_TRUSTZONE_NONSECURE)
562 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
563 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
564 #else
565 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
566 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
567 #endif
568 #endif
569 #endif
570 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
571 #if defined (NRF_APPLICATION)
572 if (var1 == 0x07)
573 {
574 switch(var2)
575 {
576 case 0x02ul:
577 return true;
578 case 0x03ul:
579 return false;
580 case 0x04ul:
581 return false;
582 case 0x05ul:
583 return false;
584 default:
585 return false;
586 }
587 }
588 #endif
589 #endif
590 return false;
591 #endif
592 }
593
594 /* ========= Errata 9 ========= */
595 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
596 #if defined(NRF_APPLICATION)
597 #define NRF53_ERRATA_9_PRESENT 1
598 #else
599 #define NRF53_ERRATA_9_PRESENT 0
600 #endif
601 #else
602 #define NRF53_ERRATA_9_PRESENT 0
603 #endif
604
605 #ifndef NRF53_ERRATA_9_ENABLE_WORKAROUND
606 #define NRF53_ERRATA_9_ENABLE_WORKAROUND NRF53_ERRATA_9_PRESENT
607 #endif
608
nrf53_errata_9(void)609 static bool nrf53_errata_9(void)
610 {
611 #ifndef NRF53_SERIES
612 return false;
613 #else
614 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
615 #if defined(NRF_APPLICATION)
616 #if defined(NRF_TRUSTZONE_NONSECURE)
617 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
618 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
619 #else
620 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
621 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
622 #endif
623 #endif
624 #endif
625 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
626 #if defined (NRF_APPLICATION)
627 if (var1 == 0x07)
628 {
629 switch(var2)
630 {
631 case 0x02ul:
632 return true;
633 case 0x03ul:
634 return false;
635 case 0x04ul:
636 return false;
637 case 0x05ul:
638 return false;
639 default:
640 return false;
641 }
642 }
643 #endif
644 #endif
645 return false;
646 #endif
647 }
648
649 /* ========= Errata 10 ========= */
650 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
651 #if defined(NRF_NETWORK)
652 #define NRF53_ERRATA_10_PRESENT 1
653 #else
654 #define NRF53_ERRATA_10_PRESENT 0
655 #endif
656 #else
657 #define NRF53_ERRATA_10_PRESENT 0
658 #endif
659
660 #ifndef NRF53_ERRATA_10_ENABLE_WORKAROUND
661 #define NRF53_ERRATA_10_ENABLE_WORKAROUND NRF53_ERRATA_10_PRESENT
662 #endif
663
nrf53_errata_10(void)664 static bool nrf53_errata_10(void)
665 {
666 #ifndef NRF53_SERIES
667 return false;
668 #else
669 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
670 #if defined(NRF_NETWORK)
671 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
672 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
673 #endif
674 #endif
675 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
676 #if defined (NRF_NETWORK)
677 if (var1 == 0x07)
678 {
679 switch(var2)
680 {
681 case 0x02ul:
682 return true;
683 case 0x03ul:
684 return false;
685 case 0x04ul:
686 return false;
687 case 0x05ul:
688 return false;
689 default:
690 return false;
691 }
692 }
693 #endif
694 #endif
695 return false;
696 #endif
697 }
698
699 /* ========= Errata 11 ========= */
700 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
701 #if defined(NRF_NETWORK)
702 #define NRF53_ERRATA_11_PRESENT 1
703 #else
704 #define NRF53_ERRATA_11_PRESENT 0
705 #endif
706 #else
707 #define NRF53_ERRATA_11_PRESENT 0
708 #endif
709
710 #ifndef NRF53_ERRATA_11_ENABLE_WORKAROUND
711 #define NRF53_ERRATA_11_ENABLE_WORKAROUND NRF53_ERRATA_11_PRESENT
712 #endif
713
nrf53_errata_11(void)714 static bool nrf53_errata_11(void)
715 {
716 #ifndef NRF53_SERIES
717 return false;
718 #else
719 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
720 #if defined(NRF_NETWORK)
721 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
722 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
723 #endif
724 #endif
725 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
726 #if defined (NRF_NETWORK)
727 if (var1 == 0x07)
728 {
729 switch(var2)
730 {
731 case 0x02ul:
732 return true;
733 case 0x03ul:
734 return true;
735 case 0x04ul:
736 return false;
737 case 0x05ul:
738 return false;
739 default:
740 return false;
741 }
742 }
743 #endif
744 #endif
745 return false;
746 #endif
747 }
748
749 /* ========= Errata 12 ========= */
750 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
751 #if defined(NRF_APPLICATION)
752 #define NRF53_ERRATA_12_PRESENT 1
753 #else
754 #define NRF53_ERRATA_12_PRESENT 0
755 #endif
756 #else
757 #define NRF53_ERRATA_12_PRESENT 0
758 #endif
759
760 #ifndef NRF53_ERRATA_12_ENABLE_WORKAROUND
761 #define NRF53_ERRATA_12_ENABLE_WORKAROUND NRF53_ERRATA_12_PRESENT
762 #endif
763
nrf53_errata_12(void)764 static bool nrf53_errata_12(void)
765 {
766 #ifndef NRF53_SERIES
767 return false;
768 #else
769 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
770 #if defined(NRF_APPLICATION)
771 #if defined(NRF_TRUSTZONE_NONSECURE)
772 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
773 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
774 #else
775 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
776 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
777 #endif
778 #endif
779 #endif
780 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
781 #if defined (NRF_APPLICATION)
782 if (var1 == 0x07)
783 {
784 switch(var2)
785 {
786 case 0x02ul:
787 return true;
788 case 0x03ul:
789 return true;
790 case 0x04ul:
791 return false;
792 case 0x05ul:
793 return false;
794 default:
795 return false;
796 }
797 }
798 #endif
799 #endif
800 return false;
801 #endif
802 }
803
804 /* ========= Errata 13 ========= */
805 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
806 #if defined(NRF_APPLICATION) || \
807 defined(NRF_NETWORK)
808 #define NRF53_ERRATA_13_PRESENT 1
809 #else
810 #define NRF53_ERRATA_13_PRESENT 0
811 #endif
812 #else
813 #define NRF53_ERRATA_13_PRESENT 0
814 #endif
815
816 #ifndef NRF53_ERRATA_13_ENABLE_WORKAROUND
817 #define NRF53_ERRATA_13_ENABLE_WORKAROUND NRF53_ERRATA_13_PRESENT
818 #endif
819
nrf53_errata_13(void)820 static bool nrf53_errata_13(void)
821 {
822 #ifndef NRF53_SERIES
823 return false;
824 #else
825 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
826 #if defined(NRF_APPLICATION)
827 #if defined(NRF_TRUSTZONE_NONSECURE)
828 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
829 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
830 #else
831 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
832 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
833 #endif
834 #elif defined(NRF_NETWORK)
835 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
836 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
837 #endif
838 #endif
839 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
840 #if defined (NRF_APPLICATION)\
841 || defined (NRF_NETWORK)
842 if (var1 == 0x07)
843 {
844 switch(var2)
845 {
846 case 0x02ul:
847 return true;
848 case 0x03ul:
849 return false;
850 case 0x04ul:
851 return false;
852 case 0x05ul:
853 return false;
854 default:
855 return false;
856 }
857 }
858 #endif
859 #endif
860 return false;
861 #endif
862 }
863
864 /* ========= Errata 14 ========= */
865 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
866 #if defined(NRF_NETWORK)
867 #define NRF53_ERRATA_14_PRESENT 1
868 #else
869 #define NRF53_ERRATA_14_PRESENT 0
870 #endif
871 #else
872 #define NRF53_ERRATA_14_PRESENT 0
873 #endif
874
875 #ifndef NRF53_ERRATA_14_ENABLE_WORKAROUND
876 #define NRF53_ERRATA_14_ENABLE_WORKAROUND NRF53_ERRATA_14_PRESENT
877 #endif
878
nrf53_errata_14(void)879 static bool nrf53_errata_14(void)
880 {
881 #ifndef NRF53_SERIES
882 return false;
883 #else
884 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
885 #if defined(NRF_NETWORK)
886 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
887 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
888 #endif
889 #endif
890 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
891 #if defined (NRF_NETWORK)
892 if (var1 == 0x07)
893 {
894 switch(var2)
895 {
896 case 0x02ul:
897 return true;
898 case 0x03ul:
899 return false;
900 case 0x04ul:
901 return false;
902 case 0x05ul:
903 return false;
904 default:
905 return false;
906 }
907 }
908 #endif
909 #endif
910 return false;
911 #endif
912 }
913
914 /* ========= Errata 15 ========= */
915 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
916 #if defined(NRF_APPLICATION) || \
917 defined(NRF_NETWORK)
918 #define NRF53_ERRATA_15_PRESENT 1
919 #else
920 #define NRF53_ERRATA_15_PRESENT 0
921 #endif
922 #else
923 #define NRF53_ERRATA_15_PRESENT 0
924 #endif
925
926 #ifndef NRF53_ERRATA_15_ENABLE_WORKAROUND
927 #define NRF53_ERRATA_15_ENABLE_WORKAROUND NRF53_ERRATA_15_PRESENT
928 #endif
929
nrf53_errata_15(void)930 static bool nrf53_errata_15(void)
931 {
932 #ifndef NRF53_SERIES
933 return false;
934 #else
935 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
936 #if defined(NRF_APPLICATION)
937 #if defined(NRF_TRUSTZONE_NONSECURE)
938 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
939 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
940 #else
941 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
942 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
943 #endif
944 #elif defined(NRF_NETWORK)
945 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
946 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
947 #endif
948 #endif
949 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
950 #if defined (NRF_APPLICATION)\
951 || defined (NRF_NETWORK)
952 if (var1 == 0x07)
953 {
954 switch(var2)
955 {
956 case 0x02ul:
957 return true;
958 case 0x03ul:
959 return false;
960 case 0x04ul:
961 return false;
962 case 0x05ul:
963 return false;
964 default:
965 return false;
966 }
967 }
968 #endif
969 #endif
970 return false;
971 #endif
972 }
973
974 /* ========= Errata 16 ========= */
975 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
976 #if defined(NRF_NETWORK)
977 #define NRF53_ERRATA_16_PRESENT 1
978 #else
979 #define NRF53_ERRATA_16_PRESENT 0
980 #endif
981 #else
982 #define NRF53_ERRATA_16_PRESENT 0
983 #endif
984
985 #ifndef NRF53_ERRATA_16_ENABLE_WORKAROUND
986 #define NRF53_ERRATA_16_ENABLE_WORKAROUND NRF53_ERRATA_16_PRESENT
987 #endif
988
nrf53_errata_16(void)989 static bool nrf53_errata_16(void)
990 {
991 #ifndef NRF53_SERIES
992 return false;
993 #else
994 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
995 #if defined(NRF_NETWORK)
996 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
997 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
998 #endif
999 #endif
1000 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1001 #if defined (NRF_NETWORK)
1002 if (var1 == 0x07)
1003 {
1004 switch(var2)
1005 {
1006 case 0x02ul:
1007 return true;
1008 case 0x03ul:
1009 return false;
1010 case 0x04ul:
1011 return false;
1012 case 0x05ul:
1013 return false;
1014 default:
1015 return false;
1016 }
1017 }
1018 #endif
1019 #endif
1020 return false;
1021 #endif
1022 }
1023
1024 /* ========= Errata 18 ========= */
1025 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1026 #if defined(NRF_APPLICATION)
1027 #define NRF53_ERRATA_18_PRESENT 1
1028 #else
1029 #define NRF53_ERRATA_18_PRESENT 0
1030 #endif
1031 #else
1032 #define NRF53_ERRATA_18_PRESENT 0
1033 #endif
1034
1035 #ifndef NRF53_ERRATA_18_ENABLE_WORKAROUND
1036 #define NRF53_ERRATA_18_ENABLE_WORKAROUND NRF53_ERRATA_18_PRESENT
1037 #endif
1038
nrf53_errata_18(void)1039 static bool nrf53_errata_18(void)
1040 {
1041 #ifndef NRF53_SERIES
1042 return false;
1043 #else
1044 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1045 #if defined(NRF_APPLICATION)
1046 #if defined(NRF_TRUSTZONE_NONSECURE)
1047 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
1048 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
1049 #else
1050 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
1051 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
1052 #endif
1053 #endif
1054 #endif
1055 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1056 #if defined (NRF_APPLICATION)
1057 if (var1 == 0x07)
1058 {
1059 switch(var2)
1060 {
1061 case 0x02ul:
1062 return true;
1063 case 0x03ul:
1064 return false;
1065 case 0x04ul:
1066 return false;
1067 case 0x05ul:
1068 return false;
1069 default:
1070 return false;
1071 }
1072 }
1073 #endif
1074 #endif
1075 return false;
1076 #endif
1077 }
1078
1079 /* ========= Errata 19 ========= */
1080 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1081 #if defined(NRF_APPLICATION)
1082 #define NRF53_ERRATA_19_PRESENT 1
1083 #else
1084 #define NRF53_ERRATA_19_PRESENT 0
1085 #endif
1086 #else
1087 #define NRF53_ERRATA_19_PRESENT 0
1088 #endif
1089
1090 #ifndef NRF53_ERRATA_19_ENABLE_WORKAROUND
1091 #define NRF53_ERRATA_19_ENABLE_WORKAROUND NRF53_ERRATA_19_PRESENT
1092 #endif
1093
nrf53_errata_19(void)1094 static bool nrf53_errata_19(void)
1095 {
1096 #ifndef NRF53_SERIES
1097 return false;
1098 #else
1099 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1100 #if defined(NRF_APPLICATION)
1101 #if defined(NRF_TRUSTZONE_NONSECURE)
1102 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
1103 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
1104 #else
1105 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
1106 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
1107 #endif
1108 #endif
1109 #endif
1110 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1111 #if defined (NRF_APPLICATION)
1112 if (var1 == 0x07)
1113 {
1114 switch(var2)
1115 {
1116 case 0x02ul:
1117 return true;
1118 case 0x03ul:
1119 return false;
1120 case 0x04ul:
1121 return false;
1122 case 0x05ul:
1123 return false;
1124 default:
1125 return false;
1126 }
1127 }
1128 #endif
1129 #endif
1130 return false;
1131 #endif
1132 }
1133
1134 /* ========= Errata 20 ========= */
1135 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1136 #if defined(NRF_APPLICATION) || \
1137 defined(NRF_NETWORK)
1138 #define NRF53_ERRATA_20_PRESENT 1
1139 #else
1140 #define NRF53_ERRATA_20_PRESENT 0
1141 #endif
1142 #else
1143 #define NRF53_ERRATA_20_PRESENT 0
1144 #endif
1145
1146 #ifndef NRF53_ERRATA_20_ENABLE_WORKAROUND
1147 #define NRF53_ERRATA_20_ENABLE_WORKAROUND NRF53_ERRATA_20_PRESENT
1148 #endif
1149
nrf53_errata_20(void)1150 static bool nrf53_errata_20(void)
1151 {
1152 #ifndef NRF53_SERIES
1153 return false;
1154 #else
1155 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1156 #if defined(NRF_APPLICATION)
1157 #if defined(NRF_TRUSTZONE_NONSECURE)
1158 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
1159 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
1160 #else
1161 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
1162 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
1163 #endif
1164 #elif defined(NRF_NETWORK)
1165 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
1166 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
1167 #endif
1168 #endif
1169 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1170 #if defined (NRF_APPLICATION)\
1171 || defined (NRF_NETWORK)
1172 if (var1 == 0x07)
1173 {
1174 switch(var2)
1175 {
1176 case 0x02ul:
1177 return true;
1178 case 0x03ul:
1179 return false;
1180 case 0x04ul:
1181 return false;
1182 case 0x05ul:
1183 return false;
1184 default:
1185 return false;
1186 }
1187 }
1188 #endif
1189 #endif
1190 return false;
1191 #endif
1192 }
1193
1194 /* ========= Errata 21 ========= */
1195 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1196 #if defined(NRF_APPLICATION) || \
1197 defined(NRF_NETWORK)
1198 #define NRF53_ERRATA_21_PRESENT 1
1199 #else
1200 #define NRF53_ERRATA_21_PRESENT 0
1201 #endif
1202 #else
1203 #define NRF53_ERRATA_21_PRESENT 0
1204 #endif
1205
1206 #ifndef NRF53_ERRATA_21_ENABLE_WORKAROUND
1207 #define NRF53_ERRATA_21_ENABLE_WORKAROUND NRF53_ERRATA_21_PRESENT
1208 #endif
1209
nrf53_errata_21(void)1210 static bool nrf53_errata_21(void)
1211 {
1212 #ifndef NRF53_SERIES
1213 return false;
1214 #else
1215 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1216 #if defined(NRF_APPLICATION)
1217 #if defined(NRF_TRUSTZONE_NONSECURE)
1218 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
1219 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
1220 #else
1221 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
1222 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
1223 #endif
1224 #elif defined(NRF_NETWORK)
1225 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
1226 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
1227 #endif
1228 #endif
1229 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1230 #if defined (NRF_APPLICATION)\
1231 || defined (NRF_NETWORK)
1232 if (var1 == 0x07)
1233 {
1234 switch(var2)
1235 {
1236 case 0x02ul:
1237 return true;
1238 case 0x03ul:
1239 return true;
1240 case 0x04ul:
1241 return false;
1242 case 0x05ul:
1243 return false;
1244 default:
1245 return false;
1246 }
1247 }
1248 #endif
1249 #endif
1250 return false;
1251 #endif
1252 }
1253
1254 /* ========= Errata 22 ========= */
1255 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1256 #if defined(NRF_APPLICATION)
1257 #define NRF53_ERRATA_22_PRESENT 1
1258 #else
1259 #define NRF53_ERRATA_22_PRESENT 0
1260 #endif
1261 #else
1262 #define NRF53_ERRATA_22_PRESENT 0
1263 #endif
1264
1265 #ifndef NRF53_ERRATA_22_ENABLE_WORKAROUND
1266 #define NRF53_ERRATA_22_ENABLE_WORKAROUND NRF53_ERRATA_22_PRESENT
1267 #endif
1268
nrf53_errata_22(void)1269 static bool nrf53_errata_22(void)
1270 {
1271 #ifndef NRF53_SERIES
1272 return false;
1273 #else
1274 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1275 #if defined(NRF_APPLICATION)
1276 #if defined(NRF_TRUSTZONE_NONSECURE)
1277 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
1278 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
1279 #else
1280 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
1281 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
1282 #endif
1283 #endif
1284 #endif
1285 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1286 #if defined (NRF_APPLICATION)
1287 if (var1 == 0x07)
1288 {
1289 switch(var2)
1290 {
1291 case 0x02ul:
1292 return true;
1293 case 0x03ul:
1294 return false;
1295 case 0x04ul:
1296 return false;
1297 case 0x05ul:
1298 return false;
1299 default:
1300 return false;
1301 }
1302 }
1303 #endif
1304 #endif
1305 return false;
1306 #endif
1307 }
1308
1309 /* ========= Errata 23 ========= */
1310 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1311 #if defined(NRF_APPLICATION)
1312 #define NRF53_ERRATA_23_PRESENT 1
1313 #else
1314 #define NRF53_ERRATA_23_PRESENT 0
1315 #endif
1316 #else
1317 #define NRF53_ERRATA_23_PRESENT 0
1318 #endif
1319
1320 #ifndef NRF53_ERRATA_23_ENABLE_WORKAROUND
1321 #define NRF53_ERRATA_23_ENABLE_WORKAROUND NRF53_ERRATA_23_PRESENT
1322 #endif
1323
nrf53_errata_23(void)1324 static bool nrf53_errata_23(void)
1325 {
1326 #ifndef NRF53_SERIES
1327 return false;
1328 #else
1329 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1330 #if defined(NRF_APPLICATION)
1331 #if defined(NRF_TRUSTZONE_NONSECURE)
1332 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
1333 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
1334 #else
1335 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
1336 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
1337 #endif
1338 #endif
1339 #endif
1340 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1341 #if defined (NRF_APPLICATION)
1342 if (var1 == 0x07)
1343 {
1344 switch(var2)
1345 {
1346 case 0x02ul:
1347 return true;
1348 case 0x03ul:
1349 return false;
1350 case 0x04ul:
1351 return false;
1352 case 0x05ul:
1353 return false;
1354 default:
1355 return false;
1356 }
1357 }
1358 #endif
1359 #endif
1360 return false;
1361 #endif
1362 }
1363
1364 /* ========= Errata 26 ========= */
1365 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1366 #if defined(NRF_APPLICATION) || \
1367 defined(NRF_NETWORK)
1368 #define NRF53_ERRATA_26_PRESENT 1
1369 #else
1370 #define NRF53_ERRATA_26_PRESENT 0
1371 #endif
1372 #else
1373 #define NRF53_ERRATA_26_PRESENT 0
1374 #endif
1375
1376 #ifndef NRF53_ERRATA_26_ENABLE_WORKAROUND
1377 #define NRF53_ERRATA_26_ENABLE_WORKAROUND NRF53_ERRATA_26_PRESENT
1378 #endif
1379
nrf53_errata_26(void)1380 static bool nrf53_errata_26(void)
1381 {
1382 #ifndef NRF53_SERIES
1383 return false;
1384 #else
1385 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1386 #if defined(NRF_APPLICATION)
1387 #if defined(NRF_TRUSTZONE_NONSECURE)
1388 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
1389 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
1390 #else
1391 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
1392 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
1393 #endif
1394 #elif defined(NRF_NETWORK)
1395 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
1396 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
1397 #endif
1398 #endif
1399 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1400 #if defined (NRF_APPLICATION)\
1401 || defined (NRF_NETWORK)
1402 if (var1 == 0x07)
1403 {
1404 switch(var2)
1405 {
1406 case 0x02ul:
1407 return true;
1408 case 0x03ul:
1409 return false;
1410 case 0x04ul:
1411 return false;
1412 case 0x05ul:
1413 return false;
1414 default:
1415 return false;
1416 }
1417 }
1418 #endif
1419 #endif
1420 return false;
1421 #endif
1422 }
1423
1424 /* ========= Errata 27 ========= */
1425 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1426 #if defined(NRF_APPLICATION) || \
1427 defined(NRF_NETWORK)
1428 #define NRF53_ERRATA_27_PRESENT 1
1429 #else
1430 #define NRF53_ERRATA_27_PRESENT 0
1431 #endif
1432 #else
1433 #define NRF53_ERRATA_27_PRESENT 0
1434 #endif
1435
1436 #ifndef NRF53_ERRATA_27_ENABLE_WORKAROUND
1437 #define NRF53_ERRATA_27_ENABLE_WORKAROUND NRF53_ERRATA_27_PRESENT
1438 #endif
1439
nrf53_errata_27(void)1440 static bool nrf53_errata_27(void)
1441 {
1442 #ifndef NRF53_SERIES
1443 return false;
1444 #else
1445 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1446 #if defined(NRF_APPLICATION)
1447 #if defined(NRF_TRUSTZONE_NONSECURE)
1448 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
1449 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
1450 #else
1451 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
1452 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
1453 #endif
1454 #elif defined(NRF_NETWORK)
1455 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
1456 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
1457 #endif
1458 #endif
1459 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1460 #if defined (NRF_APPLICATION)\
1461 || defined (NRF_NETWORK)
1462 if (var1 == 0x07)
1463 {
1464 switch(var2)
1465 {
1466 case 0x02ul:
1467 return true;
1468 case 0x03ul:
1469 return false;
1470 case 0x04ul:
1471 return false;
1472 case 0x05ul:
1473 return false;
1474 default:
1475 return false;
1476 }
1477 }
1478 #endif
1479 #endif
1480 return false;
1481 #endif
1482 }
1483
1484 /* ========= Errata 28 ========= */
1485 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1486 #if defined(NRF_APPLICATION) || \
1487 defined(NRF_NETWORK)
1488 #define NRF53_ERRATA_28_PRESENT 1
1489 #else
1490 #define NRF53_ERRATA_28_PRESENT 0
1491 #endif
1492 #else
1493 #define NRF53_ERRATA_28_PRESENT 0
1494 #endif
1495
1496 #ifndef NRF53_ERRATA_28_ENABLE_WORKAROUND
1497 #define NRF53_ERRATA_28_ENABLE_WORKAROUND NRF53_ERRATA_28_PRESENT
1498 #endif
1499
nrf53_errata_28(void)1500 static bool nrf53_errata_28(void)
1501 {
1502 #ifndef NRF53_SERIES
1503 return false;
1504 #else
1505 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1506 #if defined(NRF_APPLICATION)
1507 #if defined(NRF_TRUSTZONE_NONSECURE)
1508 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
1509 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
1510 #else
1511 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
1512 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
1513 #endif
1514 #elif defined(NRF_NETWORK)
1515 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
1516 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
1517 #endif
1518 #endif
1519 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1520 #if defined (NRF_APPLICATION)\
1521 || defined (NRF_NETWORK)
1522 if (var1 == 0x07)
1523 {
1524 switch(var2)
1525 {
1526 case 0x02ul:
1527 return true;
1528 case 0x03ul:
1529 return false;
1530 case 0x04ul:
1531 return false;
1532 case 0x05ul:
1533 return false;
1534 default:
1535 return false;
1536 }
1537 }
1538 #endif
1539 #endif
1540 return false;
1541 #endif
1542 }
1543
1544 /* ========= Errata 29 ========= */
1545 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1546 #if defined(NRF_NETWORK)
1547 #define NRF53_ERRATA_29_PRESENT 1
1548 #else
1549 #define NRF53_ERRATA_29_PRESENT 0
1550 #endif
1551 #else
1552 #define NRF53_ERRATA_29_PRESENT 0
1553 #endif
1554
1555 #ifndef NRF53_ERRATA_29_ENABLE_WORKAROUND
1556 #define NRF53_ERRATA_29_ENABLE_WORKAROUND NRF53_ERRATA_29_PRESENT
1557 #endif
1558
nrf53_errata_29(void)1559 static bool nrf53_errata_29(void)
1560 {
1561 #ifndef NRF53_SERIES
1562 return false;
1563 #else
1564 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1565 #if defined(NRF_NETWORK)
1566 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
1567 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
1568 #endif
1569 #endif
1570 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1571 #if defined (NRF_NETWORK)
1572 if (var1 == 0x07)
1573 {
1574 switch(var2)
1575 {
1576 case 0x02ul:
1577 return true;
1578 case 0x03ul:
1579 return false;
1580 case 0x04ul:
1581 return false;
1582 case 0x05ul:
1583 return false;
1584 default:
1585 return false;
1586 }
1587 }
1588 #endif
1589 #endif
1590 return false;
1591 #endif
1592 }
1593
1594 /* ========= Errata 30 ========= */
1595 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1596 #if defined(NRF_NETWORK)
1597 #define NRF53_ERRATA_30_PRESENT 1
1598 #else
1599 #define NRF53_ERRATA_30_PRESENT 0
1600 #endif
1601 #else
1602 #define NRF53_ERRATA_30_PRESENT 0
1603 #endif
1604
1605 #ifndef NRF53_ERRATA_30_ENABLE_WORKAROUND
1606 #define NRF53_ERRATA_30_ENABLE_WORKAROUND NRF53_ERRATA_30_PRESENT
1607 #endif
1608
nrf53_errata_30(void)1609 static bool nrf53_errata_30(void)
1610 {
1611 #ifndef NRF53_SERIES
1612 return false;
1613 #else
1614 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1615 #if defined(NRF_NETWORK)
1616 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
1617 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
1618 #endif
1619 #endif
1620 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1621 #if defined (NRF_NETWORK)
1622 if (var1 == 0x07)
1623 {
1624 switch(var2)
1625 {
1626 case 0x02ul:
1627 return true;
1628 case 0x03ul:
1629 return false;
1630 case 0x04ul:
1631 return false;
1632 case 0x05ul:
1633 return false;
1634 default:
1635 return false;
1636 }
1637 }
1638 #endif
1639 #endif
1640 return false;
1641 #endif
1642 }
1643
1644 /* ========= Errata 31 ========= */
1645 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1646 #if defined(NRF_APPLICATION) || \
1647 defined(NRF_NETWORK)
1648 #define NRF53_ERRATA_31_PRESENT 1
1649 #else
1650 #define NRF53_ERRATA_31_PRESENT 0
1651 #endif
1652 #else
1653 #define NRF53_ERRATA_31_PRESENT 0
1654 #endif
1655
1656 #ifndef NRF53_ERRATA_31_ENABLE_WORKAROUND
1657 #define NRF53_ERRATA_31_ENABLE_WORKAROUND NRF53_ERRATA_31_PRESENT
1658 #endif
1659
nrf53_errata_31(void)1660 static bool nrf53_errata_31(void)
1661 {
1662 #ifndef NRF53_SERIES
1663 return false;
1664 #else
1665 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1666 #if defined(NRF_APPLICATION)
1667 #if defined(NRF_TRUSTZONE_NONSECURE)
1668 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
1669 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
1670 #else
1671 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
1672 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
1673 #endif
1674 #elif defined(NRF_NETWORK)
1675 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
1676 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
1677 #endif
1678 #endif
1679 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1680 #if defined (NRF_APPLICATION)\
1681 || defined (NRF_NETWORK)
1682 if (var1 == 0x07)
1683 {
1684 switch(var2)
1685 {
1686 case 0x02ul:
1687 return true;
1688 case 0x03ul:
1689 return false;
1690 case 0x04ul:
1691 return false;
1692 case 0x05ul:
1693 return false;
1694 default:
1695 return false;
1696 }
1697 }
1698 #endif
1699 #endif
1700 return false;
1701 #endif
1702 }
1703
1704 /* ========= Errata 32 ========= */
1705 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1706 #if defined(NRF_NETWORK)
1707 #define NRF53_ERRATA_32_PRESENT 1
1708 #else
1709 #define NRF53_ERRATA_32_PRESENT 0
1710 #endif
1711 #else
1712 #define NRF53_ERRATA_32_PRESENT 0
1713 #endif
1714
1715 #ifndef NRF53_ERRATA_32_ENABLE_WORKAROUND
1716 #define NRF53_ERRATA_32_ENABLE_WORKAROUND NRF53_ERRATA_32_PRESENT
1717 #endif
1718
nrf53_errata_32(void)1719 static bool nrf53_errata_32(void)
1720 {
1721 #ifndef NRF53_SERIES
1722 return false;
1723 #else
1724 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1725 #if defined(NRF_NETWORK)
1726 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
1727 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
1728 #endif
1729 #endif
1730 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1731 #if defined (NRF_NETWORK)
1732 if (var1 == 0x07)
1733 {
1734 switch(var2)
1735 {
1736 case 0x02ul:
1737 return true;
1738 case 0x03ul:
1739 return false;
1740 case 0x04ul:
1741 return false;
1742 case 0x05ul:
1743 return false;
1744 default:
1745 return false;
1746 }
1747 }
1748 #endif
1749 #endif
1750 return false;
1751 #endif
1752 }
1753
1754 /* ========= Errata 33 ========= */
1755 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1756 #if defined(NRF_APPLICATION)
1757 #define NRF53_ERRATA_33_PRESENT 1
1758 #else
1759 #define NRF53_ERRATA_33_PRESENT 0
1760 #endif
1761 #else
1762 #define NRF53_ERRATA_33_PRESENT 0
1763 #endif
1764
1765 #ifndef NRF53_ERRATA_33_ENABLE_WORKAROUND
1766 #define NRF53_ERRATA_33_ENABLE_WORKAROUND NRF53_ERRATA_33_PRESENT
1767 #endif
1768
nrf53_errata_33(void)1769 static bool nrf53_errata_33(void)
1770 {
1771 #ifndef NRF53_SERIES
1772 return false;
1773 #else
1774 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1775 #if defined(NRF_APPLICATION)
1776 #if defined(NRF_TRUSTZONE_NONSECURE)
1777 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
1778 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
1779 #else
1780 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
1781 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
1782 #endif
1783 #endif
1784 #endif
1785 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1786 #if defined (NRF_APPLICATION)
1787 if (var1 == 0x07)
1788 {
1789 switch(var2)
1790 {
1791 case 0x02ul:
1792 return true;
1793 case 0x03ul:
1794 return false;
1795 case 0x04ul:
1796 return false;
1797 case 0x05ul:
1798 return false;
1799 default:
1800 return false;
1801 }
1802 }
1803 #endif
1804 #endif
1805 return false;
1806 #endif
1807 }
1808
1809 /* ========= Errata 34 ========= */
1810 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1811 #if defined(NRF_NETWORK)
1812 #define NRF53_ERRATA_34_PRESENT 1
1813 #else
1814 #define NRF53_ERRATA_34_PRESENT 0
1815 #endif
1816 #else
1817 #define NRF53_ERRATA_34_PRESENT 0
1818 #endif
1819
1820 #ifndef NRF53_ERRATA_34_ENABLE_WORKAROUND
1821 #define NRF53_ERRATA_34_ENABLE_WORKAROUND NRF53_ERRATA_34_PRESENT
1822 #endif
1823
nrf53_errata_34(void)1824 static bool nrf53_errata_34(void)
1825 {
1826 #ifndef NRF53_SERIES
1827 return false;
1828 #else
1829 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1830 #if defined(NRF_NETWORK)
1831 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
1832 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
1833 #endif
1834 #endif
1835 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1836 #if defined (NRF_NETWORK)
1837 if (var1 == 0x07)
1838 {
1839 switch(var2)
1840 {
1841 case 0x02ul:
1842 return true;
1843 case 0x03ul:
1844 return false;
1845 case 0x04ul:
1846 return false;
1847 case 0x05ul:
1848 return false;
1849 default:
1850 return false;
1851 }
1852 }
1853 #endif
1854 #endif
1855 return false;
1856 #endif
1857 }
1858
1859 /* ========= Errata 36 ========= */
1860 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1861 #if defined(NRF_APPLICATION)
1862 #define NRF53_ERRATA_36_PRESENT 1
1863 #else
1864 #define NRF53_ERRATA_36_PRESENT 0
1865 #endif
1866 #else
1867 #define NRF53_ERRATA_36_PRESENT 0
1868 #endif
1869
1870 #ifndef NRF53_ERRATA_36_ENABLE_WORKAROUND
1871 #define NRF53_ERRATA_36_ENABLE_WORKAROUND NRF53_ERRATA_36_PRESENT
1872 #endif
1873
nrf53_errata_36(void)1874 static bool nrf53_errata_36(void)
1875 {
1876 #ifndef NRF53_SERIES
1877 return false;
1878 #else
1879 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1880 #if defined(NRF_APPLICATION)
1881 #if defined(NRF_TRUSTZONE_NONSECURE)
1882 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
1883 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
1884 #else
1885 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
1886 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
1887 #endif
1888 #endif
1889 #endif
1890 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1891 #if defined (NRF_APPLICATION)
1892 if (var1 == 0x07)
1893 {
1894 switch(var2)
1895 {
1896 case 0x02ul:
1897 return true;
1898 case 0x03ul:
1899 return false;
1900 case 0x04ul:
1901 return false;
1902 case 0x05ul:
1903 return false;
1904 default:
1905 return false;
1906 }
1907 }
1908 #endif
1909 #endif
1910 return false;
1911 #endif
1912 }
1913
1914 /* ========= Errata 37 ========= */
1915 #define NRF53_ERRATA_37_PRESENT 0
1916
1917 #ifndef NRF53_ERRATA_37_ENABLE_WORKAROUND
1918 #define NRF53_ERRATA_37_ENABLE_WORKAROUND NRF53_ERRATA_37_PRESENT
1919 #endif
1920
nrf53_errata_37(void)1921 static bool nrf53_errata_37(void)
1922 {
1923 #ifndef NRF53_SERIES
1924 return false;
1925 #else
1926 return false;
1927 #endif
1928 }
1929
1930 /* ========= Errata 42 ========= */
1931 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1932 #if defined(NRF_APPLICATION)
1933 #define NRF53_ERRATA_42_PRESENT 1
1934 #else
1935 #define NRF53_ERRATA_42_PRESENT 0
1936 #endif
1937 #else
1938 #define NRF53_ERRATA_42_PRESENT 0
1939 #endif
1940
1941 #ifndef NRF53_ERRATA_42_ENABLE_WORKAROUND
1942 #define NRF53_ERRATA_42_ENABLE_WORKAROUND NRF53_ERRATA_42_PRESENT
1943 #endif
1944
nrf53_errata_42(void)1945 static bool nrf53_errata_42(void)
1946 {
1947 #ifndef NRF53_SERIES
1948 return false;
1949 #else
1950 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1951 #if defined(NRF_APPLICATION)
1952 #if defined(NRF_TRUSTZONE_NONSECURE)
1953 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
1954 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
1955 #else
1956 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
1957 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
1958 #endif
1959 #endif
1960 #endif
1961 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1962 #if defined (NRF_APPLICATION)
1963 if (var1 == 0x07)
1964 {
1965 switch(var2)
1966 {
1967 case 0x02ul:
1968 return true;
1969 case 0x03ul:
1970 return false;
1971 case 0x04ul:
1972 return false;
1973 case 0x05ul:
1974 return false;
1975 default:
1976 return false;
1977 }
1978 }
1979 #endif
1980 #endif
1981 return false;
1982 #endif
1983 }
1984
1985 /* ========= Errata 43 ========= */
1986 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
1987 #if defined(NRF_APPLICATION)
1988 #define NRF53_ERRATA_43_PRESENT 1
1989 #else
1990 #define NRF53_ERRATA_43_PRESENT 0
1991 #endif
1992 #else
1993 #define NRF53_ERRATA_43_PRESENT 0
1994 #endif
1995
1996 #ifndef NRF53_ERRATA_43_ENABLE_WORKAROUND
1997 #define NRF53_ERRATA_43_ENABLE_WORKAROUND NRF53_ERRATA_43_PRESENT
1998 #endif
1999
nrf53_errata_43(void)2000 static bool nrf53_errata_43(void)
2001 {
2002 #ifndef NRF53_SERIES
2003 return false;
2004 #else
2005 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2006 #if defined(NRF_APPLICATION)
2007 #if defined(NRF_TRUSTZONE_NONSECURE)
2008 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
2009 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
2010 #else
2011 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
2012 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
2013 #endif
2014 #endif
2015 #endif
2016 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2017 #if defined (NRF_APPLICATION)
2018 if (var1 == 0x07)
2019 {
2020 switch(var2)
2021 {
2022 case 0x02ul:
2023 return true;
2024 case 0x03ul:
2025 return true;
2026 case 0x04ul:
2027 return true;
2028 case 0x05ul:
2029 return true;
2030 default:
2031 return true;
2032 }
2033 }
2034 #endif
2035 #endif
2036 return false;
2037 #endif
2038 }
2039
2040 /* ========= Errata 44 ========= */
2041 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2042 #if defined(NRF_APPLICATION) || \
2043 defined(NRF_NETWORK)
2044 #define NRF53_ERRATA_44_PRESENT 1
2045 #else
2046 #define NRF53_ERRATA_44_PRESENT 0
2047 #endif
2048 #else
2049 #define NRF53_ERRATA_44_PRESENT 0
2050 #endif
2051
2052 #ifndef NRF53_ERRATA_44_ENABLE_WORKAROUND
2053 #define NRF53_ERRATA_44_ENABLE_WORKAROUND NRF53_ERRATA_44_PRESENT
2054 #endif
2055
nrf53_errata_44(void)2056 static bool nrf53_errata_44(void)
2057 {
2058 #ifndef NRF53_SERIES
2059 return false;
2060 #else
2061 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2062 #if defined(NRF_APPLICATION)
2063 #if defined(NRF_TRUSTZONE_NONSECURE)
2064 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
2065 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
2066 #else
2067 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
2068 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
2069 #endif
2070 #elif defined(NRF_NETWORK)
2071 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
2072 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
2073 #endif
2074 #endif
2075 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2076 #if defined (NRF_APPLICATION)\
2077 || defined (NRF_NETWORK)
2078 if (var1 == 0x07)
2079 {
2080 switch(var2)
2081 {
2082 case 0x02ul:
2083 return true;
2084 case 0x03ul:
2085 return true;
2086 case 0x04ul:
2087 return true;
2088 case 0x05ul:
2089 return true;
2090 default:
2091 return true;
2092 }
2093 }
2094 #endif
2095 #endif
2096 return false;
2097 #endif
2098 }
2099
2100 /* ========= Errata 45 ========= */
2101 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2102 #if defined(NRF_APPLICATION)
2103 #define NRF53_ERRATA_45_PRESENT 1
2104 #else
2105 #define NRF53_ERRATA_45_PRESENT 0
2106 #endif
2107 #else
2108 #define NRF53_ERRATA_45_PRESENT 0
2109 #endif
2110
2111 #ifndef NRF53_ERRATA_45_ENABLE_WORKAROUND
2112 #define NRF53_ERRATA_45_ENABLE_WORKAROUND NRF53_ERRATA_45_PRESENT
2113 #endif
2114
nrf53_errata_45(void)2115 static bool nrf53_errata_45(void)
2116 {
2117 #ifndef NRF53_SERIES
2118 return false;
2119 #else
2120 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2121 #if defined(NRF_APPLICATION)
2122 #if defined(NRF_TRUSTZONE_NONSECURE)
2123 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
2124 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
2125 #else
2126 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
2127 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
2128 #endif
2129 #endif
2130 #endif
2131 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2132 #if defined (NRF_APPLICATION)
2133 if (var1 == 0x07)
2134 {
2135 switch(var2)
2136 {
2137 case 0x02ul:
2138 return true;
2139 case 0x03ul:
2140 return false;
2141 case 0x04ul:
2142 return false;
2143 case 0x05ul:
2144 return false;
2145 default:
2146 return false;
2147 }
2148 }
2149 #endif
2150 #endif
2151 return false;
2152 #endif
2153 }
2154
2155 /* ========= Errata 46 ========= */
2156 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2157 #if defined(NRF_APPLICATION)
2158 #define NRF53_ERRATA_46_PRESENT 1
2159 #else
2160 #define NRF53_ERRATA_46_PRESENT 0
2161 #endif
2162 #else
2163 #define NRF53_ERRATA_46_PRESENT 0
2164 #endif
2165
2166 #ifndef NRF53_ERRATA_46_ENABLE_WORKAROUND
2167 #define NRF53_ERRATA_46_ENABLE_WORKAROUND NRF53_ERRATA_46_PRESENT
2168 #endif
2169
nrf53_errata_46(void)2170 static bool nrf53_errata_46(void)
2171 {
2172 #ifndef NRF53_SERIES
2173 return false;
2174 #else
2175 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2176 #if defined(NRF_APPLICATION)
2177 #if defined(NRF_TRUSTZONE_NONSECURE)
2178 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
2179 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
2180 #else
2181 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
2182 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
2183 #endif
2184 #endif
2185 #endif
2186 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2187 #if defined (NRF_APPLICATION)
2188 if (var1 == 0x07)
2189 {
2190 switch(var2)
2191 {
2192 case 0x02ul:
2193 return true;
2194 case 0x03ul:
2195 return true;
2196 case 0x04ul:
2197 return false;
2198 case 0x05ul:
2199 return false;
2200 default:
2201 return false;
2202 }
2203 }
2204 #endif
2205 #endif
2206 return false;
2207 #endif
2208 }
2209
2210 /* ========= Errata 47 ========= */
2211 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2212 #if defined(NRF_APPLICATION) || \
2213 defined(NRF_NETWORK)
2214 #define NRF53_ERRATA_47_PRESENT 1
2215 #else
2216 #define NRF53_ERRATA_47_PRESENT 0
2217 #endif
2218 #else
2219 #define NRF53_ERRATA_47_PRESENT 0
2220 #endif
2221
2222 #ifndef NRF53_ERRATA_47_ENABLE_WORKAROUND
2223 #define NRF53_ERRATA_47_ENABLE_WORKAROUND NRF53_ERRATA_47_PRESENT
2224 #endif
2225
nrf53_errata_47(void)2226 static bool nrf53_errata_47(void)
2227 {
2228 #ifndef NRF53_SERIES
2229 return false;
2230 #else
2231 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2232 #if defined(NRF_APPLICATION)
2233 #if defined(NRF_TRUSTZONE_NONSECURE)
2234 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
2235 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
2236 #else
2237 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
2238 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
2239 #endif
2240 #elif defined(NRF_NETWORK)
2241 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
2242 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
2243 #endif
2244 #endif
2245 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2246 #if defined (NRF_APPLICATION)\
2247 || defined (NRF_NETWORK)
2248 if (var1 == 0x07)
2249 {
2250 switch(var2)
2251 {
2252 case 0x02ul:
2253 return true;
2254 case 0x03ul:
2255 return true;
2256 case 0x04ul:
2257 return true;
2258 case 0x05ul:
2259 return true;
2260 default:
2261 return true;
2262 }
2263 }
2264 #endif
2265 #endif
2266 return false;
2267 #endif
2268 }
2269
2270 /* ========= Errata 49 ========= */
2271 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2272 #if defined(NRF_APPLICATION) || \
2273 defined(NRF_NETWORK)
2274 #define NRF53_ERRATA_49_PRESENT 1
2275 #else
2276 #define NRF53_ERRATA_49_PRESENT 0
2277 #endif
2278 #else
2279 #define NRF53_ERRATA_49_PRESENT 0
2280 #endif
2281
2282 #ifndef NRF53_ERRATA_49_ENABLE_WORKAROUND
2283 #define NRF53_ERRATA_49_ENABLE_WORKAROUND NRF53_ERRATA_49_PRESENT
2284 #endif
2285
nrf53_errata_49(void)2286 static bool nrf53_errata_49(void)
2287 {
2288 #ifndef NRF53_SERIES
2289 return false;
2290 #else
2291 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2292 #if defined(NRF_APPLICATION)
2293 #if defined(NRF_TRUSTZONE_NONSECURE)
2294 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
2295 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
2296 #else
2297 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
2298 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
2299 #endif
2300 #elif defined(NRF_NETWORK)
2301 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
2302 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
2303 #endif
2304 #endif
2305 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2306 #if defined (NRF_APPLICATION)\
2307 || defined (NRF_NETWORK)
2308 if (var1 == 0x07)
2309 {
2310 switch(var2)
2311 {
2312 case 0x02ul:
2313 return true;
2314 case 0x03ul:
2315 return false;
2316 case 0x04ul:
2317 return false;
2318 case 0x05ul:
2319 return false;
2320 default:
2321 return false;
2322 }
2323 }
2324 #endif
2325 #endif
2326 return false;
2327 #endif
2328 }
2329
2330 /* ========= Errata 50 ========= */
2331 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2332 #if defined(NRF_APPLICATION)
2333 #define NRF53_ERRATA_50_PRESENT 1
2334 #else
2335 #define NRF53_ERRATA_50_PRESENT 0
2336 #endif
2337 #else
2338 #define NRF53_ERRATA_50_PRESENT 0
2339 #endif
2340
2341 #ifndef NRF53_ERRATA_50_ENABLE_WORKAROUND
2342 #define NRF53_ERRATA_50_ENABLE_WORKAROUND NRF53_ERRATA_50_PRESENT
2343 #endif
2344
nrf53_errata_50(void)2345 static bool nrf53_errata_50(void)
2346 {
2347 #ifndef NRF53_SERIES
2348 return false;
2349 #else
2350 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2351 #if defined(NRF_APPLICATION)
2352 #if defined(NRF_TRUSTZONE_NONSECURE)
2353 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
2354 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
2355 #else
2356 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
2357 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
2358 #endif
2359 #endif
2360 #endif
2361 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2362 #if defined (NRF_APPLICATION)
2363 if (var1 == 0x07)
2364 {
2365 switch(var2)
2366 {
2367 case 0x02ul:
2368 return true;
2369 case 0x03ul:
2370 return false;
2371 case 0x04ul:
2372 return false;
2373 case 0x05ul:
2374 return false;
2375 default:
2376 return false;
2377 }
2378 }
2379 #endif
2380 #endif
2381 return false;
2382 #endif
2383 }
2384
2385 /* ========= Errata 51 ========= */
2386 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2387 #if defined(NRF_APPLICATION)
2388 #define NRF53_ERRATA_51_PRESENT 1
2389 #else
2390 #define NRF53_ERRATA_51_PRESENT 0
2391 #endif
2392 #else
2393 #define NRF53_ERRATA_51_PRESENT 0
2394 #endif
2395
2396 #ifndef NRF53_ERRATA_51_ENABLE_WORKAROUND
2397 #define NRF53_ERRATA_51_ENABLE_WORKAROUND NRF53_ERRATA_51_PRESENT
2398 #endif
2399
nrf53_errata_51(void)2400 static bool nrf53_errata_51(void)
2401 {
2402 #ifndef NRF53_SERIES
2403 return false;
2404 #else
2405 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2406 #if defined(NRF_APPLICATION)
2407 #if defined(NRF_TRUSTZONE_NONSECURE)
2408 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
2409 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
2410 #else
2411 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
2412 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
2413 #endif
2414 #endif
2415 #endif
2416 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2417 #if defined (NRF_APPLICATION)
2418 if (var1 == 0x07)
2419 {
2420 switch(var2)
2421 {
2422 case 0x02ul:
2423 return true;
2424 case 0x03ul:
2425 return false;
2426 case 0x04ul:
2427 return false;
2428 case 0x05ul:
2429 return false;
2430 default:
2431 return false;
2432 }
2433 }
2434 #endif
2435 #endif
2436 return false;
2437 #endif
2438 }
2439
2440 /* ========= Errata 52 ========= */
2441 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2442 #if defined(NRF_APPLICATION) || \
2443 defined(NRF_NETWORK)
2444 #define NRF53_ERRATA_52_PRESENT 1
2445 #else
2446 #define NRF53_ERRATA_52_PRESENT 0
2447 #endif
2448 #else
2449 #define NRF53_ERRATA_52_PRESENT 0
2450 #endif
2451
2452 #ifndef NRF53_ERRATA_52_ENABLE_WORKAROUND
2453 #define NRF53_ERRATA_52_ENABLE_WORKAROUND NRF53_ERRATA_52_PRESENT
2454 #endif
2455
nrf53_errata_52(void)2456 static bool nrf53_errata_52(void)
2457 {
2458 #ifndef NRF53_SERIES
2459 return false;
2460 #else
2461 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2462 #if defined(NRF_APPLICATION)
2463 #if defined(NRF_TRUSTZONE_NONSECURE)
2464 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
2465 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
2466 #else
2467 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
2468 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
2469 #endif
2470 #elif defined(NRF_NETWORK)
2471 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
2472 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
2473 #endif
2474 #endif
2475 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2476 #if defined (NRF_APPLICATION)\
2477 || defined (NRF_NETWORK)
2478 if (var1 == 0x07)
2479 {
2480 switch(var2)
2481 {
2482 case 0x02ul:
2483 return true;
2484 case 0x03ul:
2485 return false;
2486 case 0x04ul:
2487 return false;
2488 case 0x05ul:
2489 return false;
2490 default:
2491 return false;
2492 }
2493 }
2494 #endif
2495 #endif
2496 return false;
2497 #endif
2498 }
2499
2500 /* ========= Errata 53 ========= */
2501 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2502 #if defined(NRF_APPLICATION)
2503 #define NRF53_ERRATA_53_PRESENT 1
2504 #else
2505 #define NRF53_ERRATA_53_PRESENT 0
2506 #endif
2507 #else
2508 #define NRF53_ERRATA_53_PRESENT 0
2509 #endif
2510
2511 #ifndef NRF53_ERRATA_53_ENABLE_WORKAROUND
2512 #define NRF53_ERRATA_53_ENABLE_WORKAROUND NRF53_ERRATA_53_PRESENT
2513 #endif
2514
nrf53_errata_53(void)2515 static bool nrf53_errata_53(void)
2516 {
2517 #ifndef NRF53_SERIES
2518 return false;
2519 #else
2520 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2521 #if defined(NRF_APPLICATION)
2522 #if defined(NRF_TRUSTZONE_NONSECURE)
2523 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
2524 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
2525 #else
2526 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
2527 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
2528 #endif
2529 #endif
2530 #endif
2531 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2532 #if defined (NRF_APPLICATION)
2533 if (var1 == 0x07)
2534 {
2535 switch(var2)
2536 {
2537 case 0x02ul:
2538 return true;
2539 case 0x03ul:
2540 return false;
2541 case 0x04ul:
2542 return false;
2543 case 0x05ul:
2544 return false;
2545 default:
2546 return false;
2547 }
2548 }
2549 #endif
2550 #endif
2551 return false;
2552 #endif
2553 }
2554
2555 /* ========= Errata 54 ========= */
2556 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2557 #if defined(NRF_NETWORK)
2558 #define NRF53_ERRATA_54_PRESENT 1
2559 #else
2560 #define NRF53_ERRATA_54_PRESENT 0
2561 #endif
2562 #else
2563 #define NRF53_ERRATA_54_PRESENT 0
2564 #endif
2565
2566 #ifndef NRF53_ERRATA_54_ENABLE_WORKAROUND
2567 #define NRF53_ERRATA_54_ENABLE_WORKAROUND NRF53_ERRATA_54_PRESENT
2568 #endif
2569
nrf53_errata_54(void)2570 static bool nrf53_errata_54(void)
2571 {
2572 #ifndef NRF53_SERIES
2573 return false;
2574 #else
2575 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2576 #if defined(NRF_NETWORK)
2577 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
2578 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
2579 #endif
2580 #endif
2581 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2582 #if defined (NRF_NETWORK)
2583 if (var1 == 0x07)
2584 {
2585 switch(var2)
2586 {
2587 case 0x02ul:
2588 return true;
2589 case 0x03ul:
2590 return false;
2591 case 0x04ul:
2592 return false;
2593 case 0x05ul:
2594 return false;
2595 default:
2596 return false;
2597 }
2598 }
2599 #endif
2600 #endif
2601 return false;
2602 #endif
2603 }
2604
2605 /* ========= Errata 55 ========= */
2606 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2607 #if defined(NRF_APPLICATION) || \
2608 defined(NRF_NETWORK)
2609 #define NRF53_ERRATA_55_PRESENT 1
2610 #else
2611 #define NRF53_ERRATA_55_PRESENT 0
2612 #endif
2613 #else
2614 #define NRF53_ERRATA_55_PRESENT 0
2615 #endif
2616
2617 #ifndef NRF53_ERRATA_55_ENABLE_WORKAROUND
2618 #define NRF53_ERRATA_55_ENABLE_WORKAROUND NRF53_ERRATA_55_PRESENT
2619 #endif
2620
nrf53_errata_55(void)2621 static bool nrf53_errata_55(void)
2622 {
2623 #ifndef NRF53_SERIES
2624 return false;
2625 #else
2626 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2627 #if defined(NRF_APPLICATION)
2628 #if defined(NRF_TRUSTZONE_NONSECURE)
2629 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
2630 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
2631 #else
2632 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
2633 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
2634 #endif
2635 #elif defined(NRF_NETWORK)
2636 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
2637 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
2638 #endif
2639 #endif
2640 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2641 #if defined (NRF_APPLICATION)\
2642 || defined (NRF_NETWORK)
2643 if (var1 == 0x07)
2644 {
2645 switch(var2)
2646 {
2647 case 0x02ul:
2648 return true;
2649 case 0x03ul:
2650 return true;
2651 case 0x04ul:
2652 return true;
2653 case 0x05ul:
2654 return true;
2655 default:
2656 return true;
2657 }
2658 }
2659 #endif
2660 #endif
2661 return false;
2662 #endif
2663 }
2664
2665 /* ========= Errata 57 ========= */
2666 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2667 #if defined(NRF_APPLICATION)
2668 #define NRF53_ERRATA_57_PRESENT 1
2669 #else
2670 #define NRF53_ERRATA_57_PRESENT 0
2671 #endif
2672 #else
2673 #define NRF53_ERRATA_57_PRESENT 0
2674 #endif
2675
2676 #ifndef NRF53_ERRATA_57_ENABLE_WORKAROUND
2677 #define NRF53_ERRATA_57_ENABLE_WORKAROUND NRF53_ERRATA_57_PRESENT
2678 #endif
2679
nrf53_errata_57(void)2680 static bool nrf53_errata_57(void)
2681 {
2682 #ifndef NRF53_SERIES
2683 return false;
2684 #else
2685 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2686 #if defined(NRF_APPLICATION)
2687 #if defined(NRF_TRUSTZONE_NONSECURE)
2688 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
2689 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
2690 #else
2691 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
2692 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
2693 #endif
2694 #endif
2695 #endif
2696 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2697 #if defined (NRF_APPLICATION)
2698 if (var1 == 0x07)
2699 {
2700 switch(var2)
2701 {
2702 case 0x02ul:
2703 return true;
2704 case 0x03ul:
2705 return false;
2706 case 0x04ul:
2707 return false;
2708 case 0x05ul:
2709 return false;
2710 default:
2711 return false;
2712 }
2713 }
2714 #endif
2715 #endif
2716 return false;
2717 #endif
2718 }
2719
2720 /* ========= Errata 58 ========= */
2721 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2722 #if defined(NRF_APPLICATION)
2723 #define NRF53_ERRATA_58_PRESENT 1
2724 #else
2725 #define NRF53_ERRATA_58_PRESENT 0
2726 #endif
2727 #else
2728 #define NRF53_ERRATA_58_PRESENT 0
2729 #endif
2730
2731 #ifndef NRF53_ERRATA_58_ENABLE_WORKAROUND
2732 #define NRF53_ERRATA_58_ENABLE_WORKAROUND NRF53_ERRATA_58_PRESENT
2733 #endif
2734
nrf53_errata_58(void)2735 static bool nrf53_errata_58(void)
2736 {
2737 #ifndef NRF53_SERIES
2738 return false;
2739 #else
2740 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2741 #if defined(NRF_APPLICATION)
2742 #if defined(NRF_TRUSTZONE_NONSECURE)
2743 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
2744 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
2745 #else
2746 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
2747 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
2748 #endif
2749 #endif
2750 #endif
2751 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2752 #if defined (NRF_APPLICATION)
2753 if (var1 == 0x07)
2754 {
2755 switch(var2)
2756 {
2757 case 0x02ul:
2758 return true;
2759 case 0x03ul:
2760 return false;
2761 case 0x04ul:
2762 return false;
2763 case 0x05ul:
2764 return false;
2765 default:
2766 return false;
2767 }
2768 }
2769 #endif
2770 #endif
2771 return false;
2772 #endif
2773 }
2774
2775 /* ========= Errata 59 ========= */
2776 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2777 #if defined(NRF_APPLICATION)
2778 #define NRF53_ERRATA_59_PRESENT 1
2779 #else
2780 #define NRF53_ERRATA_59_PRESENT 0
2781 #endif
2782 #else
2783 #define NRF53_ERRATA_59_PRESENT 0
2784 #endif
2785
2786 #ifndef NRF53_ERRATA_59_ENABLE_WORKAROUND
2787 #define NRF53_ERRATA_59_ENABLE_WORKAROUND NRF53_ERRATA_59_PRESENT
2788 #endif
2789
nrf53_errata_59(void)2790 static bool nrf53_errata_59(void)
2791 {
2792 #ifndef NRF53_SERIES
2793 return false;
2794 #else
2795 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2796 #if defined(NRF_APPLICATION)
2797 #if defined(NRF_TRUSTZONE_NONSECURE)
2798 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
2799 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
2800 #else
2801 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
2802 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
2803 #endif
2804 #endif
2805 #endif
2806 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2807 #if defined (NRF_APPLICATION)
2808 if (var1 == 0x07)
2809 {
2810 switch(var2)
2811 {
2812 case 0x02ul:
2813 return true;
2814 case 0x03ul:
2815 return false;
2816 case 0x04ul:
2817 return false;
2818 case 0x05ul:
2819 return false;
2820 default:
2821 return false;
2822 }
2823 }
2824 #endif
2825 #endif
2826 return false;
2827 #endif
2828 }
2829
2830 /* ========= Errata 62 ========= */
2831 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2832 #if defined(NRF_APPLICATION) || \
2833 defined(NRF_NETWORK)
2834 #define NRF53_ERRATA_62_PRESENT 1
2835 #else
2836 #define NRF53_ERRATA_62_PRESENT 0
2837 #endif
2838 #else
2839 #define NRF53_ERRATA_62_PRESENT 0
2840 #endif
2841
2842 #ifndef NRF53_ERRATA_62_ENABLE_WORKAROUND
2843 #define NRF53_ERRATA_62_ENABLE_WORKAROUND NRF53_ERRATA_62_PRESENT
2844 #endif
2845
nrf53_errata_62(void)2846 static bool nrf53_errata_62(void)
2847 {
2848 #ifndef NRF53_SERIES
2849 return false;
2850 #else
2851 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2852 #if defined(NRF_APPLICATION)
2853 #if defined(NRF_TRUSTZONE_NONSECURE)
2854 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
2855 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
2856 #else
2857 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
2858 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
2859 #endif
2860 #elif defined(NRF_NETWORK)
2861 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
2862 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
2863 #endif
2864 #endif
2865 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2866 #if defined (NRF_APPLICATION)\
2867 || defined (NRF_NETWORK)
2868 if (var1 == 0x07)
2869 {
2870 switch(var2)
2871 {
2872 case 0x02ul:
2873 return true;
2874 case 0x03ul:
2875 return false;
2876 case 0x04ul:
2877 return false;
2878 case 0x05ul:
2879 return false;
2880 default:
2881 return false;
2882 }
2883 }
2884 #endif
2885 #endif
2886 return false;
2887 #endif
2888 }
2889
2890 /* ========= Errata 64 ========= */
2891 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2892 #if defined(NRF_APPLICATION)
2893 #define NRF53_ERRATA_64_PRESENT 1
2894 #else
2895 #define NRF53_ERRATA_64_PRESENT 0
2896 #endif
2897 #else
2898 #define NRF53_ERRATA_64_PRESENT 0
2899 #endif
2900
2901 #ifndef NRF53_ERRATA_64_ENABLE_WORKAROUND
2902 #define NRF53_ERRATA_64_ENABLE_WORKAROUND NRF53_ERRATA_64_PRESENT
2903 #endif
2904
nrf53_errata_64(void)2905 static bool nrf53_errata_64(void)
2906 {
2907 #ifndef NRF53_SERIES
2908 return false;
2909 #else
2910 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2911 #if defined(NRF_APPLICATION)
2912 #if defined(NRF_TRUSTZONE_NONSECURE)
2913 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
2914 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
2915 #else
2916 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
2917 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
2918 #endif
2919 #endif
2920 #endif
2921 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2922 #if defined (NRF_APPLICATION)
2923 if (var1 == 0x07)
2924 {
2925 switch(var2)
2926 {
2927 case 0x02ul:
2928 return true;
2929 case 0x03ul:
2930 return false;
2931 case 0x04ul:
2932 return false;
2933 case 0x05ul:
2934 return false;
2935 default:
2936 return false;
2937 }
2938 }
2939 #endif
2940 #endif
2941 return false;
2942 #endif
2943 }
2944
2945 /* ========= Errata 65 ========= */
2946 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2947 #if defined(NRF_APPLICATION)
2948 #define NRF53_ERRATA_65_PRESENT 1
2949 #else
2950 #define NRF53_ERRATA_65_PRESENT 0
2951 #endif
2952 #else
2953 #define NRF53_ERRATA_65_PRESENT 0
2954 #endif
2955
2956 #ifndef NRF53_ERRATA_65_ENABLE_WORKAROUND
2957 #define NRF53_ERRATA_65_ENABLE_WORKAROUND NRF53_ERRATA_65_PRESENT
2958 #endif
2959
nrf53_errata_65(void)2960 static bool nrf53_errata_65(void)
2961 {
2962 #ifndef NRF53_SERIES
2963 return false;
2964 #else
2965 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2966 #if defined(NRF_APPLICATION)
2967 #if defined(NRF_TRUSTZONE_NONSECURE)
2968 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
2969 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
2970 #else
2971 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
2972 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
2973 #endif
2974 #endif
2975 #endif
2976 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
2977 #if defined (NRF_APPLICATION)
2978 if (var1 == 0x07)
2979 {
2980 switch(var2)
2981 {
2982 case 0x02ul:
2983 return true;
2984 case 0x03ul:
2985 return true;
2986 case 0x04ul:
2987 return true;
2988 case 0x05ul:
2989 return true;
2990 default:
2991 return true;
2992 }
2993 }
2994 #endif
2995 #endif
2996 return false;
2997 #endif
2998 }
2999
3000 /* ========= Errata 66 ========= */
3001 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3002 #if defined(NRF_APPLICATION)
3003 #define NRF53_ERRATA_66_PRESENT 1
3004 #else
3005 #define NRF53_ERRATA_66_PRESENT 0
3006 #endif
3007 #else
3008 #define NRF53_ERRATA_66_PRESENT 0
3009 #endif
3010
3011 #ifndef NRF53_ERRATA_66_ENABLE_WORKAROUND
3012 #define NRF53_ERRATA_66_ENABLE_WORKAROUND NRF53_ERRATA_66_PRESENT
3013 #endif
3014
nrf53_errata_66(void)3015 static bool nrf53_errata_66(void)
3016 {
3017 #ifndef NRF53_SERIES
3018 return false;
3019 #else
3020 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3021 #if defined(NRF_APPLICATION)
3022 #if defined(NRF_TRUSTZONE_NONSECURE)
3023 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
3024 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
3025 #else
3026 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
3027 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
3028 #endif
3029 #endif
3030 #endif
3031 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3032 #if defined (NRF_APPLICATION)
3033 if (var1 == 0x07)
3034 {
3035 switch(var2)
3036 {
3037 case 0x02ul:
3038 return true;
3039 case 0x03ul:
3040 return false;
3041 case 0x04ul:
3042 return false;
3043 case 0x05ul:
3044 return false;
3045 default:
3046 return false;
3047 }
3048 }
3049 #endif
3050 #endif
3051 return false;
3052 #endif
3053 }
3054
3055 /* ========= Errata 67 ========= */
3056 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3057 #if defined(NRF_APPLICATION) || \
3058 defined(NRF_NETWORK)
3059 #define NRF53_ERRATA_67_PRESENT 1
3060 #else
3061 #define NRF53_ERRATA_67_PRESENT 0
3062 #endif
3063 #else
3064 #define NRF53_ERRATA_67_PRESENT 0
3065 #endif
3066
3067 #ifndef NRF53_ERRATA_67_ENABLE_WORKAROUND
3068 #define NRF53_ERRATA_67_ENABLE_WORKAROUND NRF53_ERRATA_67_PRESENT
3069 #endif
3070
nrf53_errata_67(void)3071 static bool nrf53_errata_67(void)
3072 {
3073 #ifndef NRF53_SERIES
3074 return false;
3075 #else
3076 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3077 #if defined(NRF_APPLICATION)
3078 #if defined(NRF_TRUSTZONE_NONSECURE)
3079 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
3080 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
3081 #else
3082 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
3083 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
3084 #endif
3085 #elif defined(NRF_NETWORK)
3086 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
3087 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
3088 #endif
3089 #endif
3090 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3091 #if defined (NRF_APPLICATION)\
3092 || defined (NRF_NETWORK)
3093 if (var1 == 0x07)
3094 {
3095 switch(var2)
3096 {
3097 case 0x02ul:
3098 return true;
3099 case 0x03ul:
3100 return true;
3101 case 0x04ul:
3102 return false;
3103 case 0x05ul:
3104 return false;
3105 default:
3106 return false;
3107 }
3108 }
3109 #endif
3110 #endif
3111 return false;
3112 #endif
3113 }
3114
3115 /* ========= Errata 69 ========= */
3116 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3117 #if defined(NRF_APPLICATION)
3118 #define NRF53_ERRATA_69_PRESENT 1
3119 #else
3120 #define NRF53_ERRATA_69_PRESENT 0
3121 #endif
3122 #else
3123 #define NRF53_ERRATA_69_PRESENT 0
3124 #endif
3125
3126 #ifndef NRF53_ERRATA_69_ENABLE_WORKAROUND
3127 #define NRF53_ERRATA_69_ENABLE_WORKAROUND NRF53_ERRATA_69_PRESENT
3128 #endif
3129
nrf53_errata_69(void)3130 static bool nrf53_errata_69(void)
3131 {
3132 #ifndef NRF53_SERIES
3133 return false;
3134 #else
3135 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3136 #if defined(NRF_APPLICATION)
3137 #if defined(NRF_TRUSTZONE_NONSECURE)
3138 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
3139 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
3140 #else
3141 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
3142 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
3143 #endif
3144 #endif
3145 #endif
3146 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3147 #if defined (NRF_APPLICATION)
3148 if (var1 == 0x07)
3149 {
3150 switch(var2)
3151 {
3152 case 0x02ul:
3153 return true;
3154 case 0x03ul:
3155 return false;
3156 case 0x04ul:
3157 return false;
3158 case 0x05ul:
3159 return false;
3160 default:
3161 return false;
3162 }
3163 }
3164 #endif
3165 #endif
3166 return false;
3167 #endif
3168 }
3169
3170 /* ========= Errata 70 ========= */
3171 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3172 #if defined(NRF_APPLICATION)
3173 #define NRF53_ERRATA_70_PRESENT 1
3174 #else
3175 #define NRF53_ERRATA_70_PRESENT 0
3176 #endif
3177 #else
3178 #define NRF53_ERRATA_70_PRESENT 0
3179 #endif
3180
3181 #ifndef NRF53_ERRATA_70_ENABLE_WORKAROUND
3182 #define NRF53_ERRATA_70_ENABLE_WORKAROUND NRF53_ERRATA_70_PRESENT
3183 #endif
3184
nrf53_errata_70(void)3185 static bool nrf53_errata_70(void)
3186 {
3187 #ifndef NRF53_SERIES
3188 return false;
3189 #else
3190 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3191 #if defined(NRF_APPLICATION)
3192 #if defined(NRF_TRUSTZONE_NONSECURE)
3193 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
3194 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
3195 #else
3196 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
3197 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
3198 #endif
3199 #endif
3200 #endif
3201 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3202 #if defined (NRF_APPLICATION)
3203 if (var1 == 0x07)
3204 {
3205 switch(var2)
3206 {
3207 case 0x02ul:
3208 return true;
3209 case 0x03ul:
3210 return true;
3211 case 0x04ul:
3212 return true;
3213 case 0x05ul:
3214 return true;
3215 default:
3216 return true;
3217 }
3218 }
3219 #endif
3220 #endif
3221 return false;
3222 #endif
3223 }
3224
3225 /* ========= Errata 71 ========= */
3226 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3227 #if defined(NRF_APPLICATION)
3228 #define NRF53_ERRATA_71_PRESENT 1
3229 #else
3230 #define NRF53_ERRATA_71_PRESENT 0
3231 #endif
3232 #else
3233 #define NRF53_ERRATA_71_PRESENT 0
3234 #endif
3235
3236 #ifndef NRF53_ERRATA_71_ENABLE_WORKAROUND
3237 #define NRF53_ERRATA_71_ENABLE_WORKAROUND NRF53_ERRATA_71_PRESENT
3238 #endif
3239
nrf53_errata_71(void)3240 static bool nrf53_errata_71(void)
3241 {
3242 #ifndef NRF53_SERIES
3243 return false;
3244 #else
3245 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3246 #if defined(NRF_APPLICATION)
3247 #if defined(NRF_TRUSTZONE_NONSECURE)
3248 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
3249 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
3250 #else
3251 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
3252 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
3253 #endif
3254 #endif
3255 #endif
3256 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3257 #if defined (NRF_APPLICATION)
3258 if (var1 == 0x07)
3259 {
3260 switch(var2)
3261 {
3262 case 0x02ul:
3263 return true;
3264 case 0x03ul:
3265 return true;
3266 case 0x04ul:
3267 return true;
3268 case 0x05ul:
3269 return true;
3270 default:
3271 return true;
3272 }
3273 }
3274 #endif
3275 #endif
3276 return false;
3277 #endif
3278 }
3279
3280 /* ========= Errata 72 ========= */
3281 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3282 #if defined(NRF_APPLICATION)
3283 #define NRF53_ERRATA_72_PRESENT 1
3284 #else
3285 #define NRF53_ERRATA_72_PRESENT 0
3286 #endif
3287 #else
3288 #define NRF53_ERRATA_72_PRESENT 0
3289 #endif
3290
3291 #ifndef NRF53_ERRATA_72_ENABLE_WORKAROUND
3292 #define NRF53_ERRATA_72_ENABLE_WORKAROUND NRF53_ERRATA_72_PRESENT
3293 #endif
3294
nrf53_errata_72(void)3295 static bool nrf53_errata_72(void)
3296 {
3297 #ifndef NRF53_SERIES
3298 return false;
3299 #else
3300 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3301 #if defined(NRF_APPLICATION)
3302 #if defined(NRF_TRUSTZONE_NONSECURE)
3303 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
3304 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
3305 #else
3306 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
3307 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
3308 #endif
3309 #endif
3310 #endif
3311 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3312 #if defined (NRF_APPLICATION)
3313 if (var1 == 0x07)
3314 {
3315 switch(var2)
3316 {
3317 case 0x02ul:
3318 return true;
3319 case 0x03ul:
3320 return false;
3321 case 0x04ul:
3322 return false;
3323 case 0x05ul:
3324 return false;
3325 default:
3326 return false;
3327 }
3328 }
3329 #endif
3330 #endif
3331 return false;
3332 #endif
3333 }
3334
3335 /* ========= Errata 73 ========= */
3336 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3337 #if defined(NRF_APPLICATION) || \
3338 defined(NRF_NETWORK)
3339 #define NRF53_ERRATA_73_PRESENT 1
3340 #else
3341 #define NRF53_ERRATA_73_PRESENT 0
3342 #endif
3343 #else
3344 #define NRF53_ERRATA_73_PRESENT 0
3345 #endif
3346
3347 #ifndef NRF53_ERRATA_73_ENABLE_WORKAROUND
3348 #define NRF53_ERRATA_73_ENABLE_WORKAROUND NRF53_ERRATA_73_PRESENT
3349 #endif
3350
nrf53_errata_73(void)3351 static bool nrf53_errata_73(void)
3352 {
3353 #ifndef NRF53_SERIES
3354 return false;
3355 #else
3356 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3357 #if defined(NRF_APPLICATION)
3358 #if defined(NRF_TRUSTZONE_NONSECURE)
3359 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
3360 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
3361 #else
3362 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
3363 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
3364 #endif
3365 #elif defined(NRF_NETWORK)
3366 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
3367 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
3368 #endif
3369 #endif
3370 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3371 #if defined (NRF_APPLICATION)\
3372 || defined (NRF_NETWORK)
3373 if (var1 == 0x07)
3374 {
3375 switch(var2)
3376 {
3377 case 0x02ul:
3378 return true;
3379 case 0x03ul:
3380 return false;
3381 case 0x04ul:
3382 return false;
3383 case 0x05ul:
3384 return false;
3385 default:
3386 return false;
3387 }
3388 }
3389 #endif
3390 #endif
3391 return false;
3392 #endif
3393 }
3394
3395 /* ========= Errata 74 ========= */
3396 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3397 #if defined(NRF_APPLICATION) || \
3398 defined(NRF_NETWORK)
3399 #define NRF53_ERRATA_74_PRESENT 1
3400 #else
3401 #define NRF53_ERRATA_74_PRESENT 0
3402 #endif
3403 #else
3404 #define NRF53_ERRATA_74_PRESENT 0
3405 #endif
3406
3407 #ifndef NRF53_ERRATA_74_ENABLE_WORKAROUND
3408 #define NRF53_ERRATA_74_ENABLE_WORKAROUND NRF53_ERRATA_74_PRESENT
3409 #endif
3410
nrf53_errata_74(void)3411 static bool nrf53_errata_74(void)
3412 {
3413 #ifndef NRF53_SERIES
3414 return false;
3415 #else
3416 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3417 #if defined(NRF_APPLICATION)
3418 #if defined(NRF_TRUSTZONE_NONSECURE)
3419 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
3420 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
3421 #else
3422 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
3423 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
3424 #endif
3425 #elif defined(NRF_NETWORK)
3426 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
3427 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
3428 #endif
3429 #endif
3430 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3431 #if defined (NRF_APPLICATION)\
3432 || defined (NRF_NETWORK)
3433 if (var1 == 0x07)
3434 {
3435 switch(var2)
3436 {
3437 case 0x02ul:
3438 return true;
3439 case 0x03ul:
3440 return false;
3441 case 0x04ul:
3442 return false;
3443 case 0x05ul:
3444 return false;
3445 default:
3446 return false;
3447 }
3448 }
3449 #endif
3450 #endif
3451 return false;
3452 #endif
3453 }
3454
3455 /* ========= Errata 75 ========= */
3456 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3457 #if defined(NRF_APPLICATION)
3458 #define NRF53_ERRATA_75_PRESENT 1
3459 #else
3460 #define NRF53_ERRATA_75_PRESENT 0
3461 #endif
3462 #else
3463 #define NRF53_ERRATA_75_PRESENT 0
3464 #endif
3465
3466 #ifndef NRF53_ERRATA_75_ENABLE_WORKAROUND
3467 #define NRF53_ERRATA_75_ENABLE_WORKAROUND NRF53_ERRATA_75_PRESENT
3468 #endif
3469
nrf53_errata_75(void)3470 static bool nrf53_errata_75(void)
3471 {
3472 #ifndef NRF53_SERIES
3473 return false;
3474 #else
3475 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3476 #if defined(NRF_APPLICATION)
3477 #if defined(NRF_TRUSTZONE_NONSECURE)
3478 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
3479 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
3480 #else
3481 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
3482 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
3483 #endif
3484 #endif
3485 #endif
3486 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3487 #if defined (NRF_APPLICATION)
3488 if (var1 == 0x07)
3489 {
3490 switch(var2)
3491 {
3492 case 0x02ul:
3493 return true;
3494 case 0x03ul:
3495 return true;
3496 case 0x04ul:
3497 return true;
3498 case 0x05ul:
3499 return true;
3500 default:
3501 return true;
3502 }
3503 }
3504 #endif
3505 #endif
3506 return false;
3507 #endif
3508 }
3509
3510 /* ========= Errata 76 ========= */
3511 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3512 #if defined(NRF_APPLICATION)
3513 #define NRF53_ERRATA_76_PRESENT 1
3514 #else
3515 #define NRF53_ERRATA_76_PRESENT 0
3516 #endif
3517 #else
3518 #define NRF53_ERRATA_76_PRESENT 0
3519 #endif
3520
3521 #ifndef NRF53_ERRATA_76_ENABLE_WORKAROUND
3522 #define NRF53_ERRATA_76_ENABLE_WORKAROUND NRF53_ERRATA_76_PRESENT
3523 #endif
3524
nrf53_errata_76(void)3525 static bool nrf53_errata_76(void)
3526 {
3527 #ifndef NRF53_SERIES
3528 return false;
3529 #else
3530 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3531 #if defined(NRF_APPLICATION)
3532 #if defined(NRF_TRUSTZONE_NONSECURE)
3533 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
3534 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
3535 #else
3536 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
3537 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
3538 #endif
3539 #endif
3540 #endif
3541 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3542 #if defined (NRF_APPLICATION)
3543 if (var1 == 0x07)
3544 {
3545 switch(var2)
3546 {
3547 case 0x02ul:
3548 return true;
3549 case 0x03ul:
3550 return true;
3551 case 0x04ul:
3552 return true;
3553 case 0x05ul:
3554 return true;
3555 default:
3556 return true;
3557 }
3558 }
3559 #endif
3560 #endif
3561 return false;
3562 #endif
3563 }
3564
3565 /* ========= Errata 77 ========= */
3566 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3567 #if defined(NRF_APPLICATION) || \
3568 defined(NRF_NETWORK)
3569 #define NRF53_ERRATA_77_PRESENT 1
3570 #else
3571 #define NRF53_ERRATA_77_PRESENT 0
3572 #endif
3573 #else
3574 #define NRF53_ERRATA_77_PRESENT 0
3575 #endif
3576
3577 #ifndef NRF53_ERRATA_77_ENABLE_WORKAROUND
3578 #define NRF53_ERRATA_77_ENABLE_WORKAROUND NRF53_ERRATA_77_PRESENT
3579 #endif
3580
nrf53_errata_77(void)3581 static bool nrf53_errata_77(void)
3582 {
3583 #ifndef NRF53_SERIES
3584 return false;
3585 #else
3586 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3587 #if defined(NRF_APPLICATION)
3588 #if defined(NRF_TRUSTZONE_NONSECURE)
3589 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
3590 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
3591 #else
3592 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
3593 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
3594 #endif
3595 #elif defined(NRF_NETWORK)
3596 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
3597 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
3598 #endif
3599 #endif
3600 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3601 #if defined (NRF_APPLICATION)\
3602 || defined (NRF_NETWORK)
3603 if (var1 == 0x07)
3604 {
3605 switch(var2)
3606 {
3607 case 0x02ul:
3608 return true;
3609 case 0x03ul:
3610 return false;
3611 case 0x04ul:
3612 return false;
3613 case 0x05ul:
3614 return false;
3615 default:
3616 return false;
3617 }
3618 }
3619 #endif
3620 #endif
3621 return false;
3622 #endif
3623 }
3624
3625 /* ========= Errata 79 ========= */
3626 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3627 #if defined(NRF_APPLICATION)
3628 #define NRF53_ERRATA_79_PRESENT 1
3629 #else
3630 #define NRF53_ERRATA_79_PRESENT 0
3631 #endif
3632 #else
3633 #define NRF53_ERRATA_79_PRESENT 0
3634 #endif
3635
3636 #ifndef NRF53_ERRATA_79_ENABLE_WORKAROUND
3637 #define NRF53_ERRATA_79_ENABLE_WORKAROUND NRF53_ERRATA_79_PRESENT
3638 #endif
3639
nrf53_errata_79(void)3640 static bool nrf53_errata_79(void)
3641 {
3642 #ifndef NRF53_SERIES
3643 return false;
3644 #else
3645 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3646 #if defined(NRF_APPLICATION)
3647 #if defined(NRF_TRUSTZONE_NONSECURE)
3648 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
3649 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
3650 #else
3651 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
3652 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
3653 #endif
3654 #endif
3655 #endif
3656 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3657 #if defined (NRF_APPLICATION)
3658 if (var1 == 0x07)
3659 {
3660 switch(var2)
3661 {
3662 case 0x02ul:
3663 return true;
3664 case 0x03ul:
3665 return false;
3666 case 0x04ul:
3667 return false;
3668 case 0x05ul:
3669 return false;
3670 default:
3671 return false;
3672 }
3673 }
3674 #endif
3675 #endif
3676 return false;
3677 #endif
3678 }
3679
3680 /* ========= Errata 80 ========= */
3681 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3682 #if defined(NRF_APPLICATION)
3683 #define NRF53_ERRATA_80_PRESENT 1
3684 #else
3685 #define NRF53_ERRATA_80_PRESENT 0
3686 #endif
3687 #else
3688 #define NRF53_ERRATA_80_PRESENT 0
3689 #endif
3690
3691 #ifndef NRF53_ERRATA_80_ENABLE_WORKAROUND
3692 #define NRF53_ERRATA_80_ENABLE_WORKAROUND NRF53_ERRATA_80_PRESENT
3693 #endif
3694
nrf53_errata_80(void)3695 static bool nrf53_errata_80(void)
3696 {
3697 #ifndef NRF53_SERIES
3698 return false;
3699 #else
3700 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3701 #if defined(NRF_APPLICATION)
3702 #if defined(NRF_TRUSTZONE_NONSECURE)
3703 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
3704 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
3705 #else
3706 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
3707 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
3708 #endif
3709 #endif
3710 #endif
3711 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3712 #if defined (NRF_APPLICATION)
3713 if (var1 == 0x07)
3714 {
3715 switch(var2)
3716 {
3717 case 0x02ul:
3718 return true;
3719 case 0x03ul:
3720 return false;
3721 case 0x04ul:
3722 return false;
3723 case 0x05ul:
3724 return false;
3725 default:
3726 return false;
3727 }
3728 }
3729 #endif
3730 #endif
3731 return false;
3732 #endif
3733 }
3734
3735 /* ========= Errata 81 ========= */
3736 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3737 #if defined(NRF_APPLICATION)
3738 #define NRF53_ERRATA_81_PRESENT 1
3739 #else
3740 #define NRF53_ERRATA_81_PRESENT 0
3741 #endif
3742 #else
3743 #define NRF53_ERRATA_81_PRESENT 0
3744 #endif
3745
3746 #ifndef NRF53_ERRATA_81_ENABLE_WORKAROUND
3747 #define NRF53_ERRATA_81_ENABLE_WORKAROUND NRF53_ERRATA_81_PRESENT
3748 #endif
3749
nrf53_errata_81(void)3750 static bool nrf53_errata_81(void)
3751 {
3752 #ifndef NRF53_SERIES
3753 return false;
3754 #else
3755 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3756 #if defined(NRF_APPLICATION)
3757 #if defined(NRF_TRUSTZONE_NONSECURE)
3758 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
3759 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
3760 #else
3761 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
3762 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
3763 #endif
3764 #endif
3765 #endif
3766 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3767 #if defined (NRF_APPLICATION)
3768 if (var1 == 0x07)
3769 {
3770 switch(var2)
3771 {
3772 case 0x02ul:
3773 return true;
3774 case 0x03ul:
3775 return false;
3776 case 0x04ul:
3777 return false;
3778 case 0x05ul:
3779 return false;
3780 default:
3781 return false;
3782 }
3783 }
3784 #endif
3785 #endif
3786 return false;
3787 #endif
3788 }
3789
3790 /* ========= Errata 82 ========= */
3791 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3792 #if defined(NRF_APPLICATION)
3793 #define NRF53_ERRATA_82_PRESENT 1
3794 #else
3795 #define NRF53_ERRATA_82_PRESENT 0
3796 #endif
3797 #else
3798 #define NRF53_ERRATA_82_PRESENT 0
3799 #endif
3800
3801 #ifndef NRF53_ERRATA_82_ENABLE_WORKAROUND
3802 #define NRF53_ERRATA_82_ENABLE_WORKAROUND NRF53_ERRATA_82_PRESENT
3803 #endif
3804
nrf53_errata_82(void)3805 static bool nrf53_errata_82(void)
3806 {
3807 #ifndef NRF53_SERIES
3808 return false;
3809 #else
3810 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3811 #if defined(NRF_APPLICATION)
3812 #if defined(NRF_TRUSTZONE_NONSECURE)
3813 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
3814 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
3815 #else
3816 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
3817 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
3818 #endif
3819 #endif
3820 #endif
3821 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3822 #if defined (NRF_APPLICATION)
3823 if (var1 == 0x07)
3824 {
3825 switch(var2)
3826 {
3827 case 0x02ul:
3828 return true;
3829 case 0x03ul:
3830 return false;
3831 case 0x04ul:
3832 return false;
3833 case 0x05ul:
3834 return false;
3835 default:
3836 return false;
3837 }
3838 }
3839 #endif
3840 #endif
3841 return false;
3842 #endif
3843 }
3844
3845 /* ========= Errata 83 ========= */
3846 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3847 #if defined(NRF_APPLICATION)
3848 #define NRF53_ERRATA_83_PRESENT 1
3849 #else
3850 #define NRF53_ERRATA_83_PRESENT 0
3851 #endif
3852 #else
3853 #define NRF53_ERRATA_83_PRESENT 0
3854 #endif
3855
3856 #ifndef NRF53_ERRATA_83_ENABLE_WORKAROUND
3857 #define NRF53_ERRATA_83_ENABLE_WORKAROUND NRF53_ERRATA_83_PRESENT
3858 #endif
3859
nrf53_errata_83(void)3860 static bool nrf53_errata_83(void)
3861 {
3862 #ifndef NRF53_SERIES
3863 return false;
3864 #else
3865 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3866 #if defined(NRF_APPLICATION)
3867 #if defined(NRF_TRUSTZONE_NONSECURE)
3868 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
3869 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
3870 #else
3871 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
3872 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
3873 #endif
3874 #endif
3875 #endif
3876 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3877 #if defined (NRF_APPLICATION)
3878 if (var1 == 0x07)
3879 {
3880 switch(var2)
3881 {
3882 case 0x02ul:
3883 return true;
3884 case 0x03ul:
3885 return false;
3886 case 0x04ul:
3887 return false;
3888 case 0x05ul:
3889 return false;
3890 default:
3891 return false;
3892 }
3893 }
3894 #endif
3895 #endif
3896 return false;
3897 #endif
3898 }
3899
3900 /* ========= Errata 84 ========= */
3901 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3902 #if defined(NRF_APPLICATION)
3903 #define NRF53_ERRATA_84_PRESENT 1
3904 #else
3905 #define NRF53_ERRATA_84_PRESENT 0
3906 #endif
3907 #else
3908 #define NRF53_ERRATA_84_PRESENT 0
3909 #endif
3910
3911 #ifndef NRF53_ERRATA_84_ENABLE_WORKAROUND
3912 #define NRF53_ERRATA_84_ENABLE_WORKAROUND NRF53_ERRATA_84_PRESENT
3913 #endif
3914
nrf53_errata_84(void)3915 static bool nrf53_errata_84(void)
3916 {
3917 #ifndef NRF53_SERIES
3918 return false;
3919 #else
3920 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3921 #if defined(NRF_APPLICATION)
3922 #if defined(NRF_TRUSTZONE_NONSECURE)
3923 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
3924 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
3925 #else
3926 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
3927 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
3928 #endif
3929 #endif
3930 #endif
3931 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3932 #if defined (NRF_APPLICATION)
3933 if (var1 == 0x07)
3934 {
3935 switch(var2)
3936 {
3937 case 0x02ul:
3938 return true;
3939 case 0x03ul:
3940 return false;
3941 case 0x04ul:
3942 return false;
3943 case 0x05ul:
3944 return false;
3945 default:
3946 return false;
3947 }
3948 }
3949 #endif
3950 #endif
3951 return false;
3952 #endif
3953 }
3954
3955 /* ========= Errata 85 ========= */
3956 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3957 #if defined(NRF_APPLICATION)
3958 #define NRF53_ERRATA_85_PRESENT 1
3959 #else
3960 #define NRF53_ERRATA_85_PRESENT 0
3961 #endif
3962 #else
3963 #define NRF53_ERRATA_85_PRESENT 0
3964 #endif
3965
3966 #ifndef NRF53_ERRATA_85_ENABLE_WORKAROUND
3967 #define NRF53_ERRATA_85_ENABLE_WORKAROUND NRF53_ERRATA_85_PRESENT
3968 #endif
3969
nrf53_errata_85(void)3970 static bool nrf53_errata_85(void)
3971 {
3972 #ifndef NRF53_SERIES
3973 return false;
3974 #else
3975 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3976 #if defined(NRF_APPLICATION)
3977 #if defined(NRF_TRUSTZONE_NONSECURE)
3978 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
3979 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
3980 #else
3981 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
3982 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
3983 #endif
3984 #endif
3985 #endif
3986 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
3987 #if defined (NRF_APPLICATION)
3988 if (var1 == 0x07)
3989 {
3990 switch(var2)
3991 {
3992 case 0x02ul:
3993 return true;
3994 case 0x03ul:
3995 return false;
3996 case 0x04ul:
3997 return false;
3998 case 0x05ul:
3999 return false;
4000 default:
4001 return false;
4002 }
4003 }
4004 #endif
4005 #endif
4006 return false;
4007 #endif
4008 }
4009
4010 /* ========= Errata 86 ========= */
4011 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4012 #if defined(NRF_APPLICATION) || \
4013 defined(NRF_NETWORK)
4014 #define NRF53_ERRATA_86_PRESENT 1
4015 #else
4016 #define NRF53_ERRATA_86_PRESENT 0
4017 #endif
4018 #else
4019 #define NRF53_ERRATA_86_PRESENT 0
4020 #endif
4021
4022 #ifndef NRF53_ERRATA_86_ENABLE_WORKAROUND
4023 #define NRF53_ERRATA_86_ENABLE_WORKAROUND NRF53_ERRATA_86_PRESENT
4024 #endif
4025
nrf53_errata_86(void)4026 static bool nrf53_errata_86(void)
4027 {
4028 #ifndef NRF53_SERIES
4029 return false;
4030 #else
4031 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4032 #if defined(NRF_APPLICATION)
4033 #if defined(NRF_TRUSTZONE_NONSECURE)
4034 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
4035 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
4036 #else
4037 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
4038 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
4039 #endif
4040 #elif defined(NRF_NETWORK)
4041 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
4042 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
4043 #endif
4044 #endif
4045 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4046 #if defined (NRF_APPLICATION)\
4047 || defined (NRF_NETWORK)
4048 if (var1 == 0x07)
4049 {
4050 switch(var2)
4051 {
4052 case 0x02ul:
4053 return true;
4054 case 0x03ul:
4055 return false;
4056 case 0x04ul:
4057 return false;
4058 case 0x05ul:
4059 return false;
4060 default:
4061 return false;
4062 }
4063 }
4064 #endif
4065 #endif
4066 return false;
4067 #endif
4068 }
4069
4070 /* ========= Errata 87 ========= */
4071 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4072 #if defined(NRF_NETWORK)
4073 #define NRF53_ERRATA_87_PRESENT 1
4074 #else
4075 #define NRF53_ERRATA_87_PRESENT 0
4076 #endif
4077 #else
4078 #define NRF53_ERRATA_87_PRESENT 0
4079 #endif
4080
4081 #ifndef NRF53_ERRATA_87_ENABLE_WORKAROUND
4082 #define NRF53_ERRATA_87_ENABLE_WORKAROUND NRF53_ERRATA_87_PRESENT
4083 #endif
4084
nrf53_errata_87(void)4085 static bool nrf53_errata_87(void)
4086 {
4087 #ifndef NRF53_SERIES
4088 return false;
4089 #else
4090 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4091 #if defined(NRF_NETWORK)
4092 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
4093 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
4094 #endif
4095 #endif
4096 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4097 #if defined (NRF_NETWORK)
4098 if (var1 == 0x07)
4099 {
4100 switch(var2)
4101 {
4102 case 0x02ul:
4103 return true;
4104 case 0x03ul:
4105 return true;
4106 case 0x04ul:
4107 return true;
4108 case 0x05ul:
4109 return true;
4110 default:
4111 return true;
4112 }
4113 }
4114 #endif
4115 #endif
4116 return false;
4117 #endif
4118 }
4119
4120 /* ========= Errata 90 ========= */
4121 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4122 #if defined(NRF_APPLICATION)
4123 #define NRF53_ERRATA_90_PRESENT 1
4124 #else
4125 #define NRF53_ERRATA_90_PRESENT 0
4126 #endif
4127 #else
4128 #define NRF53_ERRATA_90_PRESENT 0
4129 #endif
4130
4131 #ifndef NRF53_ERRATA_90_ENABLE_WORKAROUND
4132 #define NRF53_ERRATA_90_ENABLE_WORKAROUND NRF53_ERRATA_90_PRESENT
4133 #endif
4134
nrf53_errata_90(void)4135 static bool nrf53_errata_90(void)
4136 {
4137 #ifndef NRF53_SERIES
4138 return false;
4139 #else
4140 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4141 #if defined(NRF_APPLICATION)
4142 #if defined(NRF_TRUSTZONE_NONSECURE)
4143 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
4144 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
4145 #else
4146 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
4147 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
4148 #endif
4149 #endif
4150 #endif
4151 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4152 #if defined (NRF_APPLICATION)
4153 if (var1 == 0x07)
4154 {
4155 switch(var2)
4156 {
4157 case 0x02ul:
4158 return true;
4159 case 0x03ul:
4160 return false;
4161 case 0x04ul:
4162 return false;
4163 case 0x05ul:
4164 return false;
4165 default:
4166 return false;
4167 }
4168 }
4169 #endif
4170 #endif
4171 return false;
4172 #endif
4173 }
4174
4175 /* ========= Errata 91 ========= */
4176 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4177 #if defined(NRF_NETWORK)
4178 #define NRF53_ERRATA_91_PRESENT 1
4179 #else
4180 #define NRF53_ERRATA_91_PRESENT 0
4181 #endif
4182 #else
4183 #define NRF53_ERRATA_91_PRESENT 0
4184 #endif
4185
4186 #ifndef NRF53_ERRATA_91_ENABLE_WORKAROUND
4187 #define NRF53_ERRATA_91_ENABLE_WORKAROUND NRF53_ERRATA_91_PRESENT
4188 #endif
4189
nrf53_errata_91(void)4190 static bool nrf53_errata_91(void)
4191 {
4192 #ifndef NRF53_SERIES
4193 return false;
4194 #else
4195 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4196 #if defined(NRF_NETWORK)
4197 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
4198 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
4199 #endif
4200 #endif
4201 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4202 #if defined (NRF_NETWORK)
4203 if (var1 == 0x07)
4204 {
4205 switch(var2)
4206 {
4207 case 0x02ul:
4208 return true;
4209 case 0x03ul:
4210 return false;
4211 case 0x04ul:
4212 return false;
4213 case 0x05ul:
4214 return false;
4215 default:
4216 return false;
4217 }
4218 }
4219 #endif
4220 #endif
4221 return false;
4222 #endif
4223 }
4224
4225 /* ========= Errata 93 ========= */
4226 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4227 #if defined(NRF_NETWORK)
4228 #define NRF53_ERRATA_93_PRESENT 1
4229 #else
4230 #define NRF53_ERRATA_93_PRESENT 0
4231 #endif
4232 #else
4233 #define NRF53_ERRATA_93_PRESENT 0
4234 #endif
4235
4236 #ifndef NRF53_ERRATA_93_ENABLE_WORKAROUND
4237 #define NRF53_ERRATA_93_ENABLE_WORKAROUND NRF53_ERRATA_93_PRESENT
4238 #endif
4239
nrf53_errata_93(void)4240 static bool nrf53_errata_93(void)
4241 {
4242 #ifndef NRF53_SERIES
4243 return false;
4244 #else
4245 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4246 #if defined(NRF_NETWORK)
4247 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
4248 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
4249 #endif
4250 #endif
4251 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4252 #if defined (NRF_NETWORK)
4253 if (var1 == 0x07)
4254 {
4255 switch(var2)
4256 {
4257 case 0x02ul:
4258 return true;
4259 case 0x03ul:
4260 return false;
4261 case 0x04ul:
4262 return false;
4263 case 0x05ul:
4264 return false;
4265 default:
4266 return false;
4267 }
4268 }
4269 #endif
4270 #endif
4271 return false;
4272 #endif
4273 }
4274
4275 /* ========= Errata 95 ========= */
4276 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4277 #if defined(NRF_NETWORK)
4278 #define NRF53_ERRATA_95_PRESENT 1
4279 #else
4280 #define NRF53_ERRATA_95_PRESENT 0
4281 #endif
4282 #else
4283 #define NRF53_ERRATA_95_PRESENT 0
4284 #endif
4285
4286 #ifndef NRF53_ERRATA_95_ENABLE_WORKAROUND
4287 #define NRF53_ERRATA_95_ENABLE_WORKAROUND NRF53_ERRATA_95_PRESENT
4288 #endif
4289
nrf53_errata_95(void)4290 static bool nrf53_errata_95(void)
4291 {
4292 #ifndef NRF53_SERIES
4293 return false;
4294 #else
4295 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4296 #if defined(NRF_NETWORK)
4297 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
4298 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
4299 #endif
4300 #endif
4301 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4302 #if defined (NRF_NETWORK)
4303 if (var1 == 0x07)
4304 {
4305 switch(var2)
4306 {
4307 case 0x02ul:
4308 return true;
4309 case 0x03ul:
4310 return false;
4311 case 0x04ul:
4312 return false;
4313 case 0x05ul:
4314 return false;
4315 default:
4316 return false;
4317 }
4318 }
4319 #endif
4320 #endif
4321 return false;
4322 #endif
4323 }
4324
4325 /* ========= Errata 97 ========= */
4326 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4327 #if defined(NRF_APPLICATION) || \
4328 defined(NRF_NETWORK)
4329 #define NRF53_ERRATA_97_PRESENT 1
4330 #else
4331 #define NRF53_ERRATA_97_PRESENT 0
4332 #endif
4333 #else
4334 #define NRF53_ERRATA_97_PRESENT 0
4335 #endif
4336
4337 #ifndef NRF53_ERRATA_97_ENABLE_WORKAROUND
4338 #define NRF53_ERRATA_97_ENABLE_WORKAROUND NRF53_ERRATA_97_PRESENT
4339 #endif
4340
nrf53_errata_97(void)4341 static bool nrf53_errata_97(void)
4342 {
4343 #ifndef NRF53_SERIES
4344 return false;
4345 #else
4346 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4347 #if defined(NRF_APPLICATION)
4348 #if defined(NRF_TRUSTZONE_NONSECURE)
4349 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
4350 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
4351 #else
4352 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
4353 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
4354 #endif
4355 #elif defined(NRF_NETWORK)
4356 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
4357 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
4358 #endif
4359 #endif
4360 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4361 #if defined (NRF_APPLICATION)\
4362 || defined (NRF_NETWORK)
4363 if (var1 == 0x07)
4364 {
4365 switch(var2)
4366 {
4367 case 0x02ul:
4368 return true;
4369 case 0x03ul:
4370 return false;
4371 case 0x04ul:
4372 return false;
4373 case 0x05ul:
4374 return false;
4375 default:
4376 return false;
4377 }
4378 }
4379 #endif
4380 #endif
4381 return false;
4382 #endif
4383 }
4384
4385 /* ========= Errata 99 ========= */
4386 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4387 #if defined(NRF_APPLICATION)
4388 #define NRF53_ERRATA_99_PRESENT 1
4389 #else
4390 #define NRF53_ERRATA_99_PRESENT 0
4391 #endif
4392 #else
4393 #define NRF53_ERRATA_99_PRESENT 0
4394 #endif
4395
4396 #ifndef NRF53_ERRATA_99_ENABLE_WORKAROUND
4397 #define NRF53_ERRATA_99_ENABLE_WORKAROUND NRF53_ERRATA_99_PRESENT
4398 #endif
4399
nrf53_errata_99(void)4400 static bool nrf53_errata_99(void)
4401 {
4402 #ifndef NRF53_SERIES
4403 return false;
4404 #else
4405 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4406 #if defined(NRF_APPLICATION)
4407 #if defined(NRF_TRUSTZONE_NONSECURE)
4408 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
4409 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
4410 #else
4411 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
4412 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
4413 #endif
4414 #endif
4415 #endif
4416 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4417 #if defined (NRF_APPLICATION)
4418 if (var1 == 0x07)
4419 {
4420 switch(var2)
4421 {
4422 case 0x02ul:
4423 return false;
4424 case 0x03ul:
4425 return true;
4426 case 0x04ul:
4427 return true;
4428 case 0x05ul:
4429 return true;
4430 default:
4431 return true;
4432 }
4433 }
4434 #endif
4435 #endif
4436 return false;
4437 #endif
4438 }
4439
4440 /* ========= Errata 103 ========= */
4441 #define NRF53_ERRATA_103_PRESENT 0
4442
4443 #ifndef NRF53_ERRATA_103_ENABLE_WORKAROUND
4444 #define NRF53_ERRATA_103_ENABLE_WORKAROUND NRF53_ERRATA_103_PRESENT
4445 #endif
4446
nrf53_errata_103(void)4447 static bool nrf53_errata_103(void)
4448 {
4449 #ifndef NRF53_SERIES
4450 return false;
4451 #else
4452 return false;
4453 #endif
4454 }
4455
4456 /* ========= Errata 105 ========= */
4457 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4458 #if defined(NRF_APPLICATION)
4459 #define NRF53_ERRATA_105_PRESENT 1
4460 #else
4461 #define NRF53_ERRATA_105_PRESENT 0
4462 #endif
4463 #else
4464 #define NRF53_ERRATA_105_PRESENT 0
4465 #endif
4466
4467 #ifndef NRF53_ERRATA_105_ENABLE_WORKAROUND
4468 #define NRF53_ERRATA_105_ENABLE_WORKAROUND NRF53_ERRATA_105_PRESENT
4469 #endif
4470
nrf53_errata_105(void)4471 static bool nrf53_errata_105(void)
4472 {
4473 #ifndef NRF53_SERIES
4474 return false;
4475 #else
4476 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4477 #if defined(NRF_APPLICATION)
4478 #if defined(NRF_TRUSTZONE_NONSECURE)
4479 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
4480 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
4481 #else
4482 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
4483 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
4484 #endif
4485 #endif
4486 #endif
4487 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4488 #if defined (NRF_APPLICATION)
4489 if (var1 == 0x07)
4490 {
4491 switch(var2)
4492 {
4493 case 0x02ul:
4494 return true;
4495 case 0x03ul:
4496 return false;
4497 case 0x04ul:
4498 return false;
4499 case 0x05ul:
4500 return false;
4501 default:
4502 return false;
4503 }
4504 }
4505 #endif
4506 #endif
4507 return false;
4508 #endif
4509 }
4510
4511 /* ========= Errata 106 ========= */
4512 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4513 #if defined(NRF_APPLICATION)
4514 #define NRF53_ERRATA_106_PRESENT 1
4515 #else
4516 #define NRF53_ERRATA_106_PRESENT 0
4517 #endif
4518 #else
4519 #define NRF53_ERRATA_106_PRESENT 0
4520 #endif
4521
4522 #ifndef NRF53_ERRATA_106_ENABLE_WORKAROUND
4523 #define NRF53_ERRATA_106_ENABLE_WORKAROUND NRF53_ERRATA_106_PRESENT
4524 #endif
4525
nrf53_errata_106(void)4526 static bool nrf53_errata_106(void)
4527 {
4528 #ifndef NRF53_SERIES
4529 return false;
4530 #else
4531 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4532 #if defined(NRF_APPLICATION)
4533 #if defined(NRF_TRUSTZONE_NONSECURE)
4534 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
4535 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
4536 #else
4537 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
4538 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
4539 #endif
4540 #endif
4541 #endif
4542 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4543 #if defined (NRF_APPLICATION)
4544 if (var1 == 0x07)
4545 {
4546 switch(var2)
4547 {
4548 case 0x02ul:
4549 return true;
4550 case 0x03ul:
4551 return false;
4552 case 0x04ul:
4553 return false;
4554 case 0x05ul:
4555 return false;
4556 default:
4557 return false;
4558 }
4559 }
4560 #endif
4561 #endif
4562 return false;
4563 #endif
4564 }
4565
4566 /* ========= Errata 107 ========= */
4567 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4568 #if defined(NRF_APPLICATION)
4569 #define NRF53_ERRATA_107_PRESENT 1
4570 #else
4571 #define NRF53_ERRATA_107_PRESENT 0
4572 #endif
4573 #else
4574 #define NRF53_ERRATA_107_PRESENT 0
4575 #endif
4576
4577 #ifndef NRF53_ERRATA_107_ENABLE_WORKAROUND
4578 #define NRF53_ERRATA_107_ENABLE_WORKAROUND NRF53_ERRATA_107_PRESENT
4579 #endif
4580
nrf53_errata_107(void)4581 static bool nrf53_errata_107(void)
4582 {
4583 #ifndef NRF53_SERIES
4584 return false;
4585 #else
4586 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4587 #if defined(NRF_APPLICATION)
4588 #if defined(NRF_TRUSTZONE_NONSECURE)
4589 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
4590 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
4591 #else
4592 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
4593 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
4594 #endif
4595 #endif
4596 #endif
4597 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4598 #if defined (NRF_APPLICATION)
4599 if (var1 == 0x07)
4600 {
4601 switch(var2)
4602 {
4603 case 0x02ul:
4604 return false;
4605 case 0x03ul:
4606 return true;
4607 case 0x04ul:
4608 return false;
4609 case 0x05ul:
4610 return false;
4611 default:
4612 return false;
4613 }
4614 }
4615 #endif
4616 #endif
4617 return false;
4618 #endif
4619 }
4620
4621 /* ========= Errata 109 ========= */
4622 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4623 #if defined(NRF_APPLICATION)
4624 #define NRF53_ERRATA_109_PRESENT 1
4625 #else
4626 #define NRF53_ERRATA_109_PRESENT 0
4627 #endif
4628 #else
4629 #define NRF53_ERRATA_109_PRESENT 0
4630 #endif
4631
4632 #ifndef NRF53_ERRATA_109_ENABLE_WORKAROUND
4633 #define NRF53_ERRATA_109_ENABLE_WORKAROUND NRF53_ERRATA_109_PRESENT
4634 #endif
4635
nrf53_errata_109(void)4636 static bool nrf53_errata_109(void)
4637 {
4638 #ifndef NRF53_SERIES
4639 return false;
4640 #else
4641 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4642 #if defined(NRF_APPLICATION)
4643 #if defined(NRF_TRUSTZONE_NONSECURE)
4644 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
4645 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
4646 #else
4647 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
4648 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
4649 #endif
4650 #endif
4651 #endif
4652 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4653 #if defined (NRF_APPLICATION)
4654 if (var1 == 0x07)
4655 {
4656 switch(var2)
4657 {
4658 case 0x02ul:
4659 return true;
4660 case 0x03ul:
4661 return false;
4662 case 0x04ul:
4663 return false;
4664 case 0x05ul:
4665 return false;
4666 default:
4667 return false;
4668 }
4669 }
4670 #endif
4671 #endif
4672 return false;
4673 #endif
4674 }
4675
4676 /* ========= Errata 110 ========= */
4677 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4678 #if defined(NRF_APPLICATION)
4679 #define NRF53_ERRATA_110_PRESENT 1
4680 #else
4681 #define NRF53_ERRATA_110_PRESENT 0
4682 #endif
4683 #else
4684 #define NRF53_ERRATA_110_PRESENT 0
4685 #endif
4686
4687 #ifndef NRF53_ERRATA_110_ENABLE_WORKAROUND
4688 #define NRF53_ERRATA_110_ENABLE_WORKAROUND NRF53_ERRATA_110_PRESENT
4689 #endif
4690
nrf53_errata_110(void)4691 static bool nrf53_errata_110(void)
4692 {
4693 #ifndef NRF53_SERIES
4694 return false;
4695 #else
4696 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4697 #if defined(NRF_APPLICATION)
4698 #if defined(NRF_TRUSTZONE_NONSECURE)
4699 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
4700 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
4701 #else
4702 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
4703 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
4704 #endif
4705 #endif
4706 #endif
4707 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4708 #if defined (NRF_APPLICATION)
4709 if (var1 == 0x07)
4710 {
4711 switch(var2)
4712 {
4713 case 0x02ul:
4714 return true;
4715 case 0x03ul:
4716 return false;
4717 case 0x04ul:
4718 return false;
4719 case 0x05ul:
4720 return false;
4721 default:
4722 return false;
4723 }
4724 }
4725 #endif
4726 #endif
4727 return false;
4728 #endif
4729 }
4730
4731 /* ========= Errata 112 ========= */
4732 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4733 #if defined(NRF_APPLICATION)
4734 #define NRF53_ERRATA_112_PRESENT 1
4735 #else
4736 #define NRF53_ERRATA_112_PRESENT 0
4737 #endif
4738 #else
4739 #define NRF53_ERRATA_112_PRESENT 0
4740 #endif
4741
4742 #ifndef NRF53_ERRATA_112_ENABLE_WORKAROUND
4743 #define NRF53_ERRATA_112_ENABLE_WORKAROUND NRF53_ERRATA_112_PRESENT
4744 #endif
4745
nrf53_errata_112(void)4746 static bool nrf53_errata_112(void)
4747 {
4748 #ifndef NRF53_SERIES
4749 return false;
4750 #else
4751 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4752 #if defined(NRF_APPLICATION)
4753 #if defined(NRF_TRUSTZONE_NONSECURE)
4754 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
4755 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
4756 #else
4757 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
4758 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
4759 #endif
4760 #endif
4761 #endif
4762 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4763 #if defined (NRF_APPLICATION)
4764 if (var1 == 0x07)
4765 {
4766 switch(var2)
4767 {
4768 case 0x02ul:
4769 return false;
4770 case 0x03ul:
4771 return true;
4772 case 0x04ul:
4773 return true;
4774 case 0x05ul:
4775 return true;
4776 default:
4777 return true;
4778 }
4779 }
4780 #endif
4781 #endif
4782 return false;
4783 #endif
4784 }
4785
4786 /* ========= Errata 113 ========= */
4787 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4788 #if defined(NRF_NETWORK)
4789 #define NRF53_ERRATA_113_PRESENT 1
4790 #else
4791 #define NRF53_ERRATA_113_PRESENT 0
4792 #endif
4793 #else
4794 #define NRF53_ERRATA_113_PRESENT 0
4795 #endif
4796
4797 #ifndef NRF53_ERRATA_113_ENABLE_WORKAROUND
4798 #define NRF53_ERRATA_113_ENABLE_WORKAROUND NRF53_ERRATA_113_PRESENT
4799 #endif
4800
nrf53_errata_113(void)4801 static bool nrf53_errata_113(void)
4802 {
4803 #ifndef NRF53_SERIES
4804 return false;
4805 #else
4806 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4807 #if defined(NRF_NETWORK)
4808 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
4809 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
4810 #endif
4811 #endif
4812 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4813 #if defined (NRF_NETWORK)
4814 if (var1 == 0x07)
4815 {
4816 switch(var2)
4817 {
4818 case 0x02ul:
4819 return true;
4820 case 0x03ul:
4821 return true;
4822 case 0x04ul:
4823 return true;
4824 case 0x05ul:
4825 return true;
4826 default:
4827 return true;
4828 }
4829 }
4830 #endif
4831 #endif
4832 return false;
4833 #endif
4834 }
4835
4836 /* ========= Errata 114 ========= */
4837 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4838 #if defined(NRF_NETWORK)
4839 #define NRF53_ERRATA_114_PRESENT 1
4840 #else
4841 #define NRF53_ERRATA_114_PRESENT 0
4842 #endif
4843 #else
4844 #define NRF53_ERRATA_114_PRESENT 0
4845 #endif
4846
4847 #ifndef NRF53_ERRATA_114_ENABLE_WORKAROUND
4848 #define NRF53_ERRATA_114_ENABLE_WORKAROUND NRF53_ERRATA_114_PRESENT
4849 #endif
4850
nrf53_errata_114(void)4851 static bool nrf53_errata_114(void)
4852 {
4853 #ifndef NRF53_SERIES
4854 return false;
4855 #else
4856 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4857 #if defined(NRF_NETWORK)
4858 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
4859 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
4860 #endif
4861 #endif
4862 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4863 #if defined (NRF_NETWORK)
4864 if (var1 == 0x07)
4865 {
4866 switch(var2)
4867 {
4868 case 0x02ul:
4869 return true;
4870 case 0x03ul:
4871 return false;
4872 case 0x04ul:
4873 return false;
4874 case 0x05ul:
4875 return false;
4876 default:
4877 return false;
4878 }
4879 }
4880 #endif
4881 #endif
4882 return false;
4883 #endif
4884 }
4885
4886 /* ========= Errata 115 ========= */
4887 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4888 #if defined(NRF_APPLICATION)
4889 #define NRF53_ERRATA_115_PRESENT 1
4890 #else
4891 #define NRF53_ERRATA_115_PRESENT 0
4892 #endif
4893 #else
4894 #define NRF53_ERRATA_115_PRESENT 0
4895 #endif
4896
4897 #ifndef NRF53_ERRATA_115_ENABLE_WORKAROUND
4898 #define NRF53_ERRATA_115_ENABLE_WORKAROUND NRF53_ERRATA_115_PRESENT
4899 #endif
4900
nrf53_errata_115(void)4901 static bool nrf53_errata_115(void)
4902 {
4903 #ifndef NRF53_SERIES
4904 return false;
4905 #else
4906 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4907 #if defined(NRF_APPLICATION)
4908 #if defined(NRF_TRUSTZONE_NONSECURE)
4909 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
4910 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
4911 #else
4912 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
4913 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
4914 #endif
4915 #endif
4916 #endif
4917 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4918 #if defined (NRF_APPLICATION)
4919 if (var1 == 0x07)
4920 {
4921 switch(var2)
4922 {
4923 case 0x02ul:
4924 return true;
4925 case 0x03ul:
4926 return false;
4927 case 0x04ul:
4928 return false;
4929 case 0x05ul:
4930 return false;
4931 default:
4932 return false;
4933 }
4934 }
4935 #endif
4936 #endif
4937 return false;
4938 #endif
4939 }
4940
4941 /* ========= Errata 116 ========= */
4942 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4943 #if defined(NRF_NETWORK)
4944 #define NRF53_ERRATA_116_PRESENT 1
4945 #else
4946 #define NRF53_ERRATA_116_PRESENT 0
4947 #endif
4948 #else
4949 #define NRF53_ERRATA_116_PRESENT 0
4950 #endif
4951
4952 #ifndef NRF53_ERRATA_116_ENABLE_WORKAROUND
4953 #define NRF53_ERRATA_116_ENABLE_WORKAROUND NRF53_ERRATA_116_PRESENT
4954 #endif
4955
nrf53_errata_116(void)4956 static bool nrf53_errata_116(void)
4957 {
4958 #ifndef NRF53_SERIES
4959 return false;
4960 #else
4961 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4962 #if defined(NRF_NETWORK)
4963 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
4964 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
4965 #endif
4966 #endif
4967 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4968 #if defined (NRF_NETWORK)
4969 if (var1 == 0x07)
4970 {
4971 switch(var2)
4972 {
4973 case 0x02ul:
4974 return true;
4975 case 0x03ul:
4976 return false;
4977 case 0x04ul:
4978 return false;
4979 case 0x05ul:
4980 return false;
4981 default:
4982 return false;
4983 }
4984 }
4985 #endif
4986 #endif
4987 return false;
4988 #endif
4989 }
4990
4991 /* ========= Errata 117 ========= */
4992 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
4993 #if defined(NRF_NETWORK)
4994 #define NRF53_ERRATA_117_PRESENT 1
4995 #else
4996 #define NRF53_ERRATA_117_PRESENT 0
4997 #endif
4998 #else
4999 #define NRF53_ERRATA_117_PRESENT 0
5000 #endif
5001
5002 #ifndef NRF53_ERRATA_117_ENABLE_WORKAROUND
5003 #define NRF53_ERRATA_117_ENABLE_WORKAROUND NRF53_ERRATA_117_PRESENT
5004 #endif
5005
nrf53_errata_117(void)5006 static bool nrf53_errata_117(void)
5007 {
5008 #ifndef NRF53_SERIES
5009 return false;
5010 #else
5011 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5012 #if defined(NRF_NETWORK)
5013 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
5014 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
5015 #endif
5016 #endif
5017 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5018 #if defined (NRF_NETWORK)
5019 if (var1 == 0x07)
5020 {
5021 switch(var2)
5022 {
5023 case 0x02ul:
5024 return true;
5025 case 0x03ul:
5026 return true;
5027 case 0x04ul:
5028 return true;
5029 case 0x05ul:
5030 return true;
5031 default:
5032 return true;
5033 }
5034 }
5035 #endif
5036 #endif
5037 return false;
5038 #endif
5039 }
5040
5041 /* ========= Errata 119 ========= */
5042 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5043 #if defined(NRF_NETWORK)
5044 #define NRF53_ERRATA_119_PRESENT 1
5045 #else
5046 #define NRF53_ERRATA_119_PRESENT 0
5047 #endif
5048 #else
5049 #define NRF53_ERRATA_119_PRESENT 0
5050 #endif
5051
5052 #ifndef NRF53_ERRATA_119_ENABLE_WORKAROUND
5053 #define NRF53_ERRATA_119_ENABLE_WORKAROUND NRF53_ERRATA_119_PRESENT
5054 #endif
5055
nrf53_errata_119(void)5056 static bool nrf53_errata_119(void)
5057 {
5058 #ifndef NRF53_SERIES
5059 return false;
5060 #else
5061 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5062 #if defined(NRF_NETWORK)
5063 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
5064 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
5065 #endif
5066 #endif
5067 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5068 #if defined (NRF_NETWORK)
5069 if (var1 == 0x07)
5070 {
5071 switch(var2)
5072 {
5073 case 0x02ul:
5074 return true;
5075 case 0x03ul:
5076 return true;
5077 case 0x04ul:
5078 return true;
5079 case 0x05ul:
5080 return true;
5081 default:
5082 return true;
5083 }
5084 }
5085 #endif
5086 #endif
5087 return false;
5088 #endif
5089 }
5090
5091 /* ========= Errata 121 ========= */
5092 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5093 #if defined(NRF_APPLICATION)
5094 #define NRF53_ERRATA_121_PRESENT 1
5095 #else
5096 #define NRF53_ERRATA_121_PRESENT 0
5097 #endif
5098 #else
5099 #define NRF53_ERRATA_121_PRESENT 0
5100 #endif
5101
5102 #ifndef NRF53_ERRATA_121_ENABLE_WORKAROUND
5103 #define NRF53_ERRATA_121_ENABLE_WORKAROUND NRF53_ERRATA_121_PRESENT
5104 #endif
5105
nrf53_errata_121(void)5106 static bool nrf53_errata_121(void)
5107 {
5108 #ifndef NRF53_SERIES
5109 return false;
5110 #else
5111 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5112 #if defined(NRF_APPLICATION)
5113 #if defined(NRF_TRUSTZONE_NONSECURE)
5114 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
5115 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
5116 #else
5117 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
5118 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
5119 #endif
5120 #endif
5121 #endif
5122 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5123 #if defined (NRF_APPLICATION)
5124 if (var1 == 0x07)
5125 {
5126 switch(var2)
5127 {
5128 case 0x02ul:
5129 return false;
5130 case 0x03ul:
5131 return true;
5132 case 0x04ul:
5133 return true;
5134 case 0x05ul:
5135 return true;
5136 default:
5137 return true;
5138 }
5139 }
5140 #endif
5141 #endif
5142 return false;
5143 #endif
5144 }
5145
5146 /* ========= Errata 122 ========= */
5147 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5148 #if defined(NRF_NETWORK)
5149 #define NRF53_ERRATA_122_PRESENT 1
5150 #else
5151 #define NRF53_ERRATA_122_PRESENT 0
5152 #endif
5153 #else
5154 #define NRF53_ERRATA_122_PRESENT 0
5155 #endif
5156
5157 #ifndef NRF53_ERRATA_122_ENABLE_WORKAROUND
5158 #define NRF53_ERRATA_122_ENABLE_WORKAROUND NRF53_ERRATA_122_PRESENT
5159 #endif
5160
nrf53_errata_122(void)5161 static bool nrf53_errata_122(void)
5162 {
5163 #ifndef NRF53_SERIES
5164 return false;
5165 #else
5166 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5167 #if defined(NRF_NETWORK)
5168 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
5169 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
5170 #endif
5171 #endif
5172 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5173 #if defined (NRF_NETWORK)
5174 if (var1 == 0x07)
5175 {
5176 switch(var2)
5177 {
5178 case 0x02ul:
5179 return false;
5180 case 0x03ul:
5181 return false;
5182 case 0x04ul:
5183 return true;
5184 case 0x05ul:
5185 return true;
5186 default:
5187 return true;
5188 }
5189 }
5190 #endif
5191 #endif
5192 return false;
5193 #endif
5194 }
5195
5196 /* ========= Errata 133 ========= */
5197 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5198 #if defined(NRF_APPLICATION)
5199 #define NRF53_ERRATA_133_PRESENT 1
5200 #else
5201 #define NRF53_ERRATA_133_PRESENT 0
5202 #endif
5203 #else
5204 #define NRF53_ERRATA_133_PRESENT 0
5205 #endif
5206
5207 #ifndef NRF53_ERRATA_133_ENABLE_WORKAROUND
5208 #define NRF53_ERRATA_133_ENABLE_WORKAROUND NRF53_ERRATA_133_PRESENT
5209 #endif
5210
nrf53_errata_133(void)5211 static bool nrf53_errata_133(void)
5212 {
5213 #ifndef NRF53_SERIES
5214 return false;
5215 #else
5216 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5217 #if defined(NRF_APPLICATION)
5218 #if defined(NRF_TRUSTZONE_NONSECURE)
5219 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
5220 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
5221 #else
5222 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
5223 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
5224 #endif
5225 #endif
5226 #endif
5227 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5228 #if defined (NRF_APPLICATION)
5229 if (var1 == 0x07)
5230 {
5231 switch(var2)
5232 {
5233 case 0x02ul:
5234 return false;
5235 case 0x03ul:
5236 return false;
5237 case 0x04ul:
5238 return false;
5239 case 0x05ul:
5240 return true;
5241 default:
5242 return true;
5243 }
5244 }
5245 #endif
5246 #endif
5247 return false;
5248 #endif
5249 }
5250
5251 /* ========= Errata 134 ========= */
5252 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5253 #if defined(NRF_NETWORK)
5254 #define NRF53_ERRATA_134_PRESENT 1
5255 #else
5256 #define NRF53_ERRATA_134_PRESENT 0
5257 #endif
5258 #else
5259 #define NRF53_ERRATA_134_PRESENT 0
5260 #endif
5261
5262 #ifndef NRF53_ERRATA_134_ENABLE_WORKAROUND
5263 #define NRF53_ERRATA_134_ENABLE_WORKAROUND NRF53_ERRATA_134_PRESENT
5264 #endif
5265
nrf53_errata_134(void)5266 static bool nrf53_errata_134(void)
5267 {
5268 #ifndef NRF53_SERIES
5269 return false;
5270 #else
5271 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5272 #if defined(NRF_NETWORK)
5273 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
5274 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
5275 #endif
5276 #endif
5277 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5278 #if defined (NRF_NETWORK)
5279 if (var1 == 0x07)
5280 {
5281 switch(var2)
5282 {
5283 case 0x02ul:
5284 return false;
5285 case 0x03ul:
5286 return false;
5287 case 0x04ul:
5288 return false;
5289 case 0x05ul:
5290 return true;
5291 default:
5292 return true;
5293 }
5294 }
5295 #endif
5296 #endif
5297 return false;
5298 #endif
5299 }
5300
5301 /* ========= Errata 135 ========= */
5302 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5303 #if defined(NRF_APPLICATION) || \
5304 defined(NRF_NETWORK)
5305 #define NRF53_ERRATA_135_PRESENT 1
5306 #else
5307 #define NRF53_ERRATA_135_PRESENT 0
5308 #endif
5309 #else
5310 #define NRF53_ERRATA_135_PRESENT 0
5311 #endif
5312
5313 #ifndef NRF53_ERRATA_135_ENABLE_WORKAROUND
5314 #define NRF53_ERRATA_135_ENABLE_WORKAROUND NRF53_ERRATA_135_PRESENT
5315 #endif
5316
nrf53_errata_135(void)5317 static bool nrf53_errata_135(void)
5318 {
5319 #ifndef NRF53_SERIES
5320 return false;
5321 #else
5322 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5323 #if defined(NRF_APPLICATION)
5324 #if defined(NRF_TRUSTZONE_NONSECURE)
5325 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
5326 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
5327 #else
5328 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
5329 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
5330 #endif
5331 #elif defined(NRF_NETWORK)
5332 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
5333 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
5334 #endif
5335 #endif
5336 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5337 #if defined (NRF_APPLICATION)\
5338 || defined (NRF_NETWORK)
5339 if (var1 == 0x07)
5340 {
5341 switch(var2)
5342 {
5343 case 0x02ul:
5344 return false;
5345 case 0x03ul:
5346 return false;
5347 case 0x04ul:
5348 return false;
5349 case 0x05ul:
5350 return true;
5351 default:
5352 return true;
5353 }
5354 }
5355 #endif
5356 #endif
5357 return false;
5358 #endif
5359 }
5360
5361 /* ========= Errata 136 ========= */
5362 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5363 #if defined(NRF_APPLICATION)
5364 #define NRF53_ERRATA_136_PRESENT 1
5365 #else
5366 #define NRF53_ERRATA_136_PRESENT 0
5367 #endif
5368 #else
5369 #define NRF53_ERRATA_136_PRESENT 0
5370 #endif
5371
5372 #ifndef NRF53_ERRATA_136_ENABLE_WORKAROUND
5373 #define NRF53_ERRATA_136_ENABLE_WORKAROUND NRF53_ERRATA_136_PRESENT
5374 #endif
5375
nrf53_errata_136(void)5376 static bool nrf53_errata_136(void)
5377 {
5378 #ifndef NRF53_SERIES
5379 return false;
5380 #else
5381 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5382 #if defined(NRF_APPLICATION)
5383 #if defined(NRF_TRUSTZONE_NONSECURE)
5384 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
5385 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
5386 #else
5387 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
5388 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
5389 #endif
5390 #endif
5391 #endif
5392 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5393 #if defined (NRF_APPLICATION)
5394 if (var1 == 0x07)
5395 {
5396 switch(var2)
5397 {
5398 case 0x02ul:
5399 return false;
5400 case 0x03ul:
5401 return false;
5402 case 0x04ul:
5403 return false;
5404 case 0x05ul:
5405 return true;
5406 default:
5407 return true;
5408 }
5409 }
5410 #endif
5411 #endif
5412 return false;
5413 #endif
5414 }
5415
5416 /* ========= Errata 137 ========= */
5417 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5418 #if defined(NRF_APPLICATION) || \
5419 defined(NRF_NETWORK)
5420 #define NRF53_ERRATA_137_PRESENT 1
5421 #else
5422 #define NRF53_ERRATA_137_PRESENT 0
5423 #endif
5424 #else
5425 #define NRF53_ERRATA_137_PRESENT 0
5426 #endif
5427
5428 #ifndef NRF53_ERRATA_137_ENABLE_WORKAROUND
5429 #define NRF53_ERRATA_137_ENABLE_WORKAROUND NRF53_ERRATA_137_PRESENT
5430 #endif
5431
nrf53_errata_137(void)5432 static bool nrf53_errata_137(void)
5433 {
5434 #ifndef NRF53_SERIES
5435 return false;
5436 #else
5437 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5438 #if defined(NRF_APPLICATION)
5439 #if defined(NRF_TRUSTZONE_NONSECURE)
5440 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
5441 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
5442 #else
5443 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
5444 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
5445 #endif
5446 #elif defined(NRF_NETWORK)
5447 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
5448 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
5449 #endif
5450 #endif
5451 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5452 #if defined (NRF_APPLICATION)\
5453 || defined (NRF_NETWORK)
5454 if (var1 == 0x07)
5455 {
5456 switch(var2)
5457 {
5458 case 0x02ul:
5459 return false;
5460 case 0x03ul:
5461 return false;
5462 case 0x04ul:
5463 return false;
5464 case 0x05ul:
5465 return true;
5466 default:
5467 return true;
5468 }
5469 }
5470 #endif
5471 #endif
5472 return false;
5473 #endif
5474 }
5475
5476 /* ========= Errata 138 ========= */
5477 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5478 #if defined(NRF_APPLICATION)
5479 #define NRF53_ERRATA_138_PRESENT 1
5480 #else
5481 #define NRF53_ERRATA_138_PRESENT 0
5482 #endif
5483 #else
5484 #define NRF53_ERRATA_138_PRESENT 0
5485 #endif
5486
5487 #ifndef NRF53_ERRATA_138_ENABLE_WORKAROUND
5488 #define NRF53_ERRATA_138_ENABLE_WORKAROUND NRF53_ERRATA_138_PRESENT
5489 #endif
5490
nrf53_errata_138(void)5491 static bool nrf53_errata_138(void)
5492 {
5493 #ifndef NRF53_SERIES
5494 return false;
5495 #else
5496 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5497 #if defined(NRF_APPLICATION)
5498 #if defined(NRF_TRUSTZONE_NONSECURE)
5499 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
5500 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
5501 #else
5502 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
5503 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
5504 #endif
5505 #endif
5506 #endif
5507 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5508 #if defined (NRF_APPLICATION)
5509 if (var1 == 0x07)
5510 {
5511 switch(var2)
5512 {
5513 case 0x02ul:
5514 return false;
5515 case 0x03ul:
5516 return false;
5517 case 0x04ul:
5518 return false;
5519 case 0x05ul:
5520 return true;
5521 default:
5522 return true;
5523 }
5524 }
5525 #endif
5526 #endif
5527 return false;
5528 #endif
5529 }
5530
5531 /* ========= Errata 140 ========= */
5532 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5533 #if defined(NRF_APPLICATION)
5534 #define NRF53_ERRATA_140_PRESENT 1
5535 #else
5536 #define NRF53_ERRATA_140_PRESENT 0
5537 #endif
5538 #else
5539 #define NRF53_ERRATA_140_PRESENT 0
5540 #endif
5541
5542 #ifndef NRF53_ERRATA_140_ENABLE_WORKAROUND
5543 #define NRF53_ERRATA_140_ENABLE_WORKAROUND NRF53_ERRATA_140_PRESENT
5544 #endif
5545
nrf53_errata_140(void)5546 static bool nrf53_errata_140(void)
5547 {
5548 #ifndef NRF53_SERIES
5549 return false;
5550 #else
5551 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5552 #if defined(NRF_APPLICATION)
5553 #if defined(NRF_TRUSTZONE_NONSECURE)
5554 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
5555 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
5556 #else
5557 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
5558 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
5559 #endif
5560 #endif
5561 #endif
5562 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5563 #if defined (NRF_APPLICATION)
5564 if (var1 == 0x07)
5565 {
5566 switch(var2)
5567 {
5568 case 0x02ul:
5569 return true;
5570 case 0x03ul:
5571 return true;
5572 case 0x04ul:
5573 return true;
5574 case 0x05ul:
5575 return true;
5576 default:
5577 return true;
5578 }
5579 }
5580 #endif
5581 #endif
5582 return false;
5583 #endif
5584 }
5585
5586 /* ========= Errata 152 ========= */
5587 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5588 #if defined(NRF_APPLICATION) || \
5589 defined(NRF_NETWORK)
5590 #define NRF53_ERRATA_152_PRESENT 1
5591 #else
5592 #define NRF53_ERRATA_152_PRESENT 0
5593 #endif
5594 #else
5595 #define NRF53_ERRATA_152_PRESENT 0
5596 #endif
5597
5598 #ifndef NRF53_ERRATA_152_ENABLE_WORKAROUND
5599 #define NRF53_ERRATA_152_ENABLE_WORKAROUND NRF53_ERRATA_152_PRESENT
5600 #endif
5601
nrf53_errata_152(void)5602 static bool nrf53_errata_152(void)
5603 {
5604 #ifndef NRF53_SERIES
5605 return false;
5606 #else
5607 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5608 #if defined(NRF_APPLICATION)
5609 #if defined(NRF_TRUSTZONE_NONSECURE)
5610 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
5611 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
5612 #else
5613 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
5614 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
5615 #endif
5616 #elif defined(NRF_NETWORK)
5617 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
5618 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
5619 #endif
5620 #endif
5621 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5622 #if defined (NRF_APPLICATION)\
5623 || defined (NRF_NETWORK)
5624 if (var1 == 0x07)
5625 {
5626 switch(var2)
5627 {
5628 case 0x02ul:
5629 return false;
5630 case 0x03ul:
5631 return false;
5632 case 0x04ul:
5633 return false;
5634 case 0x05ul:
5635 return true;
5636 default:
5637 return true;
5638 }
5639 }
5640 #endif
5641 #endif
5642 return false;
5643 #endif
5644 }
5645
5646 /* ========= Errata 153 ========= */
5647 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5648 #if defined(NRF_APPLICATION)
5649 #define NRF53_ERRATA_153_PRESENT 1
5650 #else
5651 #define NRF53_ERRATA_153_PRESENT 0
5652 #endif
5653 #else
5654 #define NRF53_ERRATA_153_PRESENT 0
5655 #endif
5656
5657 #ifndef NRF53_ERRATA_153_ENABLE_WORKAROUND
5658 #define NRF53_ERRATA_153_ENABLE_WORKAROUND NRF53_ERRATA_153_PRESENT
5659 #endif
5660
nrf53_errata_153(void)5661 static bool nrf53_errata_153(void)
5662 {
5663 #ifndef NRF53_SERIES
5664 return false;
5665 #else
5666 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5667 #if defined(NRF_APPLICATION)
5668 #if defined(NRF_TRUSTZONE_NONSECURE)
5669 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
5670 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
5671 #else
5672 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
5673 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
5674 #endif
5675 #endif
5676 #endif
5677 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5678 #if defined (NRF_APPLICATION)
5679 if (var1 == 0x07)
5680 {
5681 switch(var2)
5682 {
5683 case 0x02ul:
5684 return false;
5685 case 0x03ul:
5686 return false;
5687 case 0x04ul:
5688 return false;
5689 case 0x05ul:
5690 return true;
5691 default:
5692 return true;
5693 }
5694 }
5695 #endif
5696 #endif
5697 return false;
5698 #endif
5699 }
5700
5701 /* ========= Errata 154 ========= */
5702 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5703 #if defined(NRF_APPLICATION) || \
5704 defined(NRF_NETWORK)
5705 #define NRF53_ERRATA_154_PRESENT 1
5706 #else
5707 #define NRF53_ERRATA_154_PRESENT 0
5708 #endif
5709 #else
5710 #define NRF53_ERRATA_154_PRESENT 0
5711 #endif
5712
5713 #ifndef NRF53_ERRATA_154_ENABLE_WORKAROUND
5714 #define NRF53_ERRATA_154_ENABLE_WORKAROUND NRF53_ERRATA_154_PRESENT
5715 #endif
5716
nrf53_errata_154(void)5717 static bool nrf53_errata_154(void)
5718 {
5719 #ifndef NRF53_SERIES
5720 return false;
5721 #else
5722 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5723 #if defined(NRF_APPLICATION)
5724 #if defined(NRF_TRUSTZONE_NONSECURE)
5725 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
5726 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
5727 #else
5728 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
5729 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
5730 #endif
5731 #elif defined(NRF_NETWORK)
5732 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
5733 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
5734 #endif
5735 #endif
5736 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5737 #if defined (NRF_APPLICATION)\
5738 || defined (NRF_NETWORK)
5739 if (var1 == 0x07)
5740 {
5741 switch(var2)
5742 {
5743 case 0x02ul:
5744 return false;
5745 case 0x03ul:
5746 return false;
5747 case 0x04ul:
5748 return false;
5749 case 0x05ul:
5750 return true;
5751 default:
5752 return true;
5753 }
5754 }
5755 #endif
5756 #endif
5757 return false;
5758 #endif
5759 }
5760
5761 /* ========= Errata 155 ========= */
5762 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5763 #if defined(NRF_NETWORK)
5764 #define NRF53_ERRATA_155_PRESENT 1
5765 #else
5766 #define NRF53_ERRATA_155_PRESENT 0
5767 #endif
5768 #else
5769 #define NRF53_ERRATA_155_PRESENT 0
5770 #endif
5771
5772 #ifndef NRF53_ERRATA_155_ENABLE_WORKAROUND
5773 #define NRF53_ERRATA_155_ENABLE_WORKAROUND NRF53_ERRATA_155_PRESENT
5774 #endif
5775
nrf53_errata_155(void)5776 static bool nrf53_errata_155(void)
5777 {
5778 #ifndef NRF53_SERIES
5779 return false;
5780 #else
5781 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5782 #if defined(NRF_NETWORK)
5783 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
5784 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
5785 #endif
5786 #endif
5787 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5788 #if defined (NRF_NETWORK)
5789 if (var1 == 0x07)
5790 {
5791 switch(var2)
5792 {
5793 case 0x02ul:
5794 return false;
5795 case 0x03ul:
5796 return false;
5797 case 0x04ul:
5798 return false;
5799 case 0x05ul:
5800 return true;
5801 default:
5802 return true;
5803 }
5804 }
5805 #endif
5806 #endif
5807 return false;
5808 #endif
5809 }
5810
5811 /* ========= Errata 157 ========= */
5812 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5813 #if defined(NRF_NETWORK)
5814 #define NRF53_ERRATA_157_PRESENT 1
5815 #else
5816 #define NRF53_ERRATA_157_PRESENT 0
5817 #endif
5818 #else
5819 #define NRF53_ERRATA_157_PRESENT 0
5820 #endif
5821
5822 #ifndef NRF53_ERRATA_157_ENABLE_WORKAROUND
5823 #define NRF53_ERRATA_157_ENABLE_WORKAROUND NRF53_ERRATA_157_PRESENT
5824 #endif
5825
nrf53_errata_157(void)5826 static bool nrf53_errata_157(void)
5827 {
5828 #ifndef NRF53_SERIES
5829 return false;
5830 #else
5831 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5832 #if defined(NRF_NETWORK)
5833 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
5834 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
5835 #endif
5836 #endif
5837 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5838 #if defined (NRF_NETWORK)
5839 if (var1 == 0x07)
5840 {
5841 switch(var2)
5842 {
5843 case 0x02ul:
5844 return false;
5845 case 0x03ul:
5846 return false;
5847 case 0x04ul:
5848 return false;
5849 case 0x05ul:
5850 return true;
5851 default:
5852 return true;
5853 }
5854 }
5855 #endif
5856 #endif
5857 return false;
5858 #endif
5859 }
5860
5861 /* ========= Errata 158 ========= */
5862 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5863 #if defined(NRF_NETWORK)
5864 #define NRF53_ERRATA_158_PRESENT 1
5865 #else
5866 #define NRF53_ERRATA_158_PRESENT 0
5867 #endif
5868 #else
5869 #define NRF53_ERRATA_158_PRESENT 0
5870 #endif
5871
5872 #ifndef NRF53_ERRATA_158_ENABLE_WORKAROUND
5873 #define NRF53_ERRATA_158_ENABLE_WORKAROUND NRF53_ERRATA_158_PRESENT
5874 #endif
5875
nrf53_errata_158(void)5876 static bool nrf53_errata_158(void)
5877 {
5878 #ifndef NRF53_SERIES
5879 return false;
5880 #else
5881 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5882 #if defined(NRF_NETWORK)
5883 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
5884 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
5885 #endif
5886 #endif
5887 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5888 #if defined (NRF_NETWORK)
5889 if (var1 == 0x07)
5890 {
5891 switch(var2)
5892 {
5893 case 0x02ul:
5894 return false;
5895 case 0x03ul:
5896 return false;
5897 case 0x04ul:
5898 return false;
5899 case 0x05ul:
5900 return true;
5901 default:
5902 return true;
5903 }
5904 }
5905 #endif
5906 #endif
5907 return false;
5908 #endif
5909 }
5910
5911 /* ========= Errata 159 ========= */
5912 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5913 #if defined(NRF_APPLICATION)
5914 #define NRF53_ERRATA_159_PRESENT 1
5915 #else
5916 #define NRF53_ERRATA_159_PRESENT 0
5917 #endif
5918 #else
5919 #define NRF53_ERRATA_159_PRESENT 0
5920 #endif
5921
5922 #ifndef NRF53_ERRATA_159_ENABLE_WORKAROUND
5923 #define NRF53_ERRATA_159_ENABLE_WORKAROUND NRF53_ERRATA_159_PRESENT
5924 #endif
5925
nrf53_errata_159(void)5926 static bool nrf53_errata_159(void)
5927 {
5928 #ifndef NRF53_SERIES
5929 return false;
5930 #else
5931 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5932 #if defined(NRF_APPLICATION)
5933 #if defined(NRF_TRUSTZONE_NONSECURE)
5934 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
5935 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
5936 #else
5937 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
5938 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
5939 #endif
5940 #endif
5941 #endif
5942 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5943 #if defined (NRF_APPLICATION)
5944 if (var1 == 0x07)
5945 {
5946 switch(var2)
5947 {
5948 case 0x02ul:
5949 return false;
5950 case 0x03ul:
5951 return false;
5952 case 0x04ul:
5953 return false;
5954 case 0x05ul:
5955 return true;
5956 default:
5957 return true;
5958 }
5959 }
5960 #endif
5961 #endif
5962 return false;
5963 #endif
5964 }
5965
5966 /* ========= Errata 160 ========= */
5967 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5968 #if defined(NRF_APPLICATION) || \
5969 defined(NRF_NETWORK)
5970 #define NRF53_ERRATA_160_PRESENT 1
5971 #else
5972 #define NRF53_ERRATA_160_PRESENT 0
5973 #endif
5974 #else
5975 #define NRF53_ERRATA_160_PRESENT 0
5976 #endif
5977
5978 #ifndef NRF53_ERRATA_160_ENABLE_WORKAROUND
5979 #define NRF53_ERRATA_160_ENABLE_WORKAROUND NRF53_ERRATA_160_PRESENT
5980 #endif
5981
nrf53_errata_160(void)5982 static bool nrf53_errata_160(void)
5983 {
5984 #ifndef NRF53_SERIES
5985 return false;
5986 #else
5987 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
5988 #if defined(NRF_APPLICATION)
5989 #if defined(NRF_TRUSTZONE_NONSECURE)
5990 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
5991 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
5992 #else
5993 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
5994 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
5995 #endif
5996 #elif defined(NRF_NETWORK)
5997 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
5998 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
5999 #endif
6000 #endif
6001 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
6002 #if defined (NRF_APPLICATION)\
6003 || defined (NRF_NETWORK)
6004 if (var1 == 0x07)
6005 {
6006 switch(var2)
6007 {
6008 case 0x02ul:
6009 return false;
6010 case 0x03ul:
6011 return false;
6012 case 0x04ul:
6013 return false;
6014 case 0x05ul:
6015 return true;
6016 default:
6017 return true;
6018 }
6019 }
6020 #endif
6021 #endif
6022 return false;
6023 #endif
6024 }
6025
6026 /* ========= Errata 161 ========= */
6027 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
6028 #if defined(NRF_APPLICATION) || \
6029 defined(NRF_NETWORK)
6030 #define NRF53_ERRATA_161_PRESENT 1
6031 #else
6032 #define NRF53_ERRATA_161_PRESENT 0
6033 #endif
6034 #else
6035 #define NRF53_ERRATA_161_PRESENT 0
6036 #endif
6037
6038 #ifndef NRF53_ERRATA_161_ENABLE_WORKAROUND
6039 #define NRF53_ERRATA_161_ENABLE_WORKAROUND NRF53_ERRATA_161_PRESENT
6040 #endif
6041
nrf53_errata_161(void)6042 static bool nrf53_errata_161(void)
6043 {
6044 #ifndef NRF53_SERIES
6045 return false;
6046 #else
6047 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
6048 #if defined(NRF_APPLICATION)
6049 #if defined(NRF_TRUSTZONE_NONSECURE)
6050 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
6051 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
6052 #else
6053 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
6054 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
6055 #endif
6056 #elif defined(NRF_NETWORK)
6057 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
6058 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
6059 #endif
6060 #endif
6061 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
6062 #if defined (NRF_APPLICATION)\
6063 || defined (NRF_NETWORK)
6064 if (var1 == 0x07)
6065 {
6066 switch(var2)
6067 {
6068 case 0x02ul:
6069 return false;
6070 case 0x03ul:
6071 return false;
6072 case 0x04ul:
6073 return false;
6074 case 0x05ul:
6075 return true;
6076 default:
6077 return true;
6078 }
6079 }
6080 #endif
6081 #endif
6082 return false;
6083 #endif
6084 }
6085
6086 /* ========= Errata 162 ========= */
6087 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
6088 #if defined(NRF_APPLICATION) || \
6089 defined(NRF_NETWORK)
6090 #define NRF53_ERRATA_162_PRESENT 1
6091 #else
6092 #define NRF53_ERRATA_162_PRESENT 0
6093 #endif
6094 #else
6095 #define NRF53_ERRATA_162_PRESENT 0
6096 #endif
6097
6098 #ifndef NRF53_ERRATA_162_ENABLE_WORKAROUND
6099 #define NRF53_ERRATA_162_ENABLE_WORKAROUND NRF53_ERRATA_162_PRESENT
6100 #endif
6101
nrf53_errata_162(void)6102 static bool nrf53_errata_162(void)
6103 {
6104 #ifndef NRF53_SERIES
6105 return false;
6106 #else
6107 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
6108 #if defined(NRF_APPLICATION)
6109 #if defined(NRF_TRUSTZONE_NONSECURE)
6110 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
6111 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
6112 #else
6113 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
6114 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
6115 #endif
6116 #elif defined(NRF_NETWORK)
6117 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
6118 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
6119 #endif
6120 #endif
6121 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
6122 #if defined (NRF_APPLICATION)\
6123 || defined (NRF_NETWORK)
6124 if (var1 == 0x07)
6125 {
6126 switch(var2)
6127 {
6128 case 0x02ul:
6129 return false;
6130 case 0x03ul:
6131 return false;
6132 case 0x04ul:
6133 return false;
6134 case 0x05ul:
6135 return true;
6136 default:
6137 return true;
6138 }
6139 }
6140 #endif
6141 #endif
6142 return false;
6143 #endif
6144 }
6145
6146 /* ========= Errata 163 ========= */
6147 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
6148 #if defined(NRF_APPLICATION)
6149 #define NRF53_ERRATA_163_PRESENT 1
6150 #else
6151 #define NRF53_ERRATA_163_PRESENT 0
6152 #endif
6153 #else
6154 #define NRF53_ERRATA_163_PRESENT 0
6155 #endif
6156
6157 #ifndef NRF53_ERRATA_163_ENABLE_WORKAROUND
6158 #define NRF53_ERRATA_163_ENABLE_WORKAROUND NRF53_ERRATA_163_PRESENT
6159 #endif
6160
nrf53_errata_163(void)6161 static bool nrf53_errata_163(void)
6162 {
6163 #ifndef NRF53_SERIES
6164 return false;
6165 #else
6166 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
6167 #if defined(NRF_APPLICATION)
6168 #if defined(NRF_TRUSTZONE_NONSECURE)
6169 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
6170 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
6171 #else
6172 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
6173 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
6174 #endif
6175 #endif
6176 #endif
6177 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
6178 #if defined (NRF_APPLICATION)
6179 if (var1 == 0x07)
6180 {
6181 switch(var2)
6182 {
6183 case 0x02ul:
6184 return false;
6185 case 0x03ul:
6186 return false;
6187 case 0x04ul:
6188 return false;
6189 case 0x05ul:
6190 return true;
6191 default:
6192 return true;
6193 }
6194 }
6195 #endif
6196 #endif
6197 return false;
6198 #endif
6199 }
6200
6201 /* ========= Errata 165 ========= */
6202 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
6203 #if defined(NRF_APPLICATION) || \
6204 defined(NRF_NETWORK)
6205 #define NRF53_ERRATA_165_PRESENT 1
6206 #else
6207 #define NRF53_ERRATA_165_PRESENT 0
6208 #endif
6209 #else
6210 #define NRF53_ERRATA_165_PRESENT 0
6211 #endif
6212
6213 #ifndef NRF53_ERRATA_165_ENABLE_WORKAROUND
6214 #define NRF53_ERRATA_165_ENABLE_WORKAROUND NRF53_ERRATA_165_PRESENT
6215 #endif
6216
nrf53_errata_165(void)6217 static bool nrf53_errata_165(void)
6218 {
6219 #ifndef NRF53_SERIES
6220 return false;
6221 #else
6222 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
6223 #if defined(NRF_APPLICATION)
6224 #if defined(NRF_TRUSTZONE_NONSECURE)
6225 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
6226 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
6227 #else
6228 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
6229 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
6230 #endif
6231 #elif defined(NRF_NETWORK)
6232 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
6233 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
6234 #endif
6235 #endif
6236 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
6237 #if defined (NRF_APPLICATION)\
6238 || defined (NRF_NETWORK)
6239 if (var1 == 0x07)
6240 {
6241 switch(var2)
6242 {
6243 case 0x02ul:
6244 return false;
6245 case 0x03ul:
6246 return false;
6247 case 0x04ul:
6248 return false;
6249 case 0x05ul:
6250 return true;
6251 default:
6252 return true;
6253 }
6254 }
6255 #endif
6256 #endif
6257 return false;
6258 #endif
6259 }
6260
6261 /* ========= Errata 166 ========= */
6262 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
6263 #if defined(NRF_APPLICATION)
6264 #define NRF53_ERRATA_166_PRESENT 1
6265 #else
6266 #define NRF53_ERRATA_166_PRESENT 0
6267 #endif
6268 #else
6269 #define NRF53_ERRATA_166_PRESENT 0
6270 #endif
6271
6272 #ifndef NRF53_ERRATA_166_ENABLE_WORKAROUND
6273 #define NRF53_ERRATA_166_ENABLE_WORKAROUND NRF53_ERRATA_166_PRESENT
6274 #endif
6275
nrf53_errata_166(void)6276 static bool nrf53_errata_166(void)
6277 {
6278 #ifndef NRF53_SERIES
6279 return false;
6280 #else
6281 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
6282 #if defined(NRF_APPLICATION)
6283 #if defined(NRF_TRUSTZONE_NONSECURE)
6284 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
6285 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
6286 #else
6287 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
6288 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
6289 #endif
6290 #endif
6291 #endif
6292 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
6293 #if defined (NRF_APPLICATION)
6294 if (var1 == 0x07)
6295 {
6296 switch(var2)
6297 {
6298 case 0x02ul:
6299 return false;
6300 case 0x03ul:
6301 return false;
6302 case 0x04ul:
6303 return false;
6304 case 0x05ul:
6305 return true;
6306 default:
6307 return true;
6308 }
6309 }
6310 #endif
6311 #endif
6312 return false;
6313 #endif
6314 }
6315
6316 /* ========= Errata 167 ========= */
6317 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
6318 #if defined(NRF_APPLICATION)
6319 #define NRF53_ERRATA_167_PRESENT 1
6320 #else
6321 #define NRF53_ERRATA_167_PRESENT 0
6322 #endif
6323 #else
6324 #define NRF53_ERRATA_167_PRESENT 0
6325 #endif
6326
6327 #ifndef NRF53_ERRATA_167_ENABLE_WORKAROUND
6328 #define NRF53_ERRATA_167_ENABLE_WORKAROUND NRF53_ERRATA_167_PRESENT
6329 #endif
6330
nrf53_errata_167(void)6331 static bool nrf53_errata_167(void)
6332 {
6333 #ifndef NRF53_SERIES
6334 return false;
6335 #else
6336 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
6337 #if defined(NRF_APPLICATION)
6338 #if defined(NRF_TRUSTZONE_NONSECURE)
6339 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
6340 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
6341 #else
6342 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
6343 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
6344 #endif
6345 #endif
6346 #endif
6347 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
6348 #if defined (NRF_APPLICATION)
6349 if (var1 == 0x07)
6350 {
6351 switch(var2)
6352 {
6353 case 0x02ul:
6354 return false;
6355 case 0x03ul:
6356 return false;
6357 case 0x04ul:
6358 return false;
6359 case 0x05ul:
6360 return true;
6361 default:
6362 return true;
6363 }
6364 }
6365 #endif
6366 #endif
6367 return false;
6368 #endif
6369 }
6370
6371 /* ========= Errata 168 ========= */
6372 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
6373 #if defined(NRF_APPLICATION) || \
6374 defined(NRF_NETWORK)
6375 #define NRF53_ERRATA_168_PRESENT 1
6376 #else
6377 #define NRF53_ERRATA_168_PRESENT 0
6378 #endif
6379 #else
6380 #define NRF53_ERRATA_168_PRESENT 0
6381 #endif
6382
6383 #ifndef NRF53_ERRATA_168_ENABLE_WORKAROUND
6384 #define NRF53_ERRATA_168_ENABLE_WORKAROUND NRF53_ERRATA_168_PRESENT
6385 #endif
6386
nrf53_errata_168(void)6387 static bool nrf53_errata_168(void)
6388 {
6389 #ifndef NRF53_SERIES
6390 return false;
6391 #else
6392 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
6393 #if defined(NRF_APPLICATION)
6394 #if defined(NRF_TRUSTZONE_NONSECURE)
6395 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
6396 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
6397 #else
6398 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
6399 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
6400 #endif
6401 #elif defined(NRF_NETWORK)
6402 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
6403 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
6404 #endif
6405 #endif
6406 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
6407 #if defined (NRF_APPLICATION)\
6408 || defined (NRF_NETWORK)
6409 if (var1 == 0x07)
6410 {
6411 switch(var2)
6412 {
6413 case 0x02ul:
6414 return false;
6415 case 0x03ul:
6416 return false;
6417 case 0x04ul:
6418 return false;
6419 case 0x05ul:
6420 return true;
6421 default:
6422 return true;
6423 }
6424 }
6425 #endif
6426 #endif
6427 return false;
6428 #endif
6429 }
6430
6431 /* ========= Errata 169 ========= */
6432 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
6433 #if defined(NRF_APPLICATION) || \
6434 defined(NRF_NETWORK)
6435 #define NRF53_ERRATA_169_PRESENT 1
6436 #else
6437 #define NRF53_ERRATA_169_PRESENT 0
6438 #endif
6439 #else
6440 #define NRF53_ERRATA_169_PRESENT 0
6441 #endif
6442
6443 #ifndef NRF53_ERRATA_169_ENABLE_WORKAROUND
6444 #define NRF53_ERRATA_169_ENABLE_WORKAROUND NRF53_ERRATA_169_PRESENT
6445 #endif
6446
nrf53_errata_169(void)6447 static bool nrf53_errata_169(void)
6448 {
6449 #ifndef NRF53_SERIES
6450 return false;
6451 #else
6452 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
6453 #if defined(NRF_APPLICATION)
6454 #if defined(NRF_TRUSTZONE_NONSECURE)
6455 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000130ul));
6456 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_NS + 0x00000134ul));
6457 #else
6458 uint32_t var1 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000130ul));
6459 uint32_t var2 = *((volatile uint32_t *)((uint32_t)NRF_FICR_S + 0x00000134ul));
6460 #endif
6461 #elif defined(NRF_NETWORK)
6462 uint32_t var1 = *(uint32_t *)0x01FF0130ul;
6463 uint32_t var2 = *(uint32_t *)0x01FF0134ul;
6464 #endif
6465 #endif
6466 #if defined (NRF5340_XXAA) || defined (DEVELOP_IN_NRF5340)
6467 #if defined (NRF_APPLICATION)\
6468 || defined (NRF_NETWORK)
6469 if (var1 == 0x07)
6470 {
6471 switch(var2)
6472 {
6473 case 0x02ul:
6474 return true;
6475 case 0x03ul:
6476 return true;
6477 case 0x04ul:
6478 return true;
6479 case 0x05ul:
6480 return true;
6481 default:
6482 return true;
6483 }
6484 }
6485 #endif
6486 #endif
6487 return false;
6488 #endif
6489 }
6490
6491 #endif /* NRF53_ERRATAS_H */
6492