nrf51_erratas.h 127 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770
  1. #ifndef NRF51_ERRATAS_H
  2. #define NRF51_ERRATAS_H
  3. /*
  4. Copyright (c) 2010 - 2020, Nordic Semiconductor ASA
  5. All rights reserved.
  6. Redistribution and use in source and binary forms, with or without modification,
  7. are permitted provided that the following conditions are met:
  8. 1. Redistributions of source code must retain the above copyright notice, this
  9. list of conditions and the following disclaimer.
  10. 2. Redistributions in binary form, except as embedded into a Nordic
  11. Semiconductor ASA integrated circuit in a product or a software update for
  12. such product, must reproduce the above copyright notice, this list of
  13. conditions and the following disclaimer in the documentation and/or other
  14. materials provided with the distribution.
  15. 3. Neither the name of Nordic Semiconductor ASA nor the names of its
  16. contributors may be used to endorse or promote products derived from this
  17. software without specific prior written permission.
  18. 4. This software, with or without modification, must only be used with a
  19. Nordic Semiconductor ASA integrated circuit.
  20. 5. Any software provided in binary form under this license must not be reverse
  21. engineered, decompiled, modified and/or disassembled.
  22. THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
  23. OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  24. OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
  25. DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
  26. LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  27. CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
  28. GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  29. HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  30. LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  31. OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  32. */
  33. #include <stdint.h>
  34. #include <stdbool.h>
  35. #include "compiler_abstraction.h"
  36. static bool nrf51_errata_1(void) __UNUSED;
  37. static bool nrf51_errata_2(void) __UNUSED;
  38. static bool nrf51_errata_3(void) __UNUSED;
  39. static bool nrf51_errata_4(void) __UNUSED;
  40. static bool nrf51_errata_5(void) __UNUSED;
  41. static bool nrf51_errata_6(void) __UNUSED;
  42. static bool nrf51_errata_7(void) __UNUSED;
  43. static bool nrf51_errata_8(void) __UNUSED;
  44. static bool nrf51_errata_9(void) __UNUSED;
  45. static bool nrf51_errata_10(void) __UNUSED;
  46. static bool nrf51_errata_11(void) __UNUSED;
  47. static bool nrf51_errata_12(void) __UNUSED;
  48. static bool nrf51_errata_13(void) __UNUSED;
  49. static bool nrf51_errata_14(void) __UNUSED;
  50. static bool nrf51_errata_15(void) __UNUSED;
  51. static bool nrf51_errata_16(void) __UNUSED;
  52. static bool nrf51_errata_17(void) __UNUSED;
  53. static bool nrf51_errata_18(void) __UNUSED;
  54. static bool nrf51_errata_19(void) __UNUSED;
  55. static bool nrf51_errata_20(void) __UNUSED;
  56. static bool nrf51_errata_21(void) __UNUSED;
  57. static bool nrf51_errata_22(void) __UNUSED;
  58. static bool nrf51_errata_23(void) __UNUSED;
  59. static bool nrf51_errata_24(void) __UNUSED;
  60. static bool nrf51_errata_25(void) __UNUSED;
  61. static bool nrf51_errata_26(void) __UNUSED;
  62. static bool nrf51_errata_27(void) __UNUSED;
  63. static bool nrf51_errata_28(void) __UNUSED;
  64. static bool nrf51_errata_29(void) __UNUSED;
  65. static bool nrf51_errata_30(void) __UNUSED;
  66. static bool nrf51_errata_31(void) __UNUSED;
  67. static bool nrf51_errata_32(void) __UNUSED;
  68. static bool nrf51_errata_33(void) __UNUSED;
  69. static bool nrf51_errata_34(void) __UNUSED;
  70. static bool nrf51_errata_35(void) __UNUSED;
  71. static bool nrf51_errata_36(void) __UNUSED;
  72. static bool nrf51_errata_37(void) __UNUSED;
  73. static bool nrf51_errata_38(void) __UNUSED;
  74. static bool nrf51_errata_39(void) __UNUSED;
  75. static bool nrf51_errata_40(void) __UNUSED;
  76. static bool nrf51_errata_41(void) __UNUSED;
  77. static bool nrf51_errata_42(void) __UNUSED;
  78. static bool nrf51_errata_43(void) __UNUSED;
  79. static bool nrf51_errata_44(void) __UNUSED;
  80. static bool nrf51_errata_45(void) __UNUSED;
  81. static bool nrf51_errata_46(void) __UNUSED;
  82. static bool nrf51_errata_47(void) __UNUSED;
  83. static bool nrf51_errata_48(void) __UNUSED;
  84. static bool nrf51_errata_49(void) __UNUSED;
  85. static bool nrf51_errata_50(void) __UNUSED;
  86. static bool nrf51_errata_51(void) __UNUSED;
  87. static bool nrf51_errata_52(void) __UNUSED;
  88. static bool nrf51_errata_53(void) __UNUSED;
  89. static bool nrf51_errata_54(void) __UNUSED;
  90. static bool nrf51_errata_55(void) __UNUSED;
  91. static bool nrf51_errata_56(void) __UNUSED;
  92. static bool nrf51_errata_57(void) __UNUSED;
  93. static bool nrf51_errata_58(void) __UNUSED;
  94. static bool nrf51_errata_59(void) __UNUSED;
  95. static bool nrf51_errata_60(void) __UNUSED;
  96. static bool nrf51_errata_61(void) __UNUSED;
  97. static bool nrf51_errata_62(void) __UNUSED;
  98. static bool nrf51_errata_63(void) __UNUSED;
  99. static bool nrf51_errata_64(void) __UNUSED;
  100. static bool nrf51_errata_65(void) __UNUSED;
  101. static bool nrf51_errata_66(void) __UNUSED;
  102. static bool nrf51_errata_67(void) __UNUSED;
  103. static bool nrf51_errata_68(void) __UNUSED;
  104. static bool nrf51_errata_69(void) __UNUSED;
  105. static bool nrf51_errata_70(void) __UNUSED;
  106. static bool nrf51_errata_71(void) __UNUSED;
  107. static bool nrf51_errata_72(void) __UNUSED;
  108. static bool nrf51_errata_73(void) __UNUSED;
  109. static bool nrf51_errata_74(void) __UNUSED;
  110. static bool nrf51_errata_75(void) __UNUSED;
  111. static bool nrf51_errata_76(void) __UNUSED;
  112. static bool nrf51_errata_77(void) __UNUSED;
  113. static bool nrf51_errata_78(void) __UNUSED;
  114. static bool nrf51_errata_1(void)
  115. {
  116. #ifndef NRF51_SERIES
  117. return false;
  118. #else
  119. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  120. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  121. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  122. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  123. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  124. #endif
  125. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  126. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  127. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  128. if (var1 == 0x01)
  129. {
  130. switch(var2)
  131. {
  132. case 0x00ul:
  133. return true;
  134. case 0x01ul:
  135. return true;
  136. case 0x02ul:
  137. return false;
  138. case 0x03ul:
  139. return true;
  140. case 0x04ul:
  141. return false;
  142. case 0x07ul:
  143. return false;
  144. case 0x08ul:
  145. return false;
  146. case 0x09ul:
  147. return false;
  148. case 0x0Aul:
  149. return false;
  150. case 0x0Bul:
  151. return false;
  152. case 0x0Cul:
  153. return false;
  154. case 0x0Dul:
  155. return false;
  156. default:
  157. return false;
  158. }
  159. }
  160. #endif
  161. return false;
  162. #endif
  163. }
  164. static bool nrf51_errata_2(void)
  165. {
  166. #ifndef NRF51_SERIES
  167. return false;
  168. #else
  169. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  170. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  171. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  172. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  173. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  174. #endif
  175. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  176. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  177. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  178. if (var1 == 0x01)
  179. {
  180. switch(var2)
  181. {
  182. case 0x00ul:
  183. return true;
  184. case 0x01ul:
  185. return true;
  186. case 0x02ul:
  187. return false;
  188. case 0x03ul:
  189. return true;
  190. case 0x04ul:
  191. return false;
  192. case 0x07ul:
  193. return false;
  194. case 0x08ul:
  195. return false;
  196. case 0x09ul:
  197. return false;
  198. case 0x0Aul:
  199. return false;
  200. case 0x0Bul:
  201. return false;
  202. case 0x0Cul:
  203. return false;
  204. case 0x0Dul:
  205. return false;
  206. default:
  207. return false;
  208. }
  209. }
  210. #endif
  211. return false;
  212. #endif
  213. }
  214. static bool nrf51_errata_3(void)
  215. {
  216. #ifndef NRF51_SERIES
  217. return false;
  218. #else
  219. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  220. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  221. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  222. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  223. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  224. #endif
  225. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  226. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  227. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  228. if (var1 == 0x01)
  229. {
  230. switch(var2)
  231. {
  232. case 0x00ul:
  233. return true;
  234. case 0x01ul:
  235. return true;
  236. case 0x02ul:
  237. return false;
  238. case 0x03ul:
  239. return true;
  240. case 0x04ul:
  241. return false;
  242. case 0x07ul:
  243. return false;
  244. case 0x08ul:
  245. return false;
  246. case 0x09ul:
  247. return false;
  248. case 0x0Aul:
  249. return false;
  250. case 0x0Bul:
  251. return false;
  252. case 0x0Cul:
  253. return false;
  254. case 0x0Dul:
  255. return false;
  256. default:
  257. return false;
  258. }
  259. }
  260. #endif
  261. return false;
  262. #endif
  263. }
  264. static bool nrf51_errata_4(void)
  265. {
  266. #ifndef NRF51_SERIES
  267. return false;
  268. #else
  269. return false;
  270. #endif
  271. }
  272. static bool nrf51_errata_5(void)
  273. {
  274. #ifndef NRF51_SERIES
  275. return false;
  276. #else
  277. return false;
  278. #endif
  279. }
  280. static bool nrf51_errata_6(void)
  281. {
  282. #ifndef NRF51_SERIES
  283. return false;
  284. #else
  285. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  286. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  287. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  288. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  289. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  290. #endif
  291. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  292. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  293. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  294. if (var1 == 0x01)
  295. {
  296. switch(var2)
  297. {
  298. case 0x00ul:
  299. return true;
  300. case 0x01ul:
  301. return true;
  302. case 0x02ul:
  303. return false;
  304. case 0x03ul:
  305. return true;
  306. case 0x04ul:
  307. return false;
  308. case 0x07ul:
  309. return false;
  310. case 0x08ul:
  311. return false;
  312. case 0x09ul:
  313. return false;
  314. case 0x0Aul:
  315. return false;
  316. case 0x0Bul:
  317. return false;
  318. case 0x0Cul:
  319. return false;
  320. case 0x0Dul:
  321. return false;
  322. default:
  323. return false;
  324. }
  325. }
  326. #endif
  327. return false;
  328. #endif
  329. }
  330. static bool nrf51_errata_7(void)
  331. {
  332. #ifndef NRF51_SERIES
  333. return false;
  334. #else
  335. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  336. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  337. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  338. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  339. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  340. #endif
  341. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  342. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  343. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  344. if (var1 == 0x01)
  345. {
  346. switch(var2)
  347. {
  348. case 0x00ul:
  349. return true;
  350. case 0x01ul:
  351. return true;
  352. case 0x02ul:
  353. return false;
  354. case 0x03ul:
  355. return true;
  356. case 0x04ul:
  357. return false;
  358. case 0x07ul:
  359. return false;
  360. case 0x08ul:
  361. return false;
  362. case 0x09ul:
  363. return false;
  364. case 0x0Aul:
  365. return false;
  366. case 0x0Bul:
  367. return false;
  368. case 0x0Cul:
  369. return false;
  370. case 0x0Dul:
  371. return false;
  372. default:
  373. return false;
  374. }
  375. }
  376. #endif
  377. return false;
  378. #endif
  379. }
  380. static bool nrf51_errata_8(void)
  381. {
  382. #ifndef NRF51_SERIES
  383. return false;
  384. #else
  385. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  386. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  387. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  388. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  389. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  390. #endif
  391. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  392. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  393. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  394. if (var1 == 0x01)
  395. {
  396. switch(var2)
  397. {
  398. case 0x00ul:
  399. return true;
  400. case 0x01ul:
  401. return true;
  402. case 0x02ul:
  403. return false;
  404. case 0x03ul:
  405. return true;
  406. case 0x04ul:
  407. return false;
  408. case 0x07ul:
  409. return false;
  410. case 0x08ul:
  411. return false;
  412. case 0x09ul:
  413. return false;
  414. case 0x0Aul:
  415. return false;
  416. case 0x0Bul:
  417. return false;
  418. case 0x0Cul:
  419. return false;
  420. case 0x0Dul:
  421. return false;
  422. default:
  423. return false;
  424. }
  425. }
  426. #endif
  427. return false;
  428. #endif
  429. }
  430. static bool nrf51_errata_9(void)
  431. {
  432. #ifndef NRF51_SERIES
  433. return false;
  434. #else
  435. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  436. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  437. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  438. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  439. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  440. #endif
  441. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  442. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  443. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  444. if (var1 == 0x01)
  445. {
  446. switch(var2)
  447. {
  448. case 0x00ul:
  449. return true;
  450. case 0x01ul:
  451. return true;
  452. case 0x02ul:
  453. return false;
  454. case 0x03ul:
  455. return true;
  456. case 0x04ul:
  457. return false;
  458. case 0x07ul:
  459. return false;
  460. case 0x08ul:
  461. return false;
  462. case 0x09ul:
  463. return false;
  464. case 0x0Aul:
  465. return false;
  466. case 0x0Bul:
  467. return false;
  468. case 0x0Cul:
  469. return false;
  470. case 0x0Dul:
  471. return false;
  472. default:
  473. return false;
  474. }
  475. }
  476. #endif
  477. return false;
  478. #endif
  479. }
  480. static bool nrf51_errata_10(void)
  481. {
  482. #ifndef NRF51_SERIES
  483. return false;
  484. #else
  485. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  486. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  487. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  488. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  489. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  490. #endif
  491. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  492. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  493. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  494. if (var1 == 0x01)
  495. {
  496. switch(var2)
  497. {
  498. case 0x00ul:
  499. return true;
  500. case 0x01ul:
  501. return true;
  502. case 0x02ul:
  503. return false;
  504. case 0x03ul:
  505. return true;
  506. case 0x04ul:
  507. return false;
  508. case 0x07ul:
  509. return false;
  510. case 0x08ul:
  511. return false;
  512. case 0x09ul:
  513. return false;
  514. case 0x0Aul:
  515. return false;
  516. case 0x0Bul:
  517. return false;
  518. case 0x0Cul:
  519. return false;
  520. case 0x0Dul:
  521. return false;
  522. default:
  523. return false;
  524. }
  525. }
  526. #endif
  527. return false;
  528. #endif
  529. }
  530. static bool nrf51_errata_11(void)
  531. {
  532. #ifndef NRF51_SERIES
  533. return false;
  534. #else
  535. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  536. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  537. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  538. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  539. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  540. #endif
  541. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  542. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  543. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  544. if (var1 == 0x01)
  545. {
  546. switch(var2)
  547. {
  548. case 0x00ul:
  549. return true;
  550. case 0x01ul:
  551. return true;
  552. case 0x02ul:
  553. return false;
  554. case 0x03ul:
  555. return true;
  556. case 0x04ul:
  557. return false;
  558. case 0x07ul:
  559. return false;
  560. case 0x08ul:
  561. return false;
  562. case 0x09ul:
  563. return false;
  564. case 0x0Aul:
  565. return false;
  566. case 0x0Bul:
  567. return false;
  568. case 0x0Cul:
  569. return false;
  570. case 0x0Dul:
  571. return false;
  572. default:
  573. return false;
  574. }
  575. }
  576. #endif
  577. return false;
  578. #endif
  579. }
  580. static bool nrf51_errata_12(void)
  581. {
  582. #ifndef NRF51_SERIES
  583. return false;
  584. #else
  585. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  586. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  587. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  588. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  589. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  590. #endif
  591. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  592. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  593. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  594. if (var1 == 0x01)
  595. {
  596. switch(var2)
  597. {
  598. case 0x00ul:
  599. return true;
  600. case 0x01ul:
  601. return true;
  602. case 0x02ul:
  603. return false;
  604. case 0x03ul:
  605. return true;
  606. case 0x04ul:
  607. return false;
  608. case 0x07ul:
  609. return false;
  610. case 0x08ul:
  611. return false;
  612. case 0x09ul:
  613. return false;
  614. case 0x0Aul:
  615. return false;
  616. case 0x0Bul:
  617. return false;
  618. case 0x0Cul:
  619. return false;
  620. case 0x0Dul:
  621. return false;
  622. default:
  623. return false;
  624. }
  625. }
  626. #endif
  627. return false;
  628. #endif
  629. }
  630. static bool nrf51_errata_13(void)
  631. {
  632. #ifndef NRF51_SERIES
  633. return false;
  634. #else
  635. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  636. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  637. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  638. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  639. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  640. #endif
  641. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  642. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  643. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  644. if (var1 == 0x01)
  645. {
  646. switch(var2)
  647. {
  648. case 0x00ul:
  649. return true;
  650. case 0x01ul:
  651. return true;
  652. case 0x02ul:
  653. return false;
  654. case 0x03ul:
  655. return true;
  656. case 0x04ul:
  657. return false;
  658. case 0x07ul:
  659. return false;
  660. case 0x08ul:
  661. return false;
  662. case 0x09ul:
  663. return false;
  664. case 0x0Aul:
  665. return false;
  666. case 0x0Bul:
  667. return false;
  668. case 0x0Cul:
  669. return false;
  670. case 0x0Dul:
  671. return false;
  672. default:
  673. return false;
  674. }
  675. }
  676. #endif
  677. return false;
  678. #endif
  679. }
  680. static bool nrf51_errata_14(void)
  681. {
  682. #ifndef NRF51_SERIES
  683. return false;
  684. #else
  685. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  686. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  687. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  688. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  689. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  690. #endif
  691. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  692. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  693. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  694. if (var1 == 0x01)
  695. {
  696. switch(var2)
  697. {
  698. case 0x00ul:
  699. return true;
  700. case 0x01ul:
  701. return true;
  702. case 0x02ul:
  703. return false;
  704. case 0x03ul:
  705. return true;
  706. case 0x04ul:
  707. return false;
  708. case 0x07ul:
  709. return false;
  710. case 0x08ul:
  711. return false;
  712. case 0x09ul:
  713. return false;
  714. case 0x0Aul:
  715. return false;
  716. case 0x0Bul:
  717. return false;
  718. case 0x0Cul:
  719. return false;
  720. case 0x0Dul:
  721. return false;
  722. default:
  723. return false;
  724. }
  725. }
  726. #endif
  727. return false;
  728. #endif
  729. }
  730. static bool nrf51_errata_15(void)
  731. {
  732. #ifndef NRF51_SERIES
  733. return false;
  734. #else
  735. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  736. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  737. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  738. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  739. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  740. #endif
  741. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  742. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  743. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  744. if (var1 == 0x01)
  745. {
  746. switch(var2)
  747. {
  748. case 0x00ul:
  749. return true;
  750. case 0x01ul:
  751. return true;
  752. case 0x02ul:
  753. return false;
  754. case 0x03ul:
  755. return true;
  756. case 0x04ul:
  757. return false;
  758. case 0x07ul:
  759. return false;
  760. case 0x08ul:
  761. return false;
  762. case 0x09ul:
  763. return false;
  764. case 0x0Aul:
  765. return false;
  766. case 0x0Bul:
  767. return false;
  768. case 0x0Cul:
  769. return false;
  770. case 0x0Dul:
  771. return false;
  772. default:
  773. return false;
  774. }
  775. }
  776. #endif
  777. return false;
  778. #endif
  779. }
  780. static bool nrf51_errata_16(void)
  781. {
  782. #ifndef NRF51_SERIES
  783. return false;
  784. #else
  785. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  786. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  787. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  788. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  789. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  790. #endif
  791. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  792. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  793. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  794. if (var1 == 0x01)
  795. {
  796. switch(var2)
  797. {
  798. case 0x00ul:
  799. return true;
  800. case 0x01ul:
  801. return true;
  802. case 0x02ul:
  803. return false;
  804. case 0x03ul:
  805. return true;
  806. case 0x04ul:
  807. return false;
  808. case 0x07ul:
  809. return false;
  810. case 0x08ul:
  811. return false;
  812. case 0x09ul:
  813. return false;
  814. case 0x0Aul:
  815. return false;
  816. case 0x0Bul:
  817. return false;
  818. case 0x0Cul:
  819. return false;
  820. case 0x0Dul:
  821. return false;
  822. default:
  823. return false;
  824. }
  825. }
  826. #endif
  827. return false;
  828. #endif
  829. }
  830. static bool nrf51_errata_17(void)
  831. {
  832. #ifndef NRF51_SERIES
  833. return false;
  834. #else
  835. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  836. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  837. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  838. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  839. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  840. #endif
  841. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  842. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  843. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  844. if (var1 == 0x01)
  845. {
  846. switch(var2)
  847. {
  848. case 0x00ul:
  849. return true;
  850. case 0x01ul:
  851. return true;
  852. case 0x02ul:
  853. return false;
  854. case 0x03ul:
  855. return true;
  856. case 0x04ul:
  857. return false;
  858. case 0x07ul:
  859. return false;
  860. case 0x08ul:
  861. return false;
  862. case 0x09ul:
  863. return false;
  864. case 0x0Aul:
  865. return false;
  866. case 0x0Bul:
  867. return false;
  868. case 0x0Cul:
  869. return false;
  870. case 0x0Dul:
  871. return false;
  872. default:
  873. return false;
  874. }
  875. }
  876. #endif
  877. return false;
  878. #endif
  879. }
  880. static bool nrf51_errata_18(void)
  881. {
  882. #ifndef NRF51_SERIES
  883. return false;
  884. #else
  885. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  886. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  887. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  888. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  889. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  890. #endif
  891. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  892. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  893. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  894. if (var1 == 0x01)
  895. {
  896. switch(var2)
  897. {
  898. case 0x00ul:
  899. return true;
  900. case 0x01ul:
  901. return true;
  902. case 0x02ul:
  903. return false;
  904. case 0x03ul:
  905. return true;
  906. case 0x04ul:
  907. return false;
  908. case 0x07ul:
  909. return false;
  910. case 0x08ul:
  911. return false;
  912. case 0x09ul:
  913. return false;
  914. case 0x0Aul:
  915. return false;
  916. case 0x0Bul:
  917. return false;
  918. case 0x0Cul:
  919. return false;
  920. case 0x0Dul:
  921. return false;
  922. default:
  923. return false;
  924. }
  925. }
  926. #endif
  927. return false;
  928. #endif
  929. }
  930. static bool nrf51_errata_19(void)
  931. {
  932. #ifndef NRF51_SERIES
  933. return false;
  934. #else
  935. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  936. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  937. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  938. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  939. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  940. #endif
  941. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  942. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  943. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  944. if (var1 == 0x01)
  945. {
  946. switch(var2)
  947. {
  948. case 0x00ul:
  949. return true;
  950. case 0x01ul:
  951. return true;
  952. case 0x02ul:
  953. return false;
  954. case 0x03ul:
  955. return true;
  956. case 0x04ul:
  957. return false;
  958. case 0x07ul:
  959. return false;
  960. case 0x08ul:
  961. return false;
  962. case 0x09ul:
  963. return false;
  964. case 0x0Aul:
  965. return false;
  966. case 0x0Bul:
  967. return false;
  968. case 0x0Cul:
  969. return false;
  970. case 0x0Dul:
  971. return false;
  972. default:
  973. return false;
  974. }
  975. }
  976. #endif
  977. return false;
  978. #endif
  979. }
  980. static bool nrf51_errata_20(void)
  981. {
  982. #ifndef NRF51_SERIES
  983. return false;
  984. #else
  985. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  986. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  987. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  988. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  989. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  990. #endif
  991. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  992. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  993. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  994. if (var1 == 0x01)
  995. {
  996. switch(var2)
  997. {
  998. case 0x00ul:
  999. return true;
  1000. case 0x01ul:
  1001. return true;
  1002. case 0x02ul:
  1003. return false;
  1004. case 0x03ul:
  1005. return true;
  1006. case 0x04ul:
  1007. return false;
  1008. case 0x07ul:
  1009. return false;
  1010. case 0x08ul:
  1011. return false;
  1012. case 0x09ul:
  1013. return false;
  1014. case 0x0Aul:
  1015. return false;
  1016. case 0x0Bul:
  1017. return false;
  1018. case 0x0Cul:
  1019. return false;
  1020. case 0x0Dul:
  1021. return false;
  1022. default:
  1023. return false;
  1024. }
  1025. }
  1026. #endif
  1027. return false;
  1028. #endif
  1029. }
  1030. static bool nrf51_errata_21(void)
  1031. {
  1032. #ifndef NRF51_SERIES
  1033. return false;
  1034. #else
  1035. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1036. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1037. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1038. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  1039. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  1040. #endif
  1041. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1042. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1043. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1044. if (var1 == 0x01)
  1045. {
  1046. switch(var2)
  1047. {
  1048. case 0x00ul:
  1049. return true;
  1050. case 0x01ul:
  1051. return true;
  1052. case 0x02ul:
  1053. return false;
  1054. case 0x03ul:
  1055. return true;
  1056. case 0x04ul:
  1057. return false;
  1058. case 0x07ul:
  1059. return false;
  1060. case 0x08ul:
  1061. return false;
  1062. case 0x09ul:
  1063. return false;
  1064. case 0x0Aul:
  1065. return false;
  1066. case 0x0Bul:
  1067. return false;
  1068. case 0x0Cul:
  1069. return false;
  1070. case 0x0Dul:
  1071. return false;
  1072. default:
  1073. return false;
  1074. }
  1075. }
  1076. #endif
  1077. return false;
  1078. #endif
  1079. }
  1080. static bool nrf51_errata_22(void)
  1081. {
  1082. #ifndef NRF51_SERIES
  1083. return false;
  1084. #else
  1085. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1086. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1087. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1088. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  1089. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  1090. #endif
  1091. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1092. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1093. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1094. if (var1 == 0x01)
  1095. {
  1096. switch(var2)
  1097. {
  1098. case 0x00ul:
  1099. return true;
  1100. case 0x01ul:
  1101. return true;
  1102. case 0x02ul:
  1103. return false;
  1104. case 0x03ul:
  1105. return true;
  1106. case 0x04ul:
  1107. return false;
  1108. case 0x07ul:
  1109. return false;
  1110. case 0x08ul:
  1111. return false;
  1112. case 0x09ul:
  1113. return false;
  1114. case 0x0Aul:
  1115. return false;
  1116. case 0x0Bul:
  1117. return false;
  1118. case 0x0Cul:
  1119. return false;
  1120. case 0x0Dul:
  1121. return false;
  1122. default:
  1123. return false;
  1124. }
  1125. }
  1126. #endif
  1127. return false;
  1128. #endif
  1129. }
  1130. static bool nrf51_errata_23(void)
  1131. {
  1132. #ifndef NRF51_SERIES
  1133. return false;
  1134. #else
  1135. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1136. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1137. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1138. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  1139. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  1140. #endif
  1141. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1142. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1143. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1144. if (var1 == 0x01)
  1145. {
  1146. switch(var2)
  1147. {
  1148. case 0x00ul:
  1149. return true;
  1150. case 0x01ul:
  1151. return true;
  1152. case 0x02ul:
  1153. return false;
  1154. case 0x03ul:
  1155. return true;
  1156. case 0x04ul:
  1157. return false;
  1158. case 0x07ul:
  1159. return false;
  1160. case 0x08ul:
  1161. return false;
  1162. case 0x09ul:
  1163. return false;
  1164. case 0x0Aul:
  1165. return false;
  1166. case 0x0Bul:
  1167. return false;
  1168. case 0x0Cul:
  1169. return false;
  1170. case 0x0Dul:
  1171. return false;
  1172. default:
  1173. return false;
  1174. }
  1175. }
  1176. #endif
  1177. return false;
  1178. #endif
  1179. }
  1180. static bool nrf51_errata_24(void)
  1181. {
  1182. #ifndef NRF51_SERIES
  1183. return false;
  1184. #else
  1185. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1186. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1187. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1188. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  1189. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  1190. #endif
  1191. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1192. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1193. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1194. if (var1 == 0x01)
  1195. {
  1196. switch(var2)
  1197. {
  1198. case 0x00ul:
  1199. return true;
  1200. case 0x01ul:
  1201. return true;
  1202. case 0x02ul:
  1203. return false;
  1204. case 0x03ul:
  1205. return true;
  1206. case 0x04ul:
  1207. return false;
  1208. case 0x07ul:
  1209. return false;
  1210. case 0x08ul:
  1211. return false;
  1212. case 0x09ul:
  1213. return false;
  1214. case 0x0Aul:
  1215. return false;
  1216. case 0x0Bul:
  1217. return false;
  1218. case 0x0Cul:
  1219. return false;
  1220. case 0x0Dul:
  1221. return false;
  1222. default:
  1223. return false;
  1224. }
  1225. }
  1226. #endif
  1227. return false;
  1228. #endif
  1229. }
  1230. static bool nrf51_errata_25(void)
  1231. {
  1232. #ifndef NRF51_SERIES
  1233. return false;
  1234. #else
  1235. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1236. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1237. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1238. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  1239. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  1240. #endif
  1241. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1242. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1243. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1244. if (var1 == 0x01)
  1245. {
  1246. switch(var2)
  1247. {
  1248. case 0x00ul:
  1249. return true;
  1250. case 0x01ul:
  1251. return true;
  1252. case 0x02ul:
  1253. return false;
  1254. case 0x03ul:
  1255. return true;
  1256. case 0x04ul:
  1257. return false;
  1258. case 0x07ul:
  1259. return false;
  1260. case 0x08ul:
  1261. return false;
  1262. case 0x09ul:
  1263. return false;
  1264. case 0x0Aul:
  1265. return false;
  1266. case 0x0Bul:
  1267. return false;
  1268. case 0x0Cul:
  1269. return false;
  1270. case 0x0Dul:
  1271. return false;
  1272. default:
  1273. return false;
  1274. }
  1275. }
  1276. #endif
  1277. return false;
  1278. #endif
  1279. }
  1280. static bool nrf51_errata_26(void)
  1281. {
  1282. #ifndef NRF51_SERIES
  1283. return false;
  1284. #else
  1285. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1286. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1287. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1288. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  1289. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  1290. #endif
  1291. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1292. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1293. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1294. if (var1 == 0x01)
  1295. {
  1296. switch(var2)
  1297. {
  1298. case 0x00ul:
  1299. return true;
  1300. case 0x01ul:
  1301. return true;
  1302. case 0x02ul:
  1303. return false;
  1304. case 0x03ul:
  1305. return true;
  1306. case 0x04ul:
  1307. return false;
  1308. case 0x07ul:
  1309. return false;
  1310. case 0x08ul:
  1311. return false;
  1312. case 0x09ul:
  1313. return false;
  1314. case 0x0Aul:
  1315. return false;
  1316. case 0x0Bul:
  1317. return false;
  1318. case 0x0Cul:
  1319. return false;
  1320. case 0x0Dul:
  1321. return false;
  1322. default:
  1323. return false;
  1324. }
  1325. }
  1326. #endif
  1327. return false;
  1328. #endif
  1329. }
  1330. static bool nrf51_errata_27(void)
  1331. {
  1332. #ifndef NRF51_SERIES
  1333. return false;
  1334. #else
  1335. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1336. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1337. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1338. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  1339. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  1340. #endif
  1341. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1342. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1343. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1344. if (var1 == 0x01)
  1345. {
  1346. switch(var2)
  1347. {
  1348. case 0x00ul:
  1349. return true;
  1350. case 0x01ul:
  1351. return true;
  1352. case 0x02ul:
  1353. return false;
  1354. case 0x03ul:
  1355. return true;
  1356. case 0x04ul:
  1357. return false;
  1358. case 0x07ul:
  1359. return false;
  1360. case 0x08ul:
  1361. return false;
  1362. case 0x09ul:
  1363. return false;
  1364. case 0x0Aul:
  1365. return false;
  1366. case 0x0Bul:
  1367. return false;
  1368. case 0x0Cul:
  1369. return false;
  1370. case 0x0Dul:
  1371. return false;
  1372. default:
  1373. return false;
  1374. }
  1375. }
  1376. #endif
  1377. return false;
  1378. #endif
  1379. }
  1380. static bool nrf51_errata_28(void)
  1381. {
  1382. #ifndef NRF51_SERIES
  1383. return false;
  1384. #else
  1385. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1386. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1387. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1388. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  1389. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  1390. #endif
  1391. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1392. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1393. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1394. if (var1 == 0x01)
  1395. {
  1396. switch(var2)
  1397. {
  1398. case 0x00ul:
  1399. return true;
  1400. case 0x01ul:
  1401. return true;
  1402. case 0x02ul:
  1403. return false;
  1404. case 0x03ul:
  1405. return true;
  1406. case 0x04ul:
  1407. return false;
  1408. case 0x07ul:
  1409. return false;
  1410. case 0x08ul:
  1411. return false;
  1412. case 0x09ul:
  1413. return false;
  1414. case 0x0Aul:
  1415. return false;
  1416. case 0x0Bul:
  1417. return false;
  1418. case 0x0Cul:
  1419. return false;
  1420. case 0x0Dul:
  1421. return false;
  1422. default:
  1423. return false;
  1424. }
  1425. }
  1426. #endif
  1427. return false;
  1428. #endif
  1429. }
  1430. static bool nrf51_errata_29(void)
  1431. {
  1432. #ifndef NRF51_SERIES
  1433. return false;
  1434. #else
  1435. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1436. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1437. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1438. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  1439. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  1440. #endif
  1441. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1442. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1443. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1444. if (var1 == 0x01)
  1445. {
  1446. switch(var2)
  1447. {
  1448. case 0x00ul:
  1449. return true;
  1450. case 0x01ul:
  1451. return true;
  1452. case 0x02ul:
  1453. return false;
  1454. case 0x03ul:
  1455. return true;
  1456. case 0x04ul:
  1457. return false;
  1458. case 0x07ul:
  1459. return false;
  1460. case 0x08ul:
  1461. return false;
  1462. case 0x09ul:
  1463. return false;
  1464. case 0x0Aul:
  1465. return false;
  1466. case 0x0Bul:
  1467. return false;
  1468. case 0x0Cul:
  1469. return false;
  1470. case 0x0Dul:
  1471. return false;
  1472. default:
  1473. return false;
  1474. }
  1475. }
  1476. #endif
  1477. return false;
  1478. #endif
  1479. }
  1480. static bool nrf51_errata_30(void)
  1481. {
  1482. #ifndef NRF51_SERIES
  1483. return false;
  1484. #else
  1485. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1486. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1487. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1488. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  1489. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  1490. #endif
  1491. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1492. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1493. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1494. if (var1 == 0x01)
  1495. {
  1496. switch(var2)
  1497. {
  1498. case 0x00ul:
  1499. return true;
  1500. case 0x01ul:
  1501. return true;
  1502. case 0x02ul:
  1503. return false;
  1504. case 0x03ul:
  1505. return true;
  1506. case 0x04ul:
  1507. return false;
  1508. case 0x07ul:
  1509. return false;
  1510. case 0x08ul:
  1511. return false;
  1512. case 0x09ul:
  1513. return false;
  1514. case 0x0Aul:
  1515. return false;
  1516. case 0x0Bul:
  1517. return false;
  1518. case 0x0Cul:
  1519. return false;
  1520. case 0x0Dul:
  1521. return false;
  1522. default:
  1523. return false;
  1524. }
  1525. }
  1526. #endif
  1527. return false;
  1528. #endif
  1529. }
  1530. static bool nrf51_errata_31(void)
  1531. {
  1532. #ifndef NRF51_SERIES
  1533. return false;
  1534. #else
  1535. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1536. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1537. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1538. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  1539. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  1540. #endif
  1541. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1542. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1543. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1544. if (var1 == 0x01)
  1545. {
  1546. switch(var2)
  1547. {
  1548. case 0x00ul:
  1549. return true;
  1550. case 0x01ul:
  1551. return true;
  1552. case 0x02ul:
  1553. return false;
  1554. case 0x03ul:
  1555. return true;
  1556. case 0x04ul:
  1557. return false;
  1558. case 0x07ul:
  1559. return false;
  1560. case 0x08ul:
  1561. return false;
  1562. case 0x09ul:
  1563. return false;
  1564. case 0x0Aul:
  1565. return false;
  1566. case 0x0Bul:
  1567. return false;
  1568. case 0x0Cul:
  1569. return false;
  1570. case 0x0Dul:
  1571. return false;
  1572. default:
  1573. return false;
  1574. }
  1575. }
  1576. #endif
  1577. return false;
  1578. #endif
  1579. }
  1580. static bool nrf51_errata_32(void)
  1581. {
  1582. #ifndef NRF51_SERIES
  1583. return false;
  1584. #else
  1585. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1586. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1587. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1588. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  1589. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  1590. #endif
  1591. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1592. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1593. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1594. if (var1 == 0x01)
  1595. {
  1596. switch(var2)
  1597. {
  1598. case 0x00ul:
  1599. return true;
  1600. case 0x01ul:
  1601. return true;
  1602. case 0x02ul:
  1603. return false;
  1604. case 0x03ul:
  1605. return true;
  1606. case 0x04ul:
  1607. return false;
  1608. case 0x07ul:
  1609. return false;
  1610. case 0x08ul:
  1611. return false;
  1612. case 0x09ul:
  1613. return false;
  1614. case 0x0Aul:
  1615. return false;
  1616. case 0x0Bul:
  1617. return false;
  1618. case 0x0Cul:
  1619. return false;
  1620. case 0x0Dul:
  1621. return false;
  1622. default:
  1623. return false;
  1624. }
  1625. }
  1626. #endif
  1627. return false;
  1628. #endif
  1629. }
  1630. static bool nrf51_errata_33(void)
  1631. {
  1632. #ifndef NRF51_SERIES
  1633. return false;
  1634. #else
  1635. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1636. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1637. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1638. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  1639. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  1640. #endif
  1641. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1642. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1643. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1644. if (var1 == 0x01)
  1645. {
  1646. switch(var2)
  1647. {
  1648. case 0x00ul:
  1649. return true;
  1650. case 0x01ul:
  1651. return true;
  1652. case 0x02ul:
  1653. return false;
  1654. case 0x03ul:
  1655. return true;
  1656. case 0x04ul:
  1657. return false;
  1658. case 0x07ul:
  1659. return false;
  1660. case 0x08ul:
  1661. return false;
  1662. case 0x09ul:
  1663. return false;
  1664. case 0x0Aul:
  1665. return false;
  1666. case 0x0Bul:
  1667. return false;
  1668. case 0x0Cul:
  1669. return false;
  1670. case 0x0Dul:
  1671. return false;
  1672. default:
  1673. return false;
  1674. }
  1675. }
  1676. #endif
  1677. return false;
  1678. #endif
  1679. }
  1680. static bool nrf51_errata_34(void)
  1681. {
  1682. #ifndef NRF51_SERIES
  1683. return false;
  1684. #else
  1685. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1686. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1687. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1688. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  1689. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  1690. #endif
  1691. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1692. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1693. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1694. if (var1 == 0x01)
  1695. {
  1696. switch(var2)
  1697. {
  1698. case 0x00ul:
  1699. return true;
  1700. case 0x01ul:
  1701. return true;
  1702. case 0x02ul:
  1703. return false;
  1704. case 0x03ul:
  1705. return true;
  1706. case 0x04ul:
  1707. return false;
  1708. case 0x07ul:
  1709. return false;
  1710. case 0x08ul:
  1711. return false;
  1712. case 0x09ul:
  1713. return false;
  1714. case 0x0Aul:
  1715. return false;
  1716. case 0x0Bul:
  1717. return false;
  1718. case 0x0Cul:
  1719. return false;
  1720. case 0x0Dul:
  1721. return false;
  1722. default:
  1723. return false;
  1724. }
  1725. }
  1726. #endif
  1727. return false;
  1728. #endif
  1729. }
  1730. static bool nrf51_errata_35(void)
  1731. {
  1732. #ifndef NRF51_SERIES
  1733. return false;
  1734. #else
  1735. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1736. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1737. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1738. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  1739. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  1740. #endif
  1741. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1742. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1743. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1744. if (var1 == 0x01)
  1745. {
  1746. switch(var2)
  1747. {
  1748. case 0x00ul:
  1749. return true;
  1750. case 0x01ul:
  1751. return true;
  1752. case 0x02ul:
  1753. return true;
  1754. case 0x03ul:
  1755. return true;
  1756. case 0x04ul:
  1757. return true;
  1758. case 0x07ul:
  1759. return false;
  1760. case 0x08ul:
  1761. return false;
  1762. case 0x09ul:
  1763. return false;
  1764. case 0x0Aul:
  1765. return false;
  1766. case 0x0Bul:
  1767. return false;
  1768. case 0x0Cul:
  1769. return false;
  1770. case 0x0Dul:
  1771. return false;
  1772. default:
  1773. return false;
  1774. }
  1775. }
  1776. #endif
  1777. return false;
  1778. #endif
  1779. }
  1780. static bool nrf51_errata_36(void)
  1781. {
  1782. #ifndef NRF51_SERIES
  1783. return false;
  1784. #else
  1785. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1786. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1787. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1788. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  1789. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  1790. #endif
  1791. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1792. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1793. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1794. if (var1 == 0x01)
  1795. {
  1796. switch(var2)
  1797. {
  1798. case 0x00ul:
  1799. return true;
  1800. case 0x01ul:
  1801. return true;
  1802. case 0x02ul:
  1803. return false;
  1804. case 0x03ul:
  1805. return true;
  1806. case 0x04ul:
  1807. return false;
  1808. case 0x07ul:
  1809. return false;
  1810. case 0x08ul:
  1811. return false;
  1812. case 0x09ul:
  1813. return false;
  1814. case 0x0Aul:
  1815. return false;
  1816. case 0x0Bul:
  1817. return false;
  1818. case 0x0Cul:
  1819. return false;
  1820. case 0x0Dul:
  1821. return false;
  1822. default:
  1823. return false;
  1824. }
  1825. }
  1826. #endif
  1827. return false;
  1828. #endif
  1829. }
  1830. static bool nrf51_errata_37(void)
  1831. {
  1832. #ifndef NRF51_SERIES
  1833. return false;
  1834. #else
  1835. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1836. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1837. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1838. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  1839. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  1840. #endif
  1841. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1842. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1843. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1844. if (var1 == 0x01)
  1845. {
  1846. switch(var2)
  1847. {
  1848. case 0x00ul:
  1849. return true;
  1850. case 0x01ul:
  1851. return true;
  1852. case 0x02ul:
  1853. return false;
  1854. case 0x03ul:
  1855. return true;
  1856. case 0x04ul:
  1857. return false;
  1858. case 0x07ul:
  1859. return false;
  1860. case 0x08ul:
  1861. return false;
  1862. case 0x09ul:
  1863. return false;
  1864. case 0x0Aul:
  1865. return false;
  1866. case 0x0Bul:
  1867. return false;
  1868. case 0x0Cul:
  1869. return false;
  1870. case 0x0Dul:
  1871. return false;
  1872. default:
  1873. return false;
  1874. }
  1875. }
  1876. #endif
  1877. return false;
  1878. #endif
  1879. }
  1880. static bool nrf51_errata_38(void)
  1881. {
  1882. #ifndef NRF51_SERIES
  1883. return false;
  1884. #else
  1885. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1886. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1887. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1888. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  1889. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  1890. #endif
  1891. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1892. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1893. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1894. if (var1 == 0x01)
  1895. {
  1896. switch(var2)
  1897. {
  1898. case 0x00ul:
  1899. return true;
  1900. case 0x01ul:
  1901. return true;
  1902. case 0x02ul:
  1903. return true;
  1904. case 0x03ul:
  1905. return true;
  1906. case 0x04ul:
  1907. return true;
  1908. case 0x07ul:
  1909. return true;
  1910. case 0x08ul:
  1911. return true;
  1912. case 0x09ul:
  1913. return true;
  1914. case 0x0Aul:
  1915. return true;
  1916. case 0x0Bul:
  1917. return true;
  1918. case 0x0Cul:
  1919. return true;
  1920. case 0x0Dul:
  1921. return true;
  1922. default:
  1923. return true;
  1924. }
  1925. }
  1926. #endif
  1927. return false;
  1928. #endif
  1929. }
  1930. static bool nrf51_errata_39(void)
  1931. {
  1932. #ifndef NRF51_SERIES
  1933. return false;
  1934. #else
  1935. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1936. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1937. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1938. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  1939. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  1940. #endif
  1941. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1942. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1943. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1944. if (var1 == 0x01)
  1945. {
  1946. switch(var2)
  1947. {
  1948. case 0x00ul:
  1949. return true;
  1950. case 0x01ul:
  1951. return true;
  1952. case 0x02ul:
  1953. return true;
  1954. case 0x03ul:
  1955. return true;
  1956. case 0x04ul:
  1957. return true;
  1958. case 0x07ul:
  1959. return false;
  1960. case 0x08ul:
  1961. return false;
  1962. case 0x09ul:
  1963. return false;
  1964. case 0x0Aul:
  1965. return false;
  1966. case 0x0Bul:
  1967. return false;
  1968. case 0x0Cul:
  1969. return false;
  1970. case 0x0Dul:
  1971. return false;
  1972. default:
  1973. return false;
  1974. }
  1975. }
  1976. #endif
  1977. return false;
  1978. #endif
  1979. }
  1980. static bool nrf51_errata_40(void)
  1981. {
  1982. #ifndef NRF51_SERIES
  1983. return false;
  1984. #else
  1985. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1986. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1987. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1988. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  1989. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  1990. #endif
  1991. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  1992. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  1993. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  1994. if (var1 == 0x01)
  1995. {
  1996. switch(var2)
  1997. {
  1998. case 0x00ul:
  1999. return true;
  2000. case 0x01ul:
  2001. return true;
  2002. case 0x02ul:
  2003. return true;
  2004. case 0x03ul:
  2005. return true;
  2006. case 0x04ul:
  2007. return true;
  2008. case 0x07ul:
  2009. return false;
  2010. case 0x08ul:
  2011. return false;
  2012. case 0x09ul:
  2013. return false;
  2014. case 0x0Aul:
  2015. return false;
  2016. case 0x0Bul:
  2017. return false;
  2018. case 0x0Cul:
  2019. return false;
  2020. case 0x0Dul:
  2021. return false;
  2022. default:
  2023. return false;
  2024. }
  2025. }
  2026. #endif
  2027. return false;
  2028. #endif
  2029. }
  2030. static bool nrf51_errata_41(void)
  2031. {
  2032. #ifndef NRF51_SERIES
  2033. return false;
  2034. #else
  2035. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2036. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2037. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2038. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  2039. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  2040. #endif
  2041. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2042. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2043. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2044. if (var1 == 0x01)
  2045. {
  2046. switch(var2)
  2047. {
  2048. case 0x00ul:
  2049. return true;
  2050. case 0x01ul:
  2051. return true;
  2052. case 0x02ul:
  2053. return true;
  2054. case 0x03ul:
  2055. return true;
  2056. case 0x04ul:
  2057. return true;
  2058. case 0x07ul:
  2059. return false;
  2060. case 0x08ul:
  2061. return false;
  2062. case 0x09ul:
  2063. return false;
  2064. case 0x0Aul:
  2065. return false;
  2066. case 0x0Bul:
  2067. return false;
  2068. case 0x0Cul:
  2069. return false;
  2070. case 0x0Dul:
  2071. return false;
  2072. default:
  2073. return false;
  2074. }
  2075. }
  2076. #endif
  2077. return false;
  2078. #endif
  2079. }
  2080. static bool nrf51_errata_42(void)
  2081. {
  2082. #ifndef NRF51_SERIES
  2083. return false;
  2084. #else
  2085. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2086. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2087. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2088. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  2089. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  2090. #endif
  2091. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2092. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2093. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2094. if (var1 == 0x01)
  2095. {
  2096. switch(var2)
  2097. {
  2098. case 0x00ul:
  2099. return true;
  2100. case 0x01ul:
  2101. return true;
  2102. case 0x02ul:
  2103. return true;
  2104. case 0x03ul:
  2105. return true;
  2106. case 0x04ul:
  2107. return true;
  2108. case 0x07ul:
  2109. return false;
  2110. case 0x08ul:
  2111. return false;
  2112. case 0x09ul:
  2113. return false;
  2114. case 0x0Aul:
  2115. return false;
  2116. case 0x0Bul:
  2117. return false;
  2118. case 0x0Cul:
  2119. return false;
  2120. case 0x0Dul:
  2121. return false;
  2122. default:
  2123. return false;
  2124. }
  2125. }
  2126. #endif
  2127. return false;
  2128. #endif
  2129. }
  2130. static bool nrf51_errata_43(void)
  2131. {
  2132. #ifndef NRF51_SERIES
  2133. return false;
  2134. #else
  2135. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2136. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2137. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2138. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  2139. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  2140. #endif
  2141. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2142. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2143. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2144. if (var1 == 0x01)
  2145. {
  2146. switch(var2)
  2147. {
  2148. case 0x00ul:
  2149. return false;
  2150. case 0x01ul:
  2151. return false;
  2152. case 0x02ul:
  2153. return true;
  2154. case 0x03ul:
  2155. return false;
  2156. case 0x04ul:
  2157. return true;
  2158. case 0x07ul:
  2159. return false;
  2160. case 0x08ul:
  2161. return false;
  2162. case 0x09ul:
  2163. return false;
  2164. case 0x0Aul:
  2165. return false;
  2166. case 0x0Bul:
  2167. return false;
  2168. case 0x0Cul:
  2169. return false;
  2170. case 0x0Dul:
  2171. return false;
  2172. default:
  2173. return false;
  2174. }
  2175. }
  2176. #endif
  2177. return false;
  2178. #endif
  2179. }
  2180. static bool nrf51_errata_44(void)
  2181. {
  2182. #ifndef NRF51_SERIES
  2183. return false;
  2184. #else
  2185. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2186. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2187. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2188. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  2189. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  2190. #endif
  2191. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2192. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2193. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2194. if (var1 == 0x01)
  2195. {
  2196. switch(var2)
  2197. {
  2198. case 0x00ul:
  2199. return true;
  2200. case 0x01ul:
  2201. return true;
  2202. case 0x02ul:
  2203. return true;
  2204. case 0x03ul:
  2205. return true;
  2206. case 0x04ul:
  2207. return true;
  2208. case 0x07ul:
  2209. return false;
  2210. case 0x08ul:
  2211. return false;
  2212. case 0x09ul:
  2213. return false;
  2214. case 0x0Aul:
  2215. return false;
  2216. case 0x0Bul:
  2217. return false;
  2218. case 0x0Cul:
  2219. return false;
  2220. case 0x0Dul:
  2221. return false;
  2222. default:
  2223. return false;
  2224. }
  2225. }
  2226. #endif
  2227. return false;
  2228. #endif
  2229. }
  2230. static bool nrf51_errata_45(void)
  2231. {
  2232. #ifndef NRF51_SERIES
  2233. return false;
  2234. #else
  2235. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2236. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2237. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2238. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  2239. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  2240. #endif
  2241. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2242. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2243. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2244. if (var1 == 0x01)
  2245. {
  2246. switch(var2)
  2247. {
  2248. case 0x00ul:
  2249. return true;
  2250. case 0x01ul:
  2251. return true;
  2252. case 0x02ul:
  2253. return true;
  2254. case 0x03ul:
  2255. return true;
  2256. case 0x04ul:
  2257. return true;
  2258. case 0x07ul:
  2259. return false;
  2260. case 0x08ul:
  2261. return false;
  2262. case 0x09ul:
  2263. return false;
  2264. case 0x0Aul:
  2265. return false;
  2266. case 0x0Bul:
  2267. return false;
  2268. case 0x0Cul:
  2269. return false;
  2270. case 0x0Dul:
  2271. return false;
  2272. default:
  2273. return false;
  2274. }
  2275. }
  2276. #endif
  2277. return false;
  2278. #endif
  2279. }
  2280. static bool nrf51_errata_46(void)
  2281. {
  2282. #ifndef NRF51_SERIES
  2283. return false;
  2284. #else
  2285. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2286. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2287. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2288. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  2289. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  2290. #endif
  2291. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2292. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2293. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2294. if (var1 == 0x01)
  2295. {
  2296. switch(var2)
  2297. {
  2298. case 0x00ul:
  2299. return false;
  2300. case 0x01ul:
  2301. return false;
  2302. case 0x02ul:
  2303. return true;
  2304. case 0x03ul:
  2305. return false;
  2306. case 0x04ul:
  2307. return true;
  2308. case 0x07ul:
  2309. return true;
  2310. case 0x08ul:
  2311. return true;
  2312. case 0x09ul:
  2313. return true;
  2314. case 0x0Aul:
  2315. return false;
  2316. case 0x0Bul:
  2317. return true;
  2318. case 0x0Cul:
  2319. return true;
  2320. case 0x0Dul:
  2321. return false;
  2322. default:
  2323. return false;
  2324. }
  2325. }
  2326. #endif
  2327. return false;
  2328. #endif
  2329. }
  2330. static bool nrf51_errata_47(void)
  2331. {
  2332. #ifndef NRF51_SERIES
  2333. return false;
  2334. #else
  2335. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2336. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2337. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2338. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  2339. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  2340. #endif
  2341. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2342. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2343. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2344. if (var1 == 0x01)
  2345. {
  2346. switch(var2)
  2347. {
  2348. case 0x00ul:
  2349. return true;
  2350. case 0x01ul:
  2351. return true;
  2352. case 0x02ul:
  2353. return true;
  2354. case 0x03ul:
  2355. return true;
  2356. case 0x04ul:
  2357. return true;
  2358. case 0x07ul:
  2359. return false;
  2360. case 0x08ul:
  2361. return false;
  2362. case 0x09ul:
  2363. return false;
  2364. case 0x0Aul:
  2365. return false;
  2366. case 0x0Bul:
  2367. return false;
  2368. case 0x0Cul:
  2369. return false;
  2370. case 0x0Dul:
  2371. return false;
  2372. default:
  2373. return false;
  2374. }
  2375. }
  2376. #endif
  2377. return false;
  2378. #endif
  2379. }
  2380. static bool nrf51_errata_48(void)
  2381. {
  2382. #ifndef NRF51_SERIES
  2383. return false;
  2384. #else
  2385. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2386. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2387. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2388. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  2389. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  2390. #endif
  2391. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2392. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2393. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2394. if (var1 == 0x01)
  2395. {
  2396. switch(var2)
  2397. {
  2398. case 0x00ul:
  2399. return true;
  2400. case 0x01ul:
  2401. return true;
  2402. case 0x02ul:
  2403. return true;
  2404. case 0x03ul:
  2405. return true;
  2406. case 0x04ul:
  2407. return true;
  2408. case 0x07ul:
  2409. return false;
  2410. case 0x08ul:
  2411. return false;
  2412. case 0x09ul:
  2413. return false;
  2414. case 0x0Aul:
  2415. return false;
  2416. case 0x0Bul:
  2417. return false;
  2418. case 0x0Cul:
  2419. return false;
  2420. case 0x0Dul:
  2421. return false;
  2422. default:
  2423. return false;
  2424. }
  2425. }
  2426. #endif
  2427. return false;
  2428. #endif
  2429. }
  2430. static bool nrf51_errata_49(void)
  2431. {
  2432. #ifndef NRF51_SERIES
  2433. return false;
  2434. #else
  2435. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2436. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2437. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2438. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  2439. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  2440. #endif
  2441. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2442. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2443. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2444. if (var1 == 0x01)
  2445. {
  2446. switch(var2)
  2447. {
  2448. case 0x00ul:
  2449. return false;
  2450. case 0x01ul:
  2451. return false;
  2452. case 0x02ul:
  2453. return true;
  2454. case 0x03ul:
  2455. return false;
  2456. case 0x04ul:
  2457. return true;
  2458. case 0x07ul:
  2459. return false;
  2460. case 0x08ul:
  2461. return false;
  2462. case 0x09ul:
  2463. return false;
  2464. case 0x0Aul:
  2465. return false;
  2466. case 0x0Bul:
  2467. return false;
  2468. case 0x0Cul:
  2469. return false;
  2470. case 0x0Dul:
  2471. return false;
  2472. default:
  2473. return false;
  2474. }
  2475. }
  2476. #endif
  2477. return false;
  2478. #endif
  2479. }
  2480. static bool nrf51_errata_50(void)
  2481. {
  2482. #ifndef NRF51_SERIES
  2483. return false;
  2484. #else
  2485. return false;
  2486. #endif
  2487. }
  2488. static bool nrf51_errata_51(void)
  2489. {
  2490. #ifndef NRF51_SERIES
  2491. return false;
  2492. #else
  2493. return false;
  2494. #endif
  2495. }
  2496. static bool nrf51_errata_52(void)
  2497. {
  2498. #ifndef NRF51_SERIES
  2499. return false;
  2500. #else
  2501. return false;
  2502. #endif
  2503. }
  2504. static bool nrf51_errata_53(void)
  2505. {
  2506. #ifndef NRF51_SERIES
  2507. return false;
  2508. #else
  2509. return false;
  2510. #endif
  2511. }
  2512. static bool nrf51_errata_54(void)
  2513. {
  2514. #ifndef NRF51_SERIES
  2515. return false;
  2516. #else
  2517. return false;
  2518. #endif
  2519. }
  2520. static bool nrf51_errata_55(void)
  2521. {
  2522. #ifndef NRF51_SERIES
  2523. return false;
  2524. #else
  2525. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2526. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2527. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2528. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  2529. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  2530. #endif
  2531. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2532. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2533. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2534. if (var1 == 0x01)
  2535. {
  2536. switch(var2)
  2537. {
  2538. case 0x00ul:
  2539. return true;
  2540. case 0x01ul:
  2541. return true;
  2542. case 0x02ul:
  2543. return false;
  2544. case 0x03ul:
  2545. return true;
  2546. case 0x04ul:
  2547. return false;
  2548. case 0x07ul:
  2549. return false;
  2550. case 0x08ul:
  2551. return false;
  2552. case 0x09ul:
  2553. return false;
  2554. case 0x0Aul:
  2555. return false;
  2556. case 0x0Bul:
  2557. return false;
  2558. case 0x0Cul:
  2559. return false;
  2560. case 0x0Dul:
  2561. return false;
  2562. default:
  2563. return false;
  2564. }
  2565. }
  2566. #endif
  2567. return false;
  2568. #endif
  2569. }
  2570. static bool nrf51_errata_56(void)
  2571. {
  2572. #ifndef NRF51_SERIES
  2573. return false;
  2574. #else
  2575. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2576. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2577. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2578. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  2579. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  2580. #endif
  2581. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2582. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2583. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2584. if (var1 == 0x01)
  2585. {
  2586. switch(var2)
  2587. {
  2588. case 0x00ul:
  2589. return true;
  2590. case 0x01ul:
  2591. return true;
  2592. case 0x02ul:
  2593. return true;
  2594. case 0x03ul:
  2595. return true;
  2596. case 0x04ul:
  2597. return true;
  2598. case 0x07ul:
  2599. return false;
  2600. case 0x08ul:
  2601. return false;
  2602. case 0x09ul:
  2603. return false;
  2604. case 0x0Aul:
  2605. return false;
  2606. case 0x0Bul:
  2607. return false;
  2608. case 0x0Cul:
  2609. return false;
  2610. case 0x0Dul:
  2611. return false;
  2612. default:
  2613. return false;
  2614. }
  2615. }
  2616. #endif
  2617. return false;
  2618. #endif
  2619. }
  2620. static bool nrf51_errata_57(void)
  2621. {
  2622. #ifndef NRF51_SERIES
  2623. return false;
  2624. #else
  2625. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2626. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2627. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2628. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  2629. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  2630. #endif
  2631. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2632. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2633. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2634. if (var1 == 0x01)
  2635. {
  2636. switch(var2)
  2637. {
  2638. case 0x00ul:
  2639. return true;
  2640. case 0x01ul:
  2641. return true;
  2642. case 0x02ul:
  2643. return true;
  2644. case 0x03ul:
  2645. return true;
  2646. case 0x04ul:
  2647. return true;
  2648. case 0x07ul:
  2649. return false;
  2650. case 0x08ul:
  2651. return false;
  2652. case 0x09ul:
  2653. return false;
  2654. case 0x0Aul:
  2655. return false;
  2656. case 0x0Bul:
  2657. return false;
  2658. case 0x0Cul:
  2659. return false;
  2660. case 0x0Dul:
  2661. return false;
  2662. default:
  2663. return false;
  2664. }
  2665. }
  2666. #endif
  2667. return false;
  2668. #endif
  2669. }
  2670. static bool nrf51_errata_58(void)
  2671. {
  2672. #ifndef NRF51_SERIES
  2673. return false;
  2674. #else
  2675. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2676. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2677. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2678. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  2679. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  2680. #endif
  2681. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2682. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2683. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2684. if (var1 == 0x01)
  2685. {
  2686. switch(var2)
  2687. {
  2688. case 0x00ul:
  2689. return false;
  2690. case 0x01ul:
  2691. return false;
  2692. case 0x02ul:
  2693. return true;
  2694. case 0x03ul:
  2695. return false;
  2696. case 0x04ul:
  2697. return true;
  2698. case 0x07ul:
  2699. return false;
  2700. case 0x08ul:
  2701. return false;
  2702. case 0x09ul:
  2703. return false;
  2704. case 0x0Aul:
  2705. return false;
  2706. case 0x0Bul:
  2707. return false;
  2708. case 0x0Cul:
  2709. return false;
  2710. case 0x0Dul:
  2711. return false;
  2712. default:
  2713. return false;
  2714. }
  2715. }
  2716. #endif
  2717. return false;
  2718. #endif
  2719. }
  2720. static bool nrf51_errata_59(void)
  2721. {
  2722. #ifndef NRF51_SERIES
  2723. return false;
  2724. #else
  2725. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2726. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2727. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2728. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  2729. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  2730. #endif
  2731. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2732. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2733. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2734. if (var1 == 0x01)
  2735. {
  2736. switch(var2)
  2737. {
  2738. case 0x00ul:
  2739. return false;
  2740. case 0x01ul:
  2741. return false;
  2742. case 0x02ul:
  2743. return true;
  2744. case 0x03ul:
  2745. return false;
  2746. case 0x04ul:
  2747. return true;
  2748. case 0x07ul:
  2749. return false;
  2750. case 0x08ul:
  2751. return false;
  2752. case 0x09ul:
  2753. return false;
  2754. case 0x0Aul:
  2755. return false;
  2756. case 0x0Bul:
  2757. return false;
  2758. case 0x0Cul:
  2759. return false;
  2760. case 0x0Dul:
  2761. return false;
  2762. default:
  2763. return false;
  2764. }
  2765. }
  2766. #endif
  2767. return false;
  2768. #endif
  2769. }
  2770. static bool nrf51_errata_60(void)
  2771. {
  2772. #ifndef NRF51_SERIES
  2773. return false;
  2774. #else
  2775. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2776. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2777. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2778. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  2779. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  2780. #endif
  2781. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2782. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2783. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2784. if (var1 == 0x01)
  2785. {
  2786. switch(var2)
  2787. {
  2788. case 0x00ul:
  2789. return false;
  2790. case 0x01ul:
  2791. return false;
  2792. case 0x02ul:
  2793. return true;
  2794. case 0x03ul:
  2795. return false;
  2796. case 0x04ul:
  2797. return true;
  2798. case 0x07ul:
  2799. return false;
  2800. case 0x08ul:
  2801. return false;
  2802. case 0x09ul:
  2803. return false;
  2804. case 0x0Aul:
  2805. return false;
  2806. case 0x0Bul:
  2807. return false;
  2808. case 0x0Cul:
  2809. return false;
  2810. case 0x0Dul:
  2811. return false;
  2812. default:
  2813. return false;
  2814. }
  2815. }
  2816. #endif
  2817. return false;
  2818. #endif
  2819. }
  2820. static bool nrf51_errata_61(void)
  2821. {
  2822. #ifndef NRF51_SERIES
  2823. return false;
  2824. #else
  2825. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2826. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2827. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2828. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  2829. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  2830. #endif
  2831. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2832. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2833. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2834. if (var1 == 0x01)
  2835. {
  2836. switch(var2)
  2837. {
  2838. case 0x00ul:
  2839. return false;
  2840. case 0x01ul:
  2841. return false;
  2842. case 0x02ul:
  2843. return true;
  2844. case 0x03ul:
  2845. return false;
  2846. case 0x04ul:
  2847. return true;
  2848. case 0x07ul:
  2849. return true;
  2850. case 0x08ul:
  2851. return true;
  2852. case 0x09ul:
  2853. return true;
  2854. case 0x0Aul:
  2855. return true;
  2856. case 0x0Bul:
  2857. return true;
  2858. case 0x0Cul:
  2859. return true;
  2860. case 0x0Dul:
  2861. return true;
  2862. default:
  2863. return true;
  2864. }
  2865. }
  2866. #endif
  2867. return false;
  2868. #endif
  2869. }
  2870. static bool nrf51_errata_62(void)
  2871. {
  2872. #ifndef NRF51_SERIES
  2873. return false;
  2874. #else
  2875. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2876. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2877. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2878. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  2879. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  2880. #endif
  2881. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2882. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2883. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2884. if (var1 == 0x01)
  2885. {
  2886. switch(var2)
  2887. {
  2888. case 0x00ul:
  2889. return false;
  2890. case 0x01ul:
  2891. return false;
  2892. case 0x02ul:
  2893. return true;
  2894. case 0x03ul:
  2895. return false;
  2896. case 0x04ul:
  2897. return true;
  2898. case 0x07ul:
  2899. return false;
  2900. case 0x08ul:
  2901. return false;
  2902. case 0x09ul:
  2903. return false;
  2904. case 0x0Aul:
  2905. return false;
  2906. case 0x0Bul:
  2907. return false;
  2908. case 0x0Cul:
  2909. return false;
  2910. case 0x0Dul:
  2911. return false;
  2912. default:
  2913. return false;
  2914. }
  2915. }
  2916. #endif
  2917. return false;
  2918. #endif
  2919. }
  2920. static bool nrf51_errata_63(void)
  2921. {
  2922. #ifndef NRF51_SERIES
  2923. return false;
  2924. #else
  2925. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2926. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2927. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2928. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  2929. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  2930. #endif
  2931. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2932. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2933. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2934. if (var1 == 0x01)
  2935. {
  2936. switch(var2)
  2937. {
  2938. case 0x00ul:
  2939. return true;
  2940. case 0x01ul:
  2941. return true;
  2942. case 0x02ul:
  2943. return true;
  2944. case 0x03ul:
  2945. return true;
  2946. case 0x04ul:
  2947. return true;
  2948. case 0x07ul:
  2949. return false;
  2950. case 0x08ul:
  2951. return false;
  2952. case 0x09ul:
  2953. return false;
  2954. case 0x0Aul:
  2955. return false;
  2956. case 0x0Bul:
  2957. return false;
  2958. case 0x0Cul:
  2959. return false;
  2960. case 0x0Dul:
  2961. return false;
  2962. default:
  2963. return false;
  2964. }
  2965. }
  2966. #endif
  2967. return false;
  2968. #endif
  2969. }
  2970. static bool nrf51_errata_64(void)
  2971. {
  2972. #ifndef NRF51_SERIES
  2973. return false;
  2974. #else
  2975. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2976. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2977. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2978. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  2979. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  2980. #endif
  2981. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  2982. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  2983. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  2984. if (var1 == 0x01)
  2985. {
  2986. switch(var2)
  2987. {
  2988. case 0x00ul:
  2989. return true;
  2990. case 0x01ul:
  2991. return true;
  2992. case 0x02ul:
  2993. return true;
  2994. case 0x03ul:
  2995. return true;
  2996. case 0x04ul:
  2997. return true;
  2998. case 0x07ul:
  2999. return false;
  3000. case 0x08ul:
  3001. return false;
  3002. case 0x09ul:
  3003. return false;
  3004. case 0x0Aul:
  3005. return false;
  3006. case 0x0Bul:
  3007. return false;
  3008. case 0x0Cul:
  3009. return false;
  3010. case 0x0Dul:
  3011. return false;
  3012. default:
  3013. return false;
  3014. }
  3015. }
  3016. #endif
  3017. return false;
  3018. #endif
  3019. }
  3020. static bool nrf51_errata_65(void)
  3021. {
  3022. #ifndef NRF51_SERIES
  3023. return false;
  3024. #else
  3025. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  3026. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  3027. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  3028. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  3029. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  3030. #endif
  3031. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  3032. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  3033. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  3034. if (var1 == 0x01)
  3035. {
  3036. switch(var2)
  3037. {
  3038. case 0x00ul:
  3039. return true;
  3040. case 0x01ul:
  3041. return true;
  3042. case 0x02ul:
  3043. return true;
  3044. case 0x03ul:
  3045. return true;
  3046. case 0x04ul:
  3047. return true;
  3048. case 0x07ul:
  3049. return false;
  3050. case 0x08ul:
  3051. return false;
  3052. case 0x09ul:
  3053. return false;
  3054. case 0x0Aul:
  3055. return false;
  3056. case 0x0Bul:
  3057. return false;
  3058. case 0x0Cul:
  3059. return false;
  3060. case 0x0Dul:
  3061. return false;
  3062. default:
  3063. return false;
  3064. }
  3065. }
  3066. #endif
  3067. return false;
  3068. #endif
  3069. }
  3070. static bool nrf51_errata_66(void)
  3071. {
  3072. #ifndef NRF51_SERIES
  3073. return false;
  3074. #else
  3075. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  3076. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  3077. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  3078. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  3079. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  3080. #endif
  3081. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  3082. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  3083. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  3084. if (var1 == 0x01)
  3085. {
  3086. switch(var2)
  3087. {
  3088. case 0x00ul:
  3089. return false;
  3090. case 0x01ul:
  3091. return false;
  3092. case 0x02ul:
  3093. return true;
  3094. case 0x03ul:
  3095. return false;
  3096. case 0x04ul:
  3097. return true;
  3098. case 0x07ul:
  3099. return true;
  3100. case 0x08ul:
  3101. return true;
  3102. case 0x09ul:
  3103. return true;
  3104. case 0x0Aul:
  3105. return false;
  3106. case 0x0Bul:
  3107. return true;
  3108. case 0x0Cul:
  3109. return true;
  3110. case 0x0Dul:
  3111. return false;
  3112. default:
  3113. return false;
  3114. }
  3115. }
  3116. #endif
  3117. return false;
  3118. #endif
  3119. }
  3120. static bool nrf51_errata_67(void)
  3121. {
  3122. #ifndef NRF51_SERIES
  3123. return false;
  3124. #else
  3125. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  3126. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  3127. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  3128. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  3129. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  3130. #endif
  3131. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  3132. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  3133. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  3134. if (var1 == 0x01)
  3135. {
  3136. switch(var2)
  3137. {
  3138. case 0x00ul:
  3139. return false;
  3140. case 0x01ul:
  3141. return false;
  3142. case 0x02ul:
  3143. return true;
  3144. case 0x03ul:
  3145. return false;
  3146. case 0x04ul:
  3147. return true;
  3148. case 0x07ul:
  3149. return true;
  3150. case 0x08ul:
  3151. return true;
  3152. case 0x09ul:
  3153. return true;
  3154. case 0x0Aul:
  3155. return true;
  3156. case 0x0Bul:
  3157. return true;
  3158. case 0x0Cul:
  3159. return true;
  3160. case 0x0Dul:
  3161. return true;
  3162. default:
  3163. return true;
  3164. }
  3165. }
  3166. #endif
  3167. return false;
  3168. #endif
  3169. }
  3170. static bool nrf51_errata_68(void)
  3171. {
  3172. #ifndef NRF51_SERIES
  3173. return false;
  3174. #else
  3175. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  3176. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  3177. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  3178. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  3179. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  3180. #endif
  3181. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  3182. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  3183. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  3184. if (var1 == 0x01)
  3185. {
  3186. switch(var2)
  3187. {
  3188. case 0x00ul:
  3189. return false;
  3190. case 0x01ul:
  3191. return false;
  3192. case 0x02ul:
  3193. return true;
  3194. case 0x03ul:
  3195. return false;
  3196. case 0x04ul:
  3197. return true;
  3198. case 0x07ul:
  3199. return false;
  3200. case 0x08ul:
  3201. return false;
  3202. case 0x09ul:
  3203. return false;
  3204. case 0x0Aul:
  3205. return false;
  3206. case 0x0Bul:
  3207. return false;
  3208. case 0x0Cul:
  3209. return false;
  3210. case 0x0Dul:
  3211. return false;
  3212. default:
  3213. return false;
  3214. }
  3215. }
  3216. #endif
  3217. return false;
  3218. #endif
  3219. }
  3220. static bool nrf51_errata_69(void)
  3221. {
  3222. #ifndef NRF51_SERIES
  3223. return false;
  3224. #else
  3225. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  3226. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  3227. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  3228. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  3229. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  3230. #endif
  3231. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  3232. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  3233. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  3234. if (var1 == 0x01)
  3235. {
  3236. switch(var2)
  3237. {
  3238. case 0x00ul:
  3239. return false;
  3240. case 0x01ul:
  3241. return false;
  3242. case 0x02ul:
  3243. return false;
  3244. case 0x03ul:
  3245. return false;
  3246. case 0x04ul:
  3247. return false;
  3248. case 0x07ul:
  3249. return true;
  3250. case 0x08ul:
  3251. return true;
  3252. case 0x09ul:
  3253. return false;
  3254. case 0x0Aul:
  3255. return false;
  3256. case 0x0Bul:
  3257. return true;
  3258. case 0x0Cul:
  3259. return true;
  3260. case 0x0Dul:
  3261. return false;
  3262. default:
  3263. return false;
  3264. }
  3265. }
  3266. #endif
  3267. return false;
  3268. #endif
  3269. }
  3270. static bool nrf51_errata_70(void)
  3271. {
  3272. #ifndef NRF51_SERIES
  3273. return false;
  3274. #else
  3275. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  3276. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  3277. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  3278. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  3279. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  3280. #endif
  3281. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  3282. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  3283. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  3284. if (var1 == 0x01)
  3285. {
  3286. switch(var2)
  3287. {
  3288. case 0x00ul:
  3289. return false;
  3290. case 0x01ul:
  3291. return false;
  3292. case 0x02ul:
  3293. return true;
  3294. case 0x03ul:
  3295. return false;
  3296. case 0x04ul:
  3297. return true;
  3298. case 0x07ul:
  3299. return true;
  3300. case 0x08ul:
  3301. return true;
  3302. case 0x09ul:
  3303. return true;
  3304. case 0x0Aul:
  3305. return true;
  3306. case 0x0Bul:
  3307. return true;
  3308. case 0x0Cul:
  3309. return true;
  3310. case 0x0Dul:
  3311. return true;
  3312. default:
  3313. return true;
  3314. }
  3315. }
  3316. #endif
  3317. return false;
  3318. #endif
  3319. }
  3320. static bool nrf51_errata_71(void)
  3321. {
  3322. #ifndef NRF51_SERIES
  3323. return false;
  3324. #else
  3325. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  3326. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  3327. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  3328. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  3329. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  3330. #endif
  3331. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  3332. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  3333. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  3334. if (var1 == 0x01)
  3335. {
  3336. switch(var2)
  3337. {
  3338. case 0x00ul:
  3339. return false;
  3340. case 0x01ul:
  3341. return false;
  3342. case 0x02ul:
  3343. return false;
  3344. case 0x03ul:
  3345. return false;
  3346. case 0x04ul:
  3347. return false;
  3348. case 0x07ul:
  3349. return true;
  3350. case 0x08ul:
  3351. return true;
  3352. case 0x09ul:
  3353. return false;
  3354. case 0x0Aul:
  3355. return false;
  3356. case 0x0Bul:
  3357. return true;
  3358. case 0x0Cul:
  3359. return true;
  3360. case 0x0Dul:
  3361. return false;
  3362. default:
  3363. return false;
  3364. }
  3365. }
  3366. #endif
  3367. return false;
  3368. #endif
  3369. }
  3370. static bool nrf51_errata_72(void)
  3371. {
  3372. #ifndef NRF51_SERIES
  3373. return false;
  3374. #else
  3375. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  3376. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  3377. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  3378. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  3379. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  3380. #endif
  3381. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  3382. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  3383. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  3384. if (var1 == 0x01)
  3385. {
  3386. switch(var2)
  3387. {
  3388. case 0x00ul:
  3389. return true;
  3390. case 0x01ul:
  3391. return true;
  3392. case 0x02ul:
  3393. return true;
  3394. case 0x03ul:
  3395. return true;
  3396. case 0x04ul:
  3397. return true;
  3398. case 0x07ul:
  3399. return true;
  3400. case 0x08ul:
  3401. return true;
  3402. case 0x09ul:
  3403. return true;
  3404. case 0x0Aul:
  3405. return true;
  3406. case 0x0Bul:
  3407. return true;
  3408. case 0x0Cul:
  3409. return true;
  3410. case 0x0Dul:
  3411. return true;
  3412. default:
  3413. return true;
  3414. }
  3415. }
  3416. #endif
  3417. return false;
  3418. #endif
  3419. }
  3420. static bool nrf51_errata_73(void)
  3421. {
  3422. #ifndef NRF51_SERIES
  3423. return false;
  3424. #else
  3425. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  3426. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  3427. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  3428. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  3429. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  3430. #endif
  3431. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  3432. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  3433. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  3434. if (var1 == 0x01)
  3435. {
  3436. switch(var2)
  3437. {
  3438. case 0x00ul:
  3439. return false;
  3440. case 0x01ul:
  3441. return false;
  3442. case 0x02ul:
  3443. return false;
  3444. case 0x03ul:
  3445. return false;
  3446. case 0x04ul:
  3447. return false;
  3448. case 0x07ul:
  3449. return true;
  3450. case 0x08ul:
  3451. return true;
  3452. case 0x09ul:
  3453. return true;
  3454. case 0x0Aul:
  3455. return false;
  3456. case 0x0Bul:
  3457. return true;
  3458. case 0x0Cul:
  3459. return true;
  3460. case 0x0Dul:
  3461. return false;
  3462. default:
  3463. return false;
  3464. }
  3465. }
  3466. #endif
  3467. return false;
  3468. #endif
  3469. }
  3470. static bool nrf51_errata_74(void)
  3471. {
  3472. #ifndef NRF51_SERIES
  3473. return false;
  3474. #else
  3475. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  3476. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  3477. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  3478. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  3479. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  3480. #endif
  3481. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  3482. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  3483. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  3484. if (var1 == 0x01)
  3485. {
  3486. switch(var2)
  3487. {
  3488. case 0x00ul:
  3489. return false;
  3490. case 0x01ul:
  3491. return false;
  3492. case 0x02ul:
  3493. return true;
  3494. case 0x03ul:
  3495. return false;
  3496. case 0x04ul:
  3497. return true;
  3498. case 0x07ul:
  3499. return true;
  3500. case 0x08ul:
  3501. return true;
  3502. case 0x09ul:
  3503. return true;
  3504. case 0x0Aul:
  3505. return false;
  3506. case 0x0Bul:
  3507. return true;
  3508. case 0x0Cul:
  3509. return true;
  3510. case 0x0Dul:
  3511. return false;
  3512. default:
  3513. return false;
  3514. }
  3515. }
  3516. #endif
  3517. return false;
  3518. #endif
  3519. }
  3520. static bool nrf51_errata_75(void)
  3521. {
  3522. #ifndef NRF51_SERIES
  3523. return false;
  3524. #else
  3525. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  3526. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  3527. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  3528. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  3529. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  3530. #endif
  3531. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  3532. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  3533. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  3534. if (var1 == 0x01)
  3535. {
  3536. switch(var2)
  3537. {
  3538. case 0x00ul:
  3539. return false;
  3540. case 0x01ul:
  3541. return false;
  3542. case 0x02ul:
  3543. return true;
  3544. case 0x03ul:
  3545. return false;
  3546. case 0x04ul:
  3547. return true;
  3548. case 0x07ul:
  3549. return true;
  3550. case 0x08ul:
  3551. return true;
  3552. case 0x09ul:
  3553. return true;
  3554. case 0x0Aul:
  3555. return true;
  3556. case 0x0Bul:
  3557. return true;
  3558. case 0x0Cul:
  3559. return true;
  3560. case 0x0Dul:
  3561. return true;
  3562. default:
  3563. return true;
  3564. }
  3565. }
  3566. #endif
  3567. return false;
  3568. #endif
  3569. }
  3570. static bool nrf51_errata_76(void)
  3571. {
  3572. #ifndef NRF51_SERIES
  3573. return false;
  3574. #else
  3575. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  3576. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  3577. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  3578. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  3579. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  3580. #endif
  3581. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  3582. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  3583. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  3584. if (var1 == 0x01)
  3585. {
  3586. switch(var2)
  3587. {
  3588. case 0x00ul:
  3589. return false;
  3590. case 0x01ul:
  3591. return false;
  3592. case 0x02ul:
  3593. return false;
  3594. case 0x03ul:
  3595. return false;
  3596. case 0x04ul:
  3597. return false;
  3598. case 0x07ul:
  3599. return false;
  3600. case 0x08ul:
  3601. return false;
  3602. case 0x09ul:
  3603. return false;
  3604. case 0x0Aul:
  3605. return true;
  3606. case 0x0Bul:
  3607. return false;
  3608. case 0x0Cul:
  3609. return false;
  3610. case 0x0Dul:
  3611. return true;
  3612. default:
  3613. return true;
  3614. }
  3615. }
  3616. #endif
  3617. return false;
  3618. #endif
  3619. }
  3620. static bool nrf51_errata_77(void)
  3621. {
  3622. #ifndef NRF51_SERIES
  3623. return false;
  3624. #else
  3625. return false;
  3626. #endif
  3627. }
  3628. static bool nrf51_errata_78(void)
  3629. {
  3630. #ifndef NRF51_SERIES
  3631. return false;
  3632. #else
  3633. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  3634. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  3635. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  3636. uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul);
  3637. uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4;
  3638. #endif
  3639. #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\
  3640. || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\
  3641. || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422)
  3642. if (var1 == 0x01)
  3643. {
  3644. switch(var2)
  3645. {
  3646. case 0x00ul:
  3647. return false;
  3648. case 0x01ul:
  3649. return false;
  3650. case 0x02ul:
  3651. return true;
  3652. case 0x03ul:
  3653. return false;
  3654. case 0x04ul:
  3655. return true;
  3656. case 0x07ul:
  3657. return true;
  3658. case 0x08ul:
  3659. return true;
  3660. case 0x09ul:
  3661. return true;
  3662. case 0x0Aul:
  3663. return false;
  3664. case 0x0Bul:
  3665. return true;
  3666. case 0x0Cul:
  3667. return true;
  3668. case 0x0Dul:
  3669. return false;
  3670. default:
  3671. return false;
  3672. }
  3673. }
  3674. #endif
  3675. return false;
  3676. #endif
  3677. }
  3678. #endif /* NRF51_ERRATAS_H */