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