LCOV - code coverage report
Current view: top level - home/jason/ncs-2.0.0/modules/hal/nordic/nrfx/mdk - nrf53_erratas.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 1206 0.0 %
Date: 2022-08-18 11:36:24 Functions: 0 99 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 504 0.0 %

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

Generated by: LCOV version 1.14