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