stm32f4xx_hal_flash_ex.lst 195 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942
  1. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 1
  2. 1 .cpu cortex-m4
  3. 2 .arch armv7e-m
  4. 3 .fpu fpv4-sp-d16
  5. 4 .eabi_attribute 27, 1
  6. 5 .eabi_attribute 28, 1
  7. 6 .eabi_attribute 20, 1
  8. 7 .eabi_attribute 21, 1
  9. 8 .eabi_attribute 23, 3
  10. 9 .eabi_attribute 24, 1
  11. 10 .eabi_attribute 25, 1
  12. 11 .eabi_attribute 26, 1
  13. 12 .eabi_attribute 30, 6
  14. 13 .eabi_attribute 34, 1
  15. 14 .eabi_attribute 18, 4
  16. 15 .file "stm32f4xx_hal_flash_ex.c"
  17. 16 .text
  18. 17 .Ltext0:
  19. 18 .cfi_sections .debug_frame
  20. 19 .section .text.HAL_FLASHEx_Erase,"ax",%progbits
  21. 20 .align 1
  22. 21 .global HAL_FLASHEx_Erase
  23. 22 .syntax unified
  24. 23 .thumb
  25. 24 .thumb_func
  26. 26 HAL_FLASHEx_Erase:
  27. 27 .LFB235:
  28. 28 .file 1 "Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c"
  29. 1:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  30. 2:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** ******************************************************************************
  31. 3:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @file stm32f4xx_hal_flash_ex.c
  32. 4:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @author MCD Application Team
  33. 5:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Extended FLASH HAL module driver.
  34. 6:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This file provides firmware functions to manage the following
  35. 7:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * functionalities of the FLASH extension peripheral:
  36. 8:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * + Extended programming operations functions
  37. 9:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  38. 10:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** @verbatim
  39. 11:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** ==============================================================================
  40. 12:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** ##### Flash Extension features #####
  41. 13:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** ==============================================================================
  42. 14:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  43. 15:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** [..] Comparing to other previous devices, the FLASH interface for STM32F427xx/437xx and
  44. 16:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** STM32F429xx/439xx devices contains the following additional features
  45. 17:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  46. 18:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (+) Capacity up to 2 Mbyte with dual bank architecture supporting read-while-write
  47. 19:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** capability (RWW)
  48. 20:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (+) Dual bank memory organization
  49. 21:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (+) PCROP protection for all banks
  50. 22:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  51. 23:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** ##### How to use this driver #####
  52. 24:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** ==============================================================================
  53. 25:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** [..] This driver provides functions to configure and program the FLASH memory
  54. 26:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** of all STM32F427xx/437xx, STM32F429xx/439xx, STM32F469xx/479xx and STM32F446xx
  55. 27:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** devices. It includes
  56. 28:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (#) FLASH Memory Erase functions:
  57. 29:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (++) Lock and Unlock the FLASH interface using HAL_FLASH_Unlock() and
  58. 30:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_FLASH_Lock() functions
  59. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 2
  60. 31:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (++) Erase function: Erase sector, erase all sectors
  61. 32:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (++) There are two modes of erase :
  62. 33:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (+++) Polling Mode using HAL_FLASHEx_Erase()
  63. 34:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (+++) Interrupt Mode using HAL_FLASHEx_Erase_IT()
  64. 35:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  65. 36:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (#) Option Bytes Programming functions: Use HAL_FLASHEx_OBProgram() to :
  66. 37:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (++) Set/Reset the write protection
  67. 38:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (++) Set the Read protection Level
  68. 39:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (++) Set the BOR level
  69. 40:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (++) Program the user Option Bytes
  70. 41:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (#) Advanced Option Bytes Programming functions: Use HAL_FLASHEx_AdvOBProgram() to :
  71. 42:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (++) Extended space (bank 2) erase function
  72. 43:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (++) Full FLASH space (2 Mo) erase (bank 1 and bank 2)
  73. 44:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (++) Dual Boot activation
  74. 45:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (++) Write protection configuration for bank 2
  75. 46:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (++) PCROP protection configuration and control for both banks
  76. 47:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  77. 48:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** @endverbatim
  78. 49:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** ******************************************************************************
  79. 50:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @attention
  80. 51:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  81. 52:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * Copyright (c) 2017 STMicroelectronics.
  82. 53:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * All rights reserved.
  83. 54:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  84. 55:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This software is licensed under terms that can be found in the LICENSE file in
  85. 56:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the root directory of this software component.
  86. 57:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * If no LICENSE file comes with this software, it is provided AS-IS.
  87. 58:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** ******************************************************************************
  88. 59:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  89. 60:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  90. 61:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Includes ------------------------------------------------------------------*/
  91. 62:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #include "stm32f4xx_hal.h"
  92. 63:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  93. 64:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** @addtogroup STM32F4xx_HAL_Driver
  94. 65:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @{
  95. 66:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  96. 67:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  97. 68:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** @defgroup FLASHEx FLASHEx
  98. 69:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief FLASH HAL Extension module driver
  99. 70:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @{
  100. 71:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  101. 72:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  102. 73:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #ifdef HAL_FLASH_MODULE_ENABLED
  103. 74:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  104. 75:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Private typedef -----------------------------------------------------------*/
  105. 76:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Private define ------------------------------------------------------------*/
  106. 77:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** @addtogroup FLASHEx_Private_Constants
  107. 78:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @{
  108. 79:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  109. 80:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #define FLASH_TIMEOUT_VALUE 50000U /* 50 s */
  110. 81:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  111. 82:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @}
  112. 83:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  113. 84:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  114. 85:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Private macro -------------------------------------------------------------*/
  115. 86:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Private variables ---------------------------------------------------------*/
  116. 87:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** @addtogroup FLASHEx_Private_Variables
  117. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 3
  118. 88:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @{
  119. 89:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  120. 90:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** extern FLASH_ProcessTypeDef pFlash;
  121. 91:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  122. 92:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @}
  123. 93:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  124. 94:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  125. 95:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Private function prototypes -----------------------------------------------*/
  126. 96:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** @addtogroup FLASHEx_Private_Functions
  127. 97:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @{
  128. 98:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  129. 99:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Option bytes control */
  130. 100:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static void FLASH_MassErase(uint8_t VoltageRange, uint32_t Banks);
  131. 101:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_EnableWRP(uint32_t WRPSector, uint32_t Banks);
  132. 102:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_DisableWRP(uint32_t WRPSector, uint32_t Banks);
  133. 103:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_RDP_LevelConfig(uint8_t Level);
  134. 104:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_UserConfig(uint8_t Iwdg, uint8_t Stop, uint8_t Stdby);
  135. 105:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_BOR_LevelConfig(uint8_t Level);
  136. 106:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static uint8_t FLASH_OB_GetUser(void);
  137. 107:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static uint16_t FLASH_OB_GetWRP(void);
  138. 108:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static uint8_t FLASH_OB_GetRDP(void);
  139. 109:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static uint8_t FLASH_OB_GetBOR(void);
  140. 110:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  141. 111:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #if defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) ||
  142. 112:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F446xx) || defined(STM32F412Zx) || defined(STM32F412Vx) || defined(STM32F412Rx) ||
  143. 113:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F423xx)
  144. 114:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_EnablePCROP(uint32_t Sector);
  145. 115:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_DisablePCROP(uint32_t Sector);
  146. 116:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #endif /* STM32F401xC || STM32F401xE || STM32F410xx || STM32F411xE || STM32F446xx || STM32F412Zx ||
  147. 117:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** STM32F413xx || STM32F423xx */
  148. 118:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  149. 119:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx)|| defined(STM32F439xx) ||
  150. 120:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_EnablePCROP(uint32_t SectorBank1, uint32_t SectorBank2, uint32_t
  151. 121:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_DisablePCROP(uint32_t SectorBank1, uint32_t SectorBank2, uint32_t
  152. 122:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_BootConfig(uint8_t BootConfig);
  153. 123:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */
  154. 124:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  155. 125:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** extern HAL_StatusTypeDef FLASH_WaitForLastOperation(uint32_t Timeout);
  156. 126:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  157. 127:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @}
  158. 128:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  159. 129:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  160. 130:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Exported functions --------------------------------------------------------*/
  161. 131:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** @defgroup FLASHEx_Exported_Functions FLASHEx Exported Functions
  162. 132:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @{
  163. 133:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  164. 134:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  165. 135:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** @defgroup FLASHEx_Exported_Functions_Group1 Extended IO operation functions
  166. 136:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Extended IO operation functions
  167. 137:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  168. 138:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** @verbatim
  169. 139:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** ===============================================================================
  170. 140:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** ##### Extended programming operation functions #####
  171. 141:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** ===============================================================================
  172. 142:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** [..]
  173. 143:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** This subsection provides a set of functions allowing to manage the Extension FLASH
  174. 144:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** programming operations.
  175. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 4
  176. 145:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  177. 146:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** @endverbatim
  178. 147:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @{
  179. 148:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  180. 149:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  181. 150:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Perform a mass erase or erase the specified FLASH memory sectors
  182. 151:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param[in] pEraseInit pointer to an FLASH_EraseInitTypeDef structure that
  183. 152:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * contains the configuration information for the erasing.
  184. 153:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  185. 154:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param[out] SectorError pointer to variable that
  186. 155:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * contains the configuration information on faulty sector in case of error
  187. 156:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * (0xFFFFFFFFU means that all the sectors have been correctly erased)
  188. 157:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  189. 158:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status
  190. 159:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  191. 160:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef HAL_FLASHEx_Erase(FLASH_EraseInitTypeDef *pEraseInit, uint32_t *SectorError)
  192. 161:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  193. 29 .loc 1 161 1
  194. 30 .cfi_startproc
  195. 31 @ args = 0, pretend = 0, frame = 16
  196. 32 @ frame_needed = 1, uses_anonymous_args = 0
  197. 33 0000 80B5 push {r7, lr}
  198. 34 .LCFI0:
  199. 35 .cfi_def_cfa_offset 8
  200. 36 .cfi_offset 7, -8
  201. 37 .cfi_offset 14, -4
  202. 38 0002 84B0 sub sp, sp, #16
  203. 39 .LCFI1:
  204. 40 .cfi_def_cfa_offset 24
  205. 41 0004 00AF add r7, sp, #0
  206. 42 .LCFI2:
  207. 43 .cfi_def_cfa_register 7
  208. 44 0006 7860 str r0, [r7, #4]
  209. 45 0008 3960 str r1, [r7]
  210. 162:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_ERROR;
  211. 46 .loc 1 162 21
  212. 47 000a 0123 movs r3, #1
  213. 48 000c FB73 strb r3, [r7, #15]
  214. 163:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** uint32_t index = 0U;
  215. 49 .loc 1 163 12
  216. 50 000e 0023 movs r3, #0
  217. 51 0010 BB60 str r3, [r7, #8]
  218. 164:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  219. 165:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Process Locked */
  220. 166:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_LOCK(&pFlash);
  221. 52 .loc 1 166 3
  222. 53 0012 314B ldr r3, .L10
  223. 54 0014 1B7E ldrb r3, [r3, #24] @ zero_extendqisi2
  224. 55 0016 012B cmp r3, #1
  225. 56 0018 01D1 bne .L2
  226. 57 .loc 1 166 3 is_stmt 0 discriminator 1
  227. 58 001a 0223 movs r3, #2
  228. 59 001c 58E0 b .L3
  229. 60 .L2:
  230. 61 .loc 1 166 3 discriminator 2
  231. 62 001e 2E4B ldr r3, .L10
  232. 63 0020 0122 movs r2, #1
  233. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 5
  234. 64 0022 1A76 strb r2, [r3, #24]
  235. 167:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  236. 168:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  237. 169:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_TYPEERASE(pEraseInit->TypeErase));
  238. 170:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  239. 171:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */
  240. 172:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
  241. 65 .loc 1 172 12 is_stmt 1 discriminator 2
  242. 66 0024 4CF25030 movw r0, #50000
  243. 67 0028 FFF7FEFF bl FLASH_WaitForLastOperation
  244. 68 002c 0346 mov r3, r0
  245. 69 002e FB73 strb r3, [r7, #15]
  246. 173:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  247. 174:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if (status == HAL_OK)
  248. 70 .loc 1 174 6 discriminator 2
  249. 71 0030 FB7B ldrb r3, [r7, #15] @ zero_extendqisi2
  250. 72 0032 002B cmp r3, #0
  251. 73 0034 48D1 bne .L4
  252. 175:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  253. 176:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Initialization of SectorError variable*/
  254. 177:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *SectorError = 0xFFFFFFFFU;
  255. 74 .loc 1 177 18
  256. 75 0036 3B68 ldr r3, [r7]
  257. 76 0038 4FF0FF32 mov r2, #-1
  258. 77 003c 1A60 str r2, [r3]
  259. 178:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  260. 179:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if (pEraseInit->TypeErase == FLASH_TYPEERASE_MASSERASE)
  261. 78 .loc 1 179 19
  262. 79 003e 7B68 ldr r3, [r7, #4]
  263. 80 0040 1B68 ldr r3, [r3]
  264. 81 .loc 1 179 8
  265. 82 0042 012B cmp r3, #1
  266. 83 0044 15D1 bne .L5
  267. 180:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  268. 181:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Mass erase to be done*/
  269. 182:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH_MassErase((uint8_t) pEraseInit->VoltageRange, pEraseInit->Banks);
  270. 84 .loc 1 182 43
  271. 85 0046 7B68 ldr r3, [r7, #4]
  272. 86 0048 1B69 ldr r3, [r3, #16]
  273. 87 .loc 1 182 7
  274. 88 004a DAB2 uxtb r2, r3
  275. 89 004c 7B68 ldr r3, [r7, #4]
  276. 90 004e 5B68 ldr r3, [r3, #4]
  277. 91 0050 1946 mov r1, r3
  278. 92 0052 1046 mov r0, r2
  279. 93 0054 FFF7FEFF bl FLASH_MassErase
  280. 183:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  281. 184:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */
  282. 185:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
  283. 94 .loc 1 185 16
  284. 95 0058 4CF25030 movw r0, #50000
  285. 96 005c FFF7FEFF bl FLASH_WaitForLastOperation
  286. 97 0060 0346 mov r3, r0
  287. 98 0062 FB73 strb r3, [r7, #15]
  288. 186:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  289. 187:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* if the erase operation is completed, disable the MER Bit */
  290. 188:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR &= (~FLASH_MER_BIT);
  291. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 6
  292. 99 .loc 1 188 17
  293. 100 0064 1D4B ldr r3, .L10+4
  294. 101 0066 1B69 ldr r3, [r3, #16]
  295. 102 0068 1C4A ldr r2, .L10+4
  296. 103 006a 23F00403 bic r3, r3, #4
  297. 104 006e 1361 str r3, [r2, #16]
  298. 105 0070 28E0 b .L6
  299. 106 .L5:
  300. 189:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  301. 190:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else
  302. 191:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  303. 192:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  304. 193:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_NBSECTORS(pEraseInit->NbSectors + pEraseInit->Sector));
  305. 194:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  306. 195:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Erase by sector by sector to be done*/
  307. 196:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** for (index = pEraseInit->Sector; index < (pEraseInit->NbSectors + pEraseInit->Sector); index+
  308. 107 .loc 1 196 18
  309. 108 0072 7B68 ldr r3, [r7, #4]
  310. 109 0074 9B68 ldr r3, [r3, #8]
  311. 110 0076 BB60 str r3, [r7, #8]
  312. 111 .loc 1 196 7
  313. 112 0078 1CE0 b .L7
  314. 113 .L9:
  315. 197:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  316. 198:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH_Erase_Sector(index, (uint8_t) pEraseInit->VoltageRange);
  317. 114 .loc 1 198 55
  318. 115 007a 7B68 ldr r3, [r7, #4]
  319. 116 007c 1B69 ldr r3, [r3, #16]
  320. 117 .loc 1 198 9
  321. 118 007e DBB2 uxtb r3, r3
  322. 119 0080 1946 mov r1, r3
  323. 120 0082 B868 ldr r0, [r7, #8]
  324. 121 0084 FFF7FEFF bl FLASH_Erase_Sector
  325. 199:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  326. 200:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */
  327. 201:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
  328. 122 .loc 1 201 18
  329. 123 0088 4CF25030 movw r0, #50000
  330. 124 008c FFF7FEFF bl FLASH_WaitForLastOperation
  331. 125 0090 0346 mov r3, r0
  332. 126 0092 FB73 strb r3, [r7, #15]
  333. 202:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  334. 203:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* If the erase operation is completed, disable the SER and SNB Bits */
  335. 204:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** CLEAR_BIT(FLASH->CR, (FLASH_CR_SER | FLASH_CR_SNB));
  336. 127 .loc 1 204 9
  337. 128 0094 114B ldr r3, .L10+4
  338. 129 0096 1B69 ldr r3, [r3, #16]
  339. 130 0098 104A ldr r2, .L10+4
  340. 131 009a 23F0FA03 bic r3, r3, #250
  341. 132 009e 1361 str r3, [r2, #16]
  342. 205:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  343. 206:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if (status != HAL_OK)
  344. 133 .loc 1 206 12
  345. 134 00a0 FB7B ldrb r3, [r7, #15] @ zero_extendqisi2
  346. 135 00a2 002B cmp r3, #0
  347. 136 00a4 03D0 beq .L8
  348. 207:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  349. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 7
  350. 208:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* In case of error, stop erase procedure and return the faulty sector*/
  351. 209:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *SectorError = index;
  352. 137 .loc 1 209 24
  353. 138 00a6 3B68 ldr r3, [r7]
  354. 139 00a8 BA68 ldr r2, [r7, #8]
  355. 140 00aa 1A60 str r2, [r3]
  356. 210:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** break;
  357. 141 .loc 1 210 11
  358. 142 00ac 0AE0 b .L6
  359. 143 .L8:
  360. 196:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  361. 144 .loc 1 196 99 discriminator 2
  362. 145 00ae BB68 ldr r3, [r7, #8]
  363. 146 00b0 0133 adds r3, r3, #1
  364. 147 00b2 BB60 str r3, [r7, #8]
  365. 148 .L7:
  366. 196:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  367. 149 .loc 1 196 59 discriminator 1
  368. 150 00b4 7B68 ldr r3, [r7, #4]
  369. 151 00b6 DA68 ldr r2, [r3, #12]
  370. 196:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  371. 152 .loc 1 196 83 discriminator 1
  372. 153 00b8 7B68 ldr r3, [r7, #4]
  373. 154 00ba 9B68 ldr r3, [r3, #8]
  374. 196:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  375. 155 .loc 1 196 71 discriminator 1
  376. 156 00bc 1344 add r3, r3, r2
  377. 196:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  378. 157 .loc 1 196 7 discriminator 1
  379. 158 00be BA68 ldr r2, [r7, #8]
  380. 159 00c0 9A42 cmp r2, r3
  381. 160 00c2 DAD3 bcc .L9
  382. 161 .L6:
  383. 211:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  384. 212:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  385. 213:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  386. 214:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Flush the caches to be sure of the data consistency */
  387. 215:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH_FlushCaches();
  388. 162 .loc 1 215 5
  389. 163 00c4 FFF7FEFF bl FLASH_FlushCaches
  390. 164 .L4:
  391. 216:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  392. 217:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  393. 218:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Process Unlocked */
  394. 219:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_UNLOCK(&pFlash);
  395. 165 .loc 1 219 3
  396. 166 00c8 034B ldr r3, .L10
  397. 167 00ca 0022 movs r2, #0
  398. 168 00cc 1A76 strb r2, [r3, #24]
  399. 220:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  400. 221:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status;
  401. 169 .loc 1 221 10
  402. 170 00ce FB7B ldrb r3, [r7, #15] @ zero_extendqisi2
  403. 171 .L3:
  404. 222:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  405. 172 .loc 1 222 1
  406. 173 00d0 1846 mov r0, r3
  407. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 8
  408. 174 00d2 1037 adds r7, r7, #16
  409. 175 .LCFI3:
  410. 176 .cfi_def_cfa_offset 8
  411. 177 00d4 BD46 mov sp, r7
  412. 178 .LCFI4:
  413. 179 .cfi_def_cfa_register 13
  414. 180 @ sp needed
  415. 181 00d6 80BD pop {r7, pc}
  416. 182 .L11:
  417. 183 .align 2
  418. 184 .L10:
  419. 185 00d8 00000000 .word pFlash
  420. 186 00dc 003C0240 .word 1073888256
  421. 187 .cfi_endproc
  422. 188 .LFE235:
  423. 190 .section .text.HAL_FLASHEx_Erase_IT,"ax",%progbits
  424. 191 .align 1
  425. 192 .global HAL_FLASHEx_Erase_IT
  426. 193 .syntax unified
  427. 194 .thumb
  428. 195 .thumb_func
  429. 197 HAL_FLASHEx_Erase_IT:
  430. 198 .LFB236:
  431. 223:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  432. 224:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  433. 225:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Perform a mass erase or erase the specified FLASH memory sectors with interrupt enable
  434. 226:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param pEraseInit pointer to an FLASH_EraseInitTypeDef structure that
  435. 227:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * contains the configuration information for the erasing.
  436. 228:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  437. 229:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status
  438. 230:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  439. 231:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef HAL_FLASHEx_Erase_IT(FLASH_EraseInitTypeDef *pEraseInit)
  440. 232:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  441. 199 .loc 1 232 1
  442. 200 .cfi_startproc
  443. 201 @ args = 0, pretend = 0, frame = 16
  444. 202 @ frame_needed = 1, uses_anonymous_args = 0
  445. 203 0000 80B5 push {r7, lr}
  446. 204 .LCFI5:
  447. 205 .cfi_def_cfa_offset 8
  448. 206 .cfi_offset 7, -8
  449. 207 .cfi_offset 14, -4
  450. 208 0002 84B0 sub sp, sp, #16
  451. 209 .LCFI6:
  452. 210 .cfi_def_cfa_offset 24
  453. 211 0004 00AF add r7, sp, #0
  454. 212 .LCFI7:
  455. 213 .cfi_def_cfa_register 7
  456. 214 0006 7860 str r0, [r7, #4]
  457. 233:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK;
  458. 215 .loc 1 233 21
  459. 216 0008 0023 movs r3, #0
  460. 217 000a FB73 strb r3, [r7, #15]
  461. 234:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  462. 235:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Process Locked */
  463. 236:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_LOCK(&pFlash);
  464. 218 .loc 1 236 3
  465. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 9
  466. 219 000c 254B ldr r3, .L17
  467. 220 000e 1B7E ldrb r3, [r3, #24] @ zero_extendqisi2
  468. 221 0010 012B cmp r3, #1
  469. 222 0012 01D1 bne .L13
  470. 223 .loc 1 236 3 is_stmt 0 discriminator 1
  471. 224 0014 0223 movs r3, #2
  472. 225 0016 40E0 b .L14
  473. 226 .L13:
  474. 227 .loc 1 236 3 discriminator 2
  475. 228 0018 224B ldr r3, .L17
  476. 229 001a 0122 movs r2, #1
  477. 230 001c 1A76 strb r2, [r3, #24]
  478. 237:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  479. 238:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  480. 239:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_TYPEERASE(pEraseInit->TypeErase));
  481. 240:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  482. 241:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Enable End of FLASH Operation interrupt */
  483. 242:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_FLASH_ENABLE_IT(FLASH_IT_EOP);
  484. 231 .loc 1 242 3 is_stmt 1 discriminator 2
  485. 232 001e 224B ldr r3, .L17+4
  486. 233 0020 1B69 ldr r3, [r3, #16]
  487. 234 0022 214A ldr r2, .L17+4
  488. 235 0024 43F08073 orr r3, r3, #16777216
  489. 236 0028 1361 str r3, [r2, #16]
  490. 243:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  491. 244:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Enable Error source interrupt */
  492. 245:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_FLASH_ENABLE_IT(FLASH_IT_ERR);
  493. 237 .loc 1 245 3 discriminator 2
  494. 238 002a 1F4B ldr r3, .L17+4
  495. 239 002c 1B69 ldr r3, [r3, #16]
  496. 240 002e 1E4A ldr r2, .L17+4
  497. 241 0030 43F00073 orr r3, r3, #33554432
  498. 242 0034 1361 str r3, [r2, #16]
  499. 246:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  500. 247:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Clear pending flags (if any) */
  501. 248:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP | FLASH_FLAG_OPERR | FLASH_FLAG_WRPERR | \
  502. 243 .loc 1 248 3 discriminator 2
  503. 244 0036 1C4B ldr r3, .L17+4
  504. 245 0038 F322 movs r2, #243
  505. 246 003a DA60 str r2, [r3, #12]
  506. 249:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH_FLAG_PGAERR | FLASH_FLAG_PGPERR | FLASH_FLAG_PGSERR);
  507. 250:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  508. 251:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if (pEraseInit->TypeErase == FLASH_TYPEERASE_MASSERASE)
  509. 247 .loc 1 251 17 discriminator 2
  510. 248 003c 7B68 ldr r3, [r7, #4]
  511. 249 003e 1B68 ldr r3, [r3]
  512. 250 .loc 1 251 6 discriminator 2
  513. 251 0040 012B cmp r3, #1
  514. 252 0042 10D1 bne .L15
  515. 252:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  516. 253:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Mass erase to be done*/
  517. 254:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pFlash.ProcedureOnGoing = FLASH_PROC_MASSERASE;
  518. 253 .loc 1 254 29
  519. 254 0044 174B ldr r3, .L17
  520. 255 0046 0222 movs r2, #2
  521. 256 0048 1A70 strb r2, [r3]
  522. 255:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pFlash.Bank = pEraseInit->Banks;
  523. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 10
  524. 257 .loc 1 255 29
  525. 258 004a 7B68 ldr r3, [r7, #4]
  526. 259 004c 5B68 ldr r3, [r3, #4]
  527. 260 .loc 1 255 17
  528. 261 004e 154A ldr r2, .L17
  529. 262 0050 1361 str r3, [r2, #16]
  530. 256:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH_MassErase((uint8_t) pEraseInit->VoltageRange, pEraseInit->Banks);
  531. 263 .loc 1 256 41
  532. 264 0052 7B68 ldr r3, [r7, #4]
  533. 265 0054 1B69 ldr r3, [r3, #16]
  534. 266 .loc 1 256 5
  535. 267 0056 DAB2 uxtb r2, r3
  536. 268 0058 7B68 ldr r3, [r7, #4]
  537. 269 005a 5B68 ldr r3, [r3, #4]
  538. 270 005c 1946 mov r1, r3
  539. 271 005e 1046 mov r0, r2
  540. 272 0060 FFF7FEFF bl FLASH_MassErase
  541. 273 0064 18E0 b .L16
  542. 274 .L15:
  543. 257:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  544. 258:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else
  545. 259:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  546. 260:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Erase by sector to be done*/
  547. 261:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  548. 262:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  549. 263:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_NBSECTORS(pEraseInit->NbSectors + pEraseInit->Sector));
  550. 264:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  551. 265:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pFlash.ProcedureOnGoing = FLASH_PROC_SECTERASE;
  552. 275 .loc 1 265 29
  553. 276 0066 0F4B ldr r3, .L17
  554. 277 0068 0122 movs r2, #1
  555. 278 006a 1A70 strb r2, [r3]
  556. 266:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pFlash.NbSectorsToErase = pEraseInit->NbSectors;
  557. 279 .loc 1 266 41
  558. 280 006c 7B68 ldr r3, [r7, #4]
  559. 281 006e DB68 ldr r3, [r3, #12]
  560. 282 .loc 1 266 29
  561. 283 0070 0C4A ldr r2, .L17
  562. 284 0072 5360 str r3, [r2, #4]
  563. 267:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pFlash.Sector = pEraseInit->Sector;
  564. 285 .loc 1 267 31
  565. 286 0074 7B68 ldr r3, [r7, #4]
  566. 287 0076 9B68 ldr r3, [r3, #8]
  567. 288 .loc 1 267 19
  568. 289 0078 0A4A ldr r2, .L17
  569. 290 007a D360 str r3, [r2, #12]
  570. 268:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pFlash.VoltageForErase = (uint8_t)pEraseInit->VoltageRange;
  571. 291 .loc 1 268 49
  572. 292 007c 7B68 ldr r3, [r7, #4]
  573. 293 007e 1B69 ldr r3, [r3, #16]
  574. 294 .loc 1 268 30
  575. 295 0080 DAB2 uxtb r2, r3
  576. 296 .loc 1 268 28
  577. 297 0082 084B ldr r3, .L17
  578. 298 0084 1A72 strb r2, [r3, #8]
  579. 269:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  580. 270:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Erase 1st sector and wait for IT*/
  581. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 11
  582. 271:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH_Erase_Sector(pEraseInit->Sector, pEraseInit->VoltageRange);
  583. 299 .loc 1 271 5
  584. 300 0086 7B68 ldr r3, [r7, #4]
  585. 301 0088 9A68 ldr r2, [r3, #8]
  586. 302 .loc 1 271 54
  587. 303 008a 7B68 ldr r3, [r7, #4]
  588. 304 008c 1B69 ldr r3, [r3, #16]
  589. 305 .loc 1 271 5
  590. 306 008e DBB2 uxtb r3, r3
  591. 307 0090 1946 mov r1, r3
  592. 308 0092 1046 mov r0, r2
  593. 309 0094 FFF7FEFF bl FLASH_Erase_Sector
  594. 310 .L16:
  595. 272:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  596. 273:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  597. 274:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status;
  598. 311 .loc 1 274 10
  599. 312 0098 FB7B ldrb r3, [r7, #15] @ zero_extendqisi2
  600. 313 .L14:
  601. 275:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  602. 314 .loc 1 275 1
  603. 315 009a 1846 mov r0, r3
  604. 316 009c 1037 adds r7, r7, #16
  605. 317 .LCFI8:
  606. 318 .cfi_def_cfa_offset 8
  607. 319 009e BD46 mov sp, r7
  608. 320 .LCFI9:
  609. 321 .cfi_def_cfa_register 13
  610. 322 @ sp needed
  611. 323 00a0 80BD pop {r7, pc}
  612. 324 .L18:
  613. 325 00a2 00BF .align 2
  614. 326 .L17:
  615. 327 00a4 00000000 .word pFlash
  616. 328 00a8 003C0240 .word 1073888256
  617. 329 .cfi_endproc
  618. 330 .LFE236:
  619. 332 .section .text.HAL_FLASHEx_OBProgram,"ax",%progbits
  620. 333 .align 1
  621. 334 .global HAL_FLASHEx_OBProgram
  622. 335 .syntax unified
  623. 336 .thumb
  624. 337 .thumb_func
  625. 339 HAL_FLASHEx_OBProgram:
  626. 340 .LFB237:
  627. 276:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  628. 277:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  629. 278:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Program option bytes
  630. 279:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param pOBInit pointer to an FLASH_OBInitStruct structure that
  631. 280:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * contains the configuration information for the programming.
  632. 281:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  633. 282:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status
  634. 283:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  635. 284:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef HAL_FLASHEx_OBProgram(FLASH_OBProgramInitTypeDef *pOBInit)
  636. 285:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  637. 341 .loc 1 285 1
  638. 342 .cfi_startproc
  639. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 12
  640. 343 @ args = 0, pretend = 0, frame = 16
  641. 344 @ frame_needed = 1, uses_anonymous_args = 0
  642. 345 0000 80B5 push {r7, lr}
  643. 346 .LCFI10:
  644. 347 .cfi_def_cfa_offset 8
  645. 348 .cfi_offset 7, -8
  646. 349 .cfi_offset 14, -4
  647. 350 0002 84B0 sub sp, sp, #16
  648. 351 .LCFI11:
  649. 352 .cfi_def_cfa_offset 24
  650. 353 0004 00AF add r7, sp, #0
  651. 354 .LCFI12:
  652. 355 .cfi_def_cfa_register 7
  653. 356 0006 7860 str r0, [r7, #4]
  654. 286:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_ERROR;
  655. 357 .loc 1 286 21
  656. 358 0008 0123 movs r3, #1
  657. 359 000a FB73 strb r3, [r7, #15]
  658. 287:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  659. 288:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Process Locked */
  660. 289:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_LOCK(&pFlash);
  661. 360 .loc 1 289 3
  662. 361 000c 324B ldr r3, .L27
  663. 362 000e 1B7E ldrb r3, [r3, #24] @ zero_extendqisi2
  664. 363 0010 012B cmp r3, #1
  665. 364 0012 01D1 bne .L20
  666. 365 .loc 1 289 3 is_stmt 0 discriminator 1
  667. 366 0014 0223 movs r3, #2
  668. 367 0016 5BE0 b .L21
  669. 368 .L20:
  670. 369 .loc 1 289 3 discriminator 2
  671. 370 0018 2F4B ldr r3, .L27
  672. 371 001a 0122 movs r2, #1
  673. 372 001c 1A76 strb r2, [r3, #24]
  674. 290:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  675. 291:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  676. 292:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OPTIONBYTE(pOBInit->OptionType));
  677. 293:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  678. 294:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection configuration*/
  679. 295:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if ((pOBInit->OptionType & OPTIONBYTE_WRP) == OPTIONBYTE_WRP)
  680. 373 .loc 1 295 15 is_stmt 1 discriminator 2
  681. 374 001e 7B68 ldr r3, [r7, #4]
  682. 375 0020 1B68 ldr r3, [r3]
  683. 376 .loc 1 295 28 discriminator 2
  684. 377 0022 03F00103 and r3, r3, #1
  685. 378 .loc 1 295 6 discriminator 2
  686. 379 0026 002B cmp r3, #0
  687. 380 0028 18D0 beq .L22
  688. 296:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  689. 297:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_WRPSTATE(pOBInit->WRPState));
  690. 298:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if (pOBInit->WRPState == OB_WRPSTATE_ENABLE)
  691. 381 .loc 1 298 16
  692. 382 002a 7B68 ldr r3, [r7, #4]
  693. 383 002c 5B68 ldr r3, [r3, #4]
  694. 384 .loc 1 298 8
  695. 385 002e 012B cmp r3, #1
  696. 386 0030 0AD1 bne .L23
  697. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 13
  698. 299:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  699. 300:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Enable of Write protection on the selected Sector*/
  700. 301:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_OB_EnableWRP(pOBInit->WRPSector, pOBInit->Banks);
  701. 387 .loc 1 301 16
  702. 388 0032 7B68 ldr r3, [r7, #4]
  703. 389 0034 9A68 ldr r2, [r3, #8]
  704. 390 0036 7B68 ldr r3, [r7, #4]
  705. 391 0038 DB68 ldr r3, [r3, #12]
  706. 392 003a 1946 mov r1, r3
  707. 393 003c 1046 mov r0, r2
  708. 394 003e FFF7FEFF bl FLASH_OB_EnableWRP
  709. 395 0042 0346 mov r3, r0
  710. 396 0044 FB73 strb r3, [r7, #15]
  711. 397 0046 09E0 b .L22
  712. 398 .L23:
  713. 302:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  714. 303:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else
  715. 304:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  716. 305:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Disable of Write protection on the selected Sector*/
  717. 306:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_OB_DisableWRP(pOBInit->WRPSector, pOBInit->Banks);
  718. 399 .loc 1 306 16
  719. 400 0048 7B68 ldr r3, [r7, #4]
  720. 401 004a 9A68 ldr r2, [r3, #8]
  721. 402 004c 7B68 ldr r3, [r7, #4]
  722. 403 004e DB68 ldr r3, [r3, #12]
  723. 404 0050 1946 mov r1, r3
  724. 405 0052 1046 mov r0, r2
  725. 406 0054 FFF7FEFF bl FLASH_OB_DisableWRP
  726. 407 0058 0346 mov r3, r0
  727. 408 005a FB73 strb r3, [r7, #15]
  728. 409 .L22:
  729. 307:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  730. 308:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  731. 309:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  732. 310:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Read protection configuration*/
  733. 311:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if ((pOBInit->OptionType & OPTIONBYTE_RDP) == OPTIONBYTE_RDP)
  734. 410 .loc 1 311 15
  735. 411 005c 7B68 ldr r3, [r7, #4]
  736. 412 005e 1B68 ldr r3, [r3]
  737. 413 .loc 1 311 28
  738. 414 0060 03F00203 and r3, r3, #2
  739. 415 .loc 1 311 6
  740. 416 0064 002B cmp r3, #0
  741. 417 0066 07D0 beq .L24
  742. 312:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  743. 313:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_OB_RDP_LevelConfig(pOBInit->RDPLevel);
  744. 418 .loc 1 313 46
  745. 419 0068 7B68 ldr r3, [r7, #4]
  746. 420 006a 1B69 ldr r3, [r3, #16]
  747. 421 .loc 1 313 14
  748. 422 006c DBB2 uxtb r3, r3
  749. 423 006e 1846 mov r0, r3
  750. 424 0070 FFF7FEFF bl FLASH_OB_RDP_LevelConfig
  751. 425 0074 0346 mov r3, r0
  752. 426 0076 FB73 strb r3, [r7, #15]
  753. 427 .L24:
  754. 314:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  755. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 14
  756. 315:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  757. 316:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*USER configuration*/
  758. 317:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if ((pOBInit->OptionType & OPTIONBYTE_USER) == OPTIONBYTE_USER)
  759. 428 .loc 1 317 15
  760. 429 0078 7B68 ldr r3, [r7, #4]
  761. 430 007a 1B68 ldr r3, [r3]
  762. 431 .loc 1 317 28
  763. 432 007c 03F00403 and r3, r3, #4
  764. 433 .loc 1 317 6
  765. 434 0080 002B cmp r3, #0
  766. 435 0082 13D0 beq .L25
  767. 318:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  768. 319:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_OB_UserConfig(pOBInit->USERConfig & OB_IWDG_SW,
  769. 436 .loc 1 319 41
  770. 437 0084 7B68 ldr r3, [r7, #4]
  771. 438 0086 1B7E ldrb r3, [r3, #24] @ zero_extendqisi2
  772. 439 .loc 1 319 14
  773. 440 0088 03F02003 and r3, r3, #32
  774. 441 008c D8B2 uxtb r0, r3
  775. 320:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pOBInit->USERConfig & OB_STOP_NO_RST,
  776. 442 .loc 1 320 41
  777. 443 008e 7B68 ldr r3, [r7, #4]
  778. 444 0090 1B7E ldrb r3, [r3, #24] @ zero_extendqisi2
  779. 319:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pOBInit->USERConfig & OB_STOP_NO_RST,
  780. 445 .loc 1 319 14
  781. 446 0092 03F04003 and r3, r3, #64
  782. 447 0096 D9B2 uxtb r1, r3
  783. 321:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pOBInit->USERConfig & OB_STDBY_NO_RST);
  784. 448 .loc 1 321 41
  785. 449 0098 7B68 ldr r3, [r7, #4]
  786. 450 009a 1B7E ldrb r3, [r3, #24] @ zero_extendqisi2
  787. 319:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pOBInit->USERConfig & OB_STOP_NO_RST,
  788. 451 .loc 1 319 14
  789. 452 009c 23F07F03 bic r3, r3, #127
  790. 453 00a0 DBB2 uxtb r3, r3
  791. 454 00a2 1A46 mov r2, r3
  792. 455 00a4 FFF7FEFF bl FLASH_OB_UserConfig
  793. 456 00a8 0346 mov r3, r0
  794. 457 00aa FB73 strb r3, [r7, #15]
  795. 458 .L25:
  796. 322:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  797. 323:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  798. 324:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*BOR Level configuration*/
  799. 325:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if ((pOBInit->OptionType & OPTIONBYTE_BOR) == OPTIONBYTE_BOR)
  800. 459 .loc 1 325 15
  801. 460 00ac 7B68 ldr r3, [r7, #4]
  802. 461 00ae 1B68 ldr r3, [r3]
  803. 462 .loc 1 325 28
  804. 463 00b0 03F00803 and r3, r3, #8
  805. 464 .loc 1 325 6
  806. 465 00b4 002B cmp r3, #0
  807. 466 00b6 07D0 beq .L26
  808. 326:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  809. 327:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_OB_BOR_LevelConfig(pOBInit->BORLevel);
  810. 467 .loc 1 327 46
  811. 468 00b8 7B68 ldr r3, [r7, #4]
  812. 469 00ba 5B69 ldr r3, [r3, #20]
  813. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 15
  814. 470 .loc 1 327 14
  815. 471 00bc DBB2 uxtb r3, r3
  816. 472 00be 1846 mov r0, r3
  817. 473 00c0 FFF7FEFF bl FLASH_OB_BOR_LevelConfig
  818. 474 00c4 0346 mov r3, r0
  819. 475 00c6 FB73 strb r3, [r7, #15]
  820. 476 .L26:
  821. 328:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  822. 329:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  823. 330:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Process Unlocked */
  824. 331:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_UNLOCK(&pFlash);
  825. 477 .loc 1 331 3
  826. 478 00c8 034B ldr r3, .L27
  827. 479 00ca 0022 movs r2, #0
  828. 480 00cc 1A76 strb r2, [r3, #24]
  829. 332:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  830. 333:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status;
  831. 481 .loc 1 333 10
  832. 482 00ce FB7B ldrb r3, [r7, #15] @ zero_extendqisi2
  833. 483 .L21:
  834. 334:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  835. 484 .loc 1 334 1
  836. 485 00d0 1846 mov r0, r3
  837. 486 00d2 1037 adds r7, r7, #16
  838. 487 .LCFI13:
  839. 488 .cfi_def_cfa_offset 8
  840. 489 00d4 BD46 mov sp, r7
  841. 490 .LCFI14:
  842. 491 .cfi_def_cfa_register 13
  843. 492 @ sp needed
  844. 493 00d6 80BD pop {r7, pc}
  845. 494 .L28:
  846. 495 .align 2
  847. 496 .L27:
  848. 497 00d8 00000000 .word pFlash
  849. 498 .cfi_endproc
  850. 499 .LFE237:
  851. 501 .section .text.HAL_FLASHEx_OBGetConfig,"ax",%progbits
  852. 502 .align 1
  853. 503 .global HAL_FLASHEx_OBGetConfig
  854. 504 .syntax unified
  855. 505 .thumb
  856. 506 .thumb_func
  857. 508 HAL_FLASHEx_OBGetConfig:
  858. 509 .LFB238:
  859. 335:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  860. 336:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  861. 337:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Get the Option byte configuration
  862. 338:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param pOBInit pointer to an FLASH_OBInitStruct structure that
  863. 339:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * contains the configuration information for the programming.
  864. 340:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  865. 341:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval None
  866. 342:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  867. 343:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** void HAL_FLASHEx_OBGetConfig(FLASH_OBProgramInitTypeDef *pOBInit)
  868. 344:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  869. 510 .loc 1 344 1
  870. 511 .cfi_startproc
  871. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 16
  872. 512 @ args = 0, pretend = 0, frame = 8
  873. 513 @ frame_needed = 1, uses_anonymous_args = 0
  874. 514 0000 80B5 push {r7, lr}
  875. 515 .LCFI15:
  876. 516 .cfi_def_cfa_offset 8
  877. 517 .cfi_offset 7, -8
  878. 518 .cfi_offset 14, -4
  879. 519 0002 82B0 sub sp, sp, #8
  880. 520 .LCFI16:
  881. 521 .cfi_def_cfa_offset 16
  882. 522 0004 00AF add r7, sp, #0
  883. 523 .LCFI17:
  884. 524 .cfi_def_cfa_register 7
  885. 525 0006 7860 str r0, [r7, #4]
  886. 345:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pOBInit->OptionType = OPTIONBYTE_WRP | OPTIONBYTE_RDP | OPTIONBYTE_USER | OPTIONBYTE_BOR;
  887. 526 .loc 1 345 23
  888. 527 0008 7B68 ldr r3, [r7, #4]
  889. 528 000a 0F22 movs r2, #15
  890. 529 000c 1A60 str r2, [r3]
  891. 346:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  892. 347:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Get WRP*/
  893. 348:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pOBInit->WRPSector = (uint32_t)FLASH_OB_GetWRP();
  894. 530 .loc 1 348 34
  895. 531 000e FFF7FEFF bl FLASH_OB_GetWRP
  896. 532 0012 0346 mov r3, r0
  897. 533 .loc 1 348 24
  898. 534 0014 1A46 mov r2, r3
  899. 535 .loc 1 348 22
  900. 536 0016 7B68 ldr r3, [r7, #4]
  901. 537 0018 9A60 str r2, [r3, #8]
  902. 349:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  903. 350:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Get RDP Level*/
  904. 351:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pOBInit->RDPLevel = (uint32_t)FLASH_OB_GetRDP();
  905. 538 .loc 1 351 33
  906. 539 001a FFF7FEFF bl FLASH_OB_GetRDP
  907. 540 001e 0346 mov r3, r0
  908. 541 .loc 1 351 23
  909. 542 0020 1A46 mov r2, r3
  910. 543 .loc 1 351 21
  911. 544 0022 7B68 ldr r3, [r7, #4]
  912. 545 0024 1A61 str r2, [r3, #16]
  913. 352:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  914. 353:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Get USER*/
  915. 354:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pOBInit->USERConfig = (uint8_t)FLASH_OB_GetUser();
  916. 546 .loc 1 354 34
  917. 547 0026 FFF7FEFF bl FLASH_OB_GetUser
  918. 548 002a 0346 mov r3, r0
  919. 549 002c 1A46 mov r2, r3
  920. 550 .loc 1 354 23
  921. 551 002e 7B68 ldr r3, [r7, #4]
  922. 552 0030 1A76 strb r2, [r3, #24]
  923. 355:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  924. 356:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Get BOR Level*/
  925. 357:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pOBInit->BORLevel = (uint32_t)FLASH_OB_GetBOR();
  926. 553 .loc 1 357 33
  927. 554 0032 FFF7FEFF bl FLASH_OB_GetBOR
  928. 555 0036 0346 mov r3, r0
  929. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 17
  930. 556 .loc 1 357 23
  931. 557 0038 1A46 mov r2, r3
  932. 558 .loc 1 357 21
  933. 559 003a 7B68 ldr r3, [r7, #4]
  934. 560 003c 5A61 str r2, [r3, #20]
  935. 358:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  936. 561 .loc 1 358 1
  937. 562 003e 00BF nop
  938. 563 0040 0837 adds r7, r7, #8
  939. 564 .LCFI18:
  940. 565 .cfi_def_cfa_offset 8
  941. 566 0042 BD46 mov sp, r7
  942. 567 .LCFI19:
  943. 568 .cfi_def_cfa_register 13
  944. 569 @ sp needed
  945. 570 0044 80BD pop {r7, pc}
  946. 571 .cfi_endproc
  947. 572 .LFE238:
  948. 574 .section .text.FLASH_MassErase,"ax",%progbits
  949. 575 .align 1
  950. 576 .syntax unified
  951. 577 .thumb
  952. 578 .thumb_func
  953. 580 FLASH_MassErase:
  954. 581 .LFB239:
  955. 359:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  956. 360:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) ||
  957. 361:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) ||
  958. 362:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F410Rx) || defined(STM32F411xE) || defined(STM32F446xx) || defined(STM32F469xx) ||
  959. 363:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx) || defined(STM32F412Rx) ||
  960. 364:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F412Cx) || defined(STM32F413xx) || defined(STM32F423xx)
  961. 365:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  962. 366:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Program option bytes
  963. 367:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param pAdvOBInit pointer to an FLASH_AdvOBProgramInitTypeDef structure that
  964. 368:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * contains the configuration information for the programming.
  965. 369:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  966. 370:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status
  967. 371:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  968. 372:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef HAL_FLASHEx_AdvOBProgram(FLASH_AdvOBProgramInitTypeDef *pAdvOBInit)
  969. 373:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  970. 374:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_ERROR;
  971. 375:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  972. 376:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  973. 377:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OBEX(pAdvOBInit->OptionType));
  974. 378:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  975. 379:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Program PCROP option byte*/
  976. 380:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if (((pAdvOBInit->OptionType) & OPTIONBYTE_PCROP) == OPTIONBYTE_PCROP)
  977. 381:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  978. 382:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  979. 383:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_PCROPSTATE(pAdvOBInit->PCROPState));
  980. 384:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if ((pAdvOBInit->PCROPState) == OB_PCROP_STATE_ENABLE)
  981. 385:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  982. 386:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Enable of Write protection on the selected Sector*/
  983. 387:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #if defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) ||
  984. 388:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F411xE) || defined(STM32F446xx) || defined(STM32F412Zx) || defined(STM32F412Vx) ||
  985. 389:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F412Cx) || defined(STM32F413xx) || defined(STM32F423xx)
  986. 390:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_OB_EnablePCROP(pAdvOBInit->Sectors);
  987. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 18
  988. 391:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #else /* STM32F427xx || STM32F437xx || STM32F429xx|| STM32F439xx || STM32F469xx || STM32F479xx */
  989. 392:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_OB_EnablePCROP(pAdvOBInit->SectorsBank1, pAdvOBInit->SectorsBank2, pAdvOBInit-
  990. 393:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #endif /* STM32F401xC || STM32F401xE || STM32F410xx || STM32F411xE || STM32F446xx || STM32F412Zx ||
  991. 394:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** STM32F413xx || STM32F423xx */
  992. 395:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  993. 396:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else
  994. 397:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  995. 398:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Disable of Write protection on the selected Sector*/
  996. 399:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #if defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) ||
  997. 400:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F411xE) || defined(STM32F446xx) || defined(STM32F412Zx) || defined(STM32F412Vx) ||
  998. 401:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F412Cx) || defined(STM32F413xx) || defined(STM32F423xx)
  999. 402:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_OB_DisablePCROP(pAdvOBInit->Sectors);
  1000. 403:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #else /* STM32F427xx || STM32F437xx || STM32F429xx|| STM32F439xx || STM32F469xx || STM32F479xx */
  1001. 404:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_OB_DisablePCROP(pAdvOBInit->SectorsBank1, pAdvOBInit->SectorsBank2, pAdvOBInit
  1002. 405:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #endif /* STM32F401xC || STM32F401xE || STM32F410xx || STM32F411xE || STM32F446xx || STM32F412Zx ||
  1003. 406:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** STM32F413xx || STM32F423xx */
  1004. 407:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1005. 408:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1006. 409:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1007. 410:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) ||
  1008. 411:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Program BOOT config option byte*/
  1009. 412:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if (((pAdvOBInit->OptionType) & OPTIONBYTE_BOOTCONFIG) == OPTIONBYTE_BOOTCONFIG)
  1010. 413:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1011. 414:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_OB_BootConfig(pAdvOBInit->BootConfig);
  1012. 415:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1013. 416:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */
  1014. 417:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1015. 418:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status;
  1016. 419:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1017. 420:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1018. 421:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  1019. 422:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Get the OBEX byte configuration
  1020. 423:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param pAdvOBInit pointer to an FLASH_AdvOBProgramInitTypeDef structure that
  1021. 424:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * contains the configuration information for the programming.
  1022. 425:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1023. 426:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval None
  1024. 427:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  1025. 428:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** void HAL_FLASHEx_AdvOBGetConfig(FLASH_AdvOBProgramInitTypeDef *pAdvOBInit)
  1026. 429:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1027. 430:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #if defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) ||
  1028. 431:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F411xE) || defined(STM32F446xx) || defined(STM32F412Zx) || defined(STM32F412Vx) ||
  1029. 432:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F412Cx) || defined(STM32F413xx) || defined(STM32F423xx)
  1030. 433:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Get Sector*/
  1031. 434:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pAdvOBInit->Sectors = (*(__IO uint16_t *)(OPTCR_BYTE2_ADDRESS));
  1032. 435:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #else /* STM32F427xx || STM32F437xx || STM32F429xx|| STM32F439xx || STM32F469xx || STM32F479xx */
  1033. 436:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Get Sector for Bank1*/
  1034. 437:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pAdvOBInit->SectorsBank1 = (*(__IO uint16_t *)(OPTCR_BYTE2_ADDRESS));
  1035. 438:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1036. 439:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Get Sector for Bank2*/
  1037. 440:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pAdvOBInit->SectorsBank2 = (*(__IO uint16_t *)(OPTCR1_BYTE2_ADDRESS));
  1038. 441:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1039. 442:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Get Boot config OB*/
  1040. 443:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pAdvOBInit->BootConfig = *(__IO uint8_t *)OPTCR_BYTE0_ADDRESS;
  1041. 444:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #endif /* STM32F401xC || STM32F401xE || STM32F410xx || STM32F411xE || STM32F446xx || STM32F412Zx ||
  1042. 445:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** STM32F413xx || STM32F423xx */
  1043. 446:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1044. 447:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1045. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 19
  1046. 448:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  1047. 449:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Select the Protection Mode
  1048. 450:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1049. 451:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note After PCROP activated Option Byte modification NOT POSSIBLE! excepted
  1050. 452:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * Global Read Out Protection modification (from level1 to level0)
  1051. 453:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note Once SPRMOD bit is active unprotection of a protected sector is not possible
  1052. 454:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note Read a protected sector will set RDERR Flag and write a protected sector will set WRPER
  1053. 455:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note This function can be used only for STM32F42xxx/STM32F43xxx/STM32F401xx/STM32F411xx/STM3
  1054. 456:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * STM32F469xx/STM32F479xx/STM32F412xx/STM32F413xx devices.
  1055. 457:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1056. 458:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status
  1057. 459:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  1058. 460:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef HAL_FLASHEx_OB_SelectPCROP(void)
  1059. 461:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1060. 462:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** uint8_t optiontmp = 0xFF;
  1061. 463:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1062. 464:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Mask SPRMOD bit */
  1063. 465:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** optiontmp = (uint8_t)((*(__IO uint8_t *)OPTCR_BYTE3_ADDRESS) & (uint8_t)0x7F);
  1064. 466:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1065. 467:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Update Option Byte */
  1066. 468:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint8_t *)OPTCR_BYTE3_ADDRESS = (uint8_t)(OB_PCROP_SELECTED | optiontmp);
  1067. 469:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1068. 470:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return HAL_OK;
  1069. 471:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1070. 472:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1071. 473:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  1072. 474:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Deselect the Protection Mode
  1073. 475:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1074. 476:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note After PCROP activated Option Byte modification NOT POSSIBLE! excepted
  1075. 477:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * Global Read Out Protection modification (from level1 to level0)
  1076. 478:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note Once SPRMOD bit is active unprotection of a protected sector is not possible
  1077. 479:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note Read a protected sector will set RDERR Flag and write a protected sector will set WRPER
  1078. 480:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note This function can be used only for STM32F42xxx/STM32F43xxx/STM32F401xx/STM32F411xx/STM3
  1079. 481:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * STM32F469xx/STM32F479xx/STM32F412xx/STM32F413xx devices.
  1080. 482:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1081. 483:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status
  1082. 484:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  1083. 485:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef HAL_FLASHEx_OB_DeSelectPCROP(void)
  1084. 486:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1085. 487:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** uint8_t optiontmp = 0xFF;
  1086. 488:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1087. 489:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Mask SPRMOD bit */
  1088. 490:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** optiontmp = (uint8_t)((*(__IO uint8_t *)OPTCR_BYTE3_ADDRESS) & (uint8_t)0x7F);
  1089. 491:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1090. 492:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Update Option Byte */
  1091. 493:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint8_t *)OPTCR_BYTE3_ADDRESS = (uint8_t)(OB_PCROP_DESELECTED | optiontmp);
  1092. 494:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1093. 495:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return HAL_OK;
  1094. 496:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1095. 497:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F401xC || STM32F401xE ||
  1096. 498:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** STM32F411xE || STM32F469xx || STM32F479xx || STM32F412Zx || STM32F412Vx || STM32F412Rx ||
  1097. 499:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** STM32F413xx || STM32F423xx */
  1098. 500:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1099. 501:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx)|| defined(STM32F439xx) ||
  1100. 502:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  1101. 503:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Returns the FLASH Write Protection Option Bytes value for Bank 2
  1102. 504:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note This function can be used only for STM32F42xxx/STM32F43xxx/STM32F469xx/STM32F479xx devi
  1103. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 20
  1104. 505:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval The FLASH Write Protection Option Bytes value
  1105. 506:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  1106. 507:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** uint16_t HAL_FLASHEx_OB_GetBank2WRP(void)
  1107. 508:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1108. 509:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Return the FLASH write protection Register value */
  1109. 510:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return (*(__IO uint16_t *)(OPTCR1_BYTE2_ADDRESS));
  1110. 511:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1111. 512:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */
  1112. 513:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1113. 514:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  1114. 515:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @}
  1115. 516:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  1116. 517:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1117. 518:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) ||
  1118. 519:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  1119. 520:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Full erase of FLASH memory sectors
  1120. 521:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param VoltageRange The device voltage range which defines the erase parallelism.
  1121. 522:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  1122. 523:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_VOLTAGE_RANGE_1: when the device voltage range is 1.8V to 2.1V,
  1123. 524:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by byte (8-bit)
  1124. 525:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_VOLTAGE_RANGE_2: when the device voltage range is 2.1V to 2.7V,
  1125. 526:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by half word (16-bit)
  1126. 527:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_VOLTAGE_RANGE_3: when the device voltage range is 2.7V to 3.6V,
  1127. 528:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by word (32-bit)
  1128. 529:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_VOLTAGE_RANGE_4: when the device voltage range is 2.7V to 3.6V + External
  1129. 530:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by double word (64-bit)
  1130. 531:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1131. 532:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Banks Banks to be erased
  1132. 533:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  1133. 534:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_1: Bank1 to be erased
  1134. 535:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_2: Bank2 to be erased
  1135. 536:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_BOTH: Bank1 and Bank2 to be erased
  1136. 537:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1137. 538:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status
  1138. 539:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  1139. 540:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static void FLASH_MassErase(uint8_t VoltageRange, uint32_t Banks)
  1140. 541:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1141. 542:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  1142. 543:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_VOLTAGERANGE(VoltageRange));
  1143. 544:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_BANK(Banks));
  1144. 545:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1145. 546:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* if the previous operation is completed, proceed to erase all sectors */
  1146. 547:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** CLEAR_BIT(FLASH->CR, FLASH_CR_PSIZE);
  1147. 548:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1148. 549:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if (Banks == FLASH_BANK_BOTH)
  1149. 550:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1150. 551:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* bank1 & bank2 will be erased*/
  1151. 552:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= FLASH_MER_BIT;
  1152. 553:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1153. 554:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else if (Banks == FLASH_BANK_1)
  1154. 555:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1155. 556:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Only bank1 will be erased*/
  1156. 557:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= FLASH_CR_MER1;
  1157. 558:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1158. 559:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else
  1159. 560:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1160. 561:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Only bank2 will be erased*/
  1161. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 21
  1162. 562:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= FLASH_CR_MER2;
  1163. 563:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1164. 564:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= FLASH_CR_STRT | ((uint32_t)VoltageRange << 8U);
  1165. 565:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1166. 566:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1167. 567:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  1168. 568:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Erase the specified FLASH memory sector
  1169. 569:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Sector FLASH sector to erase
  1170. 570:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * The value of this parameter depend on device used within the same series
  1171. 571:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param VoltageRange The device voltage range which defines the erase parallelism.
  1172. 572:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  1173. 573:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_VOLTAGE_RANGE_1: when the device voltage range is 1.8V to 2.1V,
  1174. 574:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by byte (8-bit)
  1175. 575:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_VOLTAGE_RANGE_2: when the device voltage range is 2.1V to 2.7V,
  1176. 576:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by half word (16-bit)
  1177. 577:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_VOLTAGE_RANGE_3: when the device voltage range is 2.7V to 3.6V,
  1178. 578:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by word (32-bit)
  1179. 579:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_VOLTAGE_RANGE_4: when the device voltage range is 2.7V to 3.6V + External
  1180. 580:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by double word (64-bit)
  1181. 581:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1182. 582:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval None
  1183. 583:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  1184. 584:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** void FLASH_Erase_Sector(uint32_t Sector, uint8_t VoltageRange)
  1185. 585:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1186. 586:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** uint32_t tmp_psize = 0U;
  1187. 587:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1188. 588:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  1189. 589:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_SECTOR(Sector));
  1190. 590:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_VOLTAGERANGE(VoltageRange));
  1191. 591:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1192. 592:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if (VoltageRange == FLASH_VOLTAGE_RANGE_1)
  1193. 593:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1194. 594:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** tmp_psize = FLASH_PSIZE_BYTE;
  1195. 595:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1196. 596:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else if (VoltageRange == FLASH_VOLTAGE_RANGE_2)
  1197. 597:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1198. 598:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** tmp_psize = FLASH_PSIZE_HALF_WORD;
  1199. 599:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1200. 600:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else if (VoltageRange == FLASH_VOLTAGE_RANGE_3)
  1201. 601:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1202. 602:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** tmp_psize = FLASH_PSIZE_WORD;
  1203. 603:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1204. 604:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else
  1205. 605:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1206. 606:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** tmp_psize = FLASH_PSIZE_DOUBLE_WORD;
  1207. 607:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1208. 608:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1209. 609:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Need to add offset of 4 when sector higher than FLASH_SECTOR_11 */
  1210. 610:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if (Sector > FLASH_SECTOR_11)
  1211. 611:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1212. 612:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** Sector += 4U;
  1213. 613:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1214. 614:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* If the previous operation is completed, proceed to erase the sector */
  1215. 615:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** CLEAR_BIT(FLASH->CR, FLASH_CR_PSIZE);
  1216. 616:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= tmp_psize;
  1217. 617:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** CLEAR_BIT(FLASH->CR, FLASH_CR_SNB);
  1218. 618:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= FLASH_CR_SER | (Sector << FLASH_CR_SNB_Pos);
  1219. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 22
  1220. 619:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= FLASH_CR_STRT;
  1221. 620:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1222. 621:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1223. 622:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  1224. 623:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Enable the write protection of the desired bank1 or bank 2 sectors
  1225. 624:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1226. 625:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note When the memory read protection level is selected (RDP level = 1),
  1227. 626:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * it is not possible to program or erase the flash sector i if CortexM4
  1228. 627:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * debug features are connected or boot code is executed in RAM, even if nWRPi = 1
  1229. 628:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note Active value of nWRPi bits is inverted when PCROP mode is active (SPRMOD =1).
  1230. 629:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1231. 630:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param WRPSector specifies the sector(s) to be write protected.
  1232. 631:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  1233. 632:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg WRPSector: A value between OB_WRP_SECTOR_0 and OB_WRP_SECTOR_23
  1234. 633:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_WRP_SECTOR_All
  1235. 634:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note BANK2 starts from OB_WRP_SECTOR_12
  1236. 635:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1237. 636:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Banks Enable write protection on all the sectors for the specific bank
  1238. 637:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  1239. 638:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_1: WRP on all sectors of bank1
  1240. 639:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_2: WRP on all sectors of bank2
  1241. 640:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_BOTH: WRP on all sectors of bank1 & bank2
  1242. 641:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1243. 642:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL FLASH State
  1244. 643:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  1245. 644:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_EnableWRP(uint32_t WRPSector, uint32_t Banks)
  1246. 645:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1247. 646:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK;
  1248. 647:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1249. 648:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  1250. 649:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_WRP_SECTOR(WRPSector));
  1251. 650:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_BANK(Banks));
  1252. 651:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1253. 652:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */
  1254. 653:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
  1255. 654:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1256. 655:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if (status == HAL_OK)
  1257. 656:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1258. 657:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if (((WRPSector == OB_WRP_SECTOR_All) && ((Banks == FLASH_BANK_1) || (Banks == FLASH_BANK_BOTH)
  1259. 658:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (WRPSector < OB_WRP_SECTOR_12))
  1260. 659:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1261. 660:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if (WRPSector == OB_WRP_SECTOR_All)
  1262. 661:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1263. 662:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection on all sector of BANK1*/
  1264. 663:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t *)OPTCR_BYTE2_ADDRESS &= (~(WRPSector >> 12));
  1265. 664:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1266. 665:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else
  1267. 666:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1268. 667:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection done on sectors of BANK1*/
  1269. 668:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t *)OPTCR_BYTE2_ADDRESS &= (~WRPSector);
  1270. 669:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1271. 670:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1272. 671:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else
  1273. 672:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1274. 673:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection done on sectors of BANK2*/
  1275. 674:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t *)OPTCR1_BYTE2_ADDRESS &= (~(WRPSector >> 12));
  1276. 675:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1277. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 23
  1278. 676:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1279. 677:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection on all sector of BANK2*/
  1280. 678:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if ((WRPSector == OB_WRP_SECTOR_All) && (Banks == FLASH_BANK_BOTH))
  1281. 679:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1282. 680:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */
  1283. 681:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
  1284. 682:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1285. 683:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if (status == HAL_OK)
  1286. 684:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1287. 685:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t *)OPTCR1_BYTE2_ADDRESS &= (~(WRPSector >> 12));
  1288. 686:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1289. 687:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1290. 688:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1291. 689:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1292. 690:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status;
  1293. 691:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1294. 692:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1295. 693:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  1296. 694:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Disable the write protection of the desired bank1 or bank 2 sectors
  1297. 695:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1298. 696:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note When the memory read protection level is selected (RDP level = 1),
  1299. 697:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * it is not possible to program or erase the flash sector i if CortexM4
  1300. 698:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * debug features are connected or boot code is executed in RAM, even if nWRPi = 1
  1301. 699:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note Active value of nWRPi bits is inverted when PCROP mode is active (SPRMOD =1).
  1302. 700:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1303. 701:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param WRPSector specifies the sector(s) to be write protected.
  1304. 702:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  1305. 703:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg WRPSector: A value between OB_WRP_SECTOR_0 and OB_WRP_SECTOR_23
  1306. 704:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_WRP_Sector_All
  1307. 705:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note BANK2 starts from OB_WRP_SECTOR_12
  1308. 706:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1309. 707:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Banks Disable write protection on all the sectors for the specific bank
  1310. 708:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  1311. 709:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_1: Bank1 to be erased
  1312. 710:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_2: Bank2 to be erased
  1313. 711:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_BOTH: Bank1 and Bank2 to be erased
  1314. 712:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1315. 713:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status
  1316. 714:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  1317. 715:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_DisableWRP(uint32_t WRPSector, uint32_t Banks)
  1318. 716:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1319. 717:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK;
  1320. 718:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1321. 719:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  1322. 720:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_WRP_SECTOR(WRPSector));
  1323. 721:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_BANK(Banks));
  1324. 722:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1325. 723:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */
  1326. 724:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
  1327. 725:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1328. 726:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if (status == HAL_OK)
  1329. 727:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1330. 728:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if (((WRPSector == OB_WRP_SECTOR_All) && ((Banks == FLASH_BANK_1) || (Banks == FLASH_BANK_BOTH)
  1331. 729:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (WRPSector < OB_WRP_SECTOR_12))
  1332. 730:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1333. 731:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if (WRPSector == OB_WRP_SECTOR_All)
  1334. 732:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1335. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 24
  1336. 733:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection on all sector of BANK1*/
  1337. 734:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t *)OPTCR_BYTE2_ADDRESS |= (uint16_t)(WRPSector >> 12);
  1338. 735:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1339. 736:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else
  1340. 737:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1341. 738:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection done on sectors of BANK1*/
  1342. 739:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t *)OPTCR_BYTE2_ADDRESS |= (uint16_t)WRPSector;
  1343. 740:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1344. 741:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1345. 742:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else
  1346. 743:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1347. 744:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection done on sectors of BANK2*/
  1348. 745:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t *)OPTCR1_BYTE2_ADDRESS |= (uint16_t)(WRPSector >> 12);
  1349. 746:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1350. 747:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1351. 748:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection on all sector of BANK2*/
  1352. 749:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if ((WRPSector == OB_WRP_SECTOR_All) && (Banks == FLASH_BANK_BOTH))
  1353. 750:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1354. 751:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */
  1355. 752:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
  1356. 753:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1357. 754:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if (status == HAL_OK)
  1358. 755:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1359. 756:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t *)OPTCR1_BYTE2_ADDRESS |= (uint16_t)(WRPSector >> 12);
  1360. 757:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1361. 758:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1362. 759:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1363. 760:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1364. 761:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1365. 762:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status;
  1366. 763:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1367. 764:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1368. 765:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  1369. 766:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Configure the Dual Bank Boot.
  1370. 767:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1371. 768:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note This function can be used only for STM32F42xxx/43xxx devices.
  1372. 769:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1373. 770:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param BootConfig specifies the Dual Bank Boot Option byte.
  1374. 771:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  1375. 772:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_Dual_BootEnabled: Dual Bank Boot Enable
  1376. 773:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_Dual_BootDisabled: Dual Bank Boot Disabled
  1377. 774:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval None
  1378. 775:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  1379. 776:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_BootConfig(uint8_t BootConfig)
  1380. 777:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1381. 778:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK;
  1382. 779:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1383. 780:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  1384. 781:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_BOOT(BootConfig));
  1385. 782:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1386. 783:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */
  1387. 784:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
  1388. 785:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1389. 786:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if (status == HAL_OK)
  1390. 787:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1391. 788:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Set Dual Bank Boot */
  1392. 789:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint8_t *)OPTCR_BYTE0_ADDRESS &= (~FLASH_OPTCR_BFB2);
  1393. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 25
  1394. 790:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint8_t *)OPTCR_BYTE0_ADDRESS |= BootConfig;
  1395. 791:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1396. 792:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1397. 793:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status;
  1398. 794:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1399. 795:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1400. 796:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  1401. 797:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Enable the read/write protection (PCROP) of the desired
  1402. 798:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * sectors of Bank 1 and/or Bank 2.
  1403. 799:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note This function can be used only for STM32F42xxx/43xxx devices.
  1404. 800:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param SectorBank1 Specifies the sector(s) to be read/write protected or unprotected for bank1
  1405. 801:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  1406. 802:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_PCROP: A value between OB_PCROP_SECTOR_0 and OB_PCROP_SECTOR_11
  1407. 803:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_PCROP_SECTOR__All
  1408. 804:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param SectorBank2 Specifies the sector(s) to be read/write protected or unprotected for bank2
  1409. 805:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  1410. 806:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_PCROP: A value between OB_PCROP_SECTOR_12 and OB_PCROP_SECTOR_23
  1411. 807:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_PCROP_SECTOR__All
  1412. 808:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Banks Enable PCROP protection on all the sectors for the specific bank
  1413. 809:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  1414. 810:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_1: WRP on all sectors of bank1
  1415. 811:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_2: WRP on all sectors of bank2
  1416. 812:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_BOTH: WRP on all sectors of bank1 & bank2
  1417. 813:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1418. 814:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status
  1419. 815:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  1420. 816:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_EnablePCROP(uint32_t SectorBank1, uint32_t SectorBank2, uint32_t
  1421. 817:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1422. 818:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK;
  1423. 819:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1424. 820:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_BANK(Banks));
  1425. 821:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1426. 822:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */
  1427. 823:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
  1428. 824:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1429. 825:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if (status == HAL_OK)
  1430. 826:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1431. 827:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if ((Banks == FLASH_BANK_1) || (Banks == FLASH_BANK_BOTH))
  1432. 828:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1433. 829:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_PCROP(SectorBank1));
  1434. 830:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection done on sectors of BANK1*/
  1435. 831:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t *)OPTCR_BYTE2_ADDRESS |= (uint16_t)SectorBank1;
  1436. 832:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1437. 833:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else
  1438. 834:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1439. 835:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_PCROP(SectorBank2));
  1440. 836:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection done on sectors of BANK2*/
  1441. 837:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t *)OPTCR1_BYTE2_ADDRESS |= (uint16_t)SectorBank2;
  1442. 838:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1443. 839:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1444. 840:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection on all sector of BANK2*/
  1445. 841:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if (Banks == FLASH_BANK_BOTH)
  1446. 842:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1447. 843:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_PCROP(SectorBank2));
  1448. 844:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */
  1449. 845:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
  1450. 846:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1451. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 26
  1452. 847:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if (status == HAL_OK)
  1453. 848:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1454. 849:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection done on sectors of BANK2*/
  1455. 850:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t *)OPTCR1_BYTE2_ADDRESS |= (uint16_t)SectorBank2;
  1456. 851:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1457. 852:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1458. 853:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1459. 854:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1460. 855:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1461. 856:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status;
  1462. 857:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1463. 858:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1464. 859:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1465. 860:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  1466. 861:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Disable the read/write protection (PCROP) of the desired
  1467. 862:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * sectors of Bank 1 and/or Bank 2.
  1468. 863:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note This function can be used only for STM32F42xxx/43xxx devices.
  1469. 864:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param SectorBank1 specifies the sector(s) to be read/write protected or unprotected for bank1
  1470. 865:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  1471. 866:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_PCROP: A value between OB_PCROP_SECTOR_0 and OB_PCROP_SECTOR_11
  1472. 867:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_PCROP_SECTOR__All
  1473. 868:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param SectorBank2 Specifies the sector(s) to be read/write protected or unprotected for bank2
  1474. 869:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  1475. 870:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_PCROP: A value between OB_PCROP_SECTOR_12 and OB_PCROP_SECTOR_23
  1476. 871:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_PCROP_SECTOR__All
  1477. 872:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Banks Disable PCROP protection on all the sectors for the specific bank
  1478. 873:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  1479. 874:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_1: WRP on all sectors of bank1
  1480. 875:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_2: WRP on all sectors of bank2
  1481. 876:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_BOTH: WRP on all sectors of bank1 & bank2
  1482. 877:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1483. 878:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status
  1484. 879:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  1485. 880:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_DisablePCROP(uint32_t SectorBank1, uint32_t SectorBank2, uint32_t
  1486. 881:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1487. 882:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK;
  1488. 883:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1489. 884:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  1490. 885:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_BANK(Banks));
  1491. 886:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1492. 887:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */
  1493. 888:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
  1494. 889:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1495. 890:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if (status == HAL_OK)
  1496. 891:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1497. 892:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if ((Banks == FLASH_BANK_1) || (Banks == FLASH_BANK_BOTH))
  1498. 893:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1499. 894:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_PCROP(SectorBank1));
  1500. 895:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection done on sectors of BANK1*/
  1501. 896:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t *)OPTCR_BYTE2_ADDRESS &= (~SectorBank1);
  1502. 897:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1503. 898:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else
  1504. 899:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1505. 900:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection done on sectors of BANK2*/
  1506. 901:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_PCROP(SectorBank2));
  1507. 902:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t *)OPTCR1_BYTE2_ADDRESS &= (~SectorBank2);
  1508. 903:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1509. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 27
  1510. 904:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1511. 905:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection on all sector of BANK2*/
  1512. 906:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if (Banks == FLASH_BANK_BOTH)
  1513. 907:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1514. 908:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_PCROP(SectorBank2));
  1515. 909:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */
  1516. 910:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
  1517. 911:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1518. 912:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if (status == HAL_OK)
  1519. 913:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1520. 914:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection done on sectors of BANK2*/
  1521. 915:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t *)OPTCR1_BYTE2_ADDRESS &= (~SectorBank2);
  1522. 916:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1523. 917:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1524. 918:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1525. 919:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1526. 920:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1527. 921:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status;
  1528. 922:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1529. 923:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1530. 924:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1531. 925:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */
  1532. 926:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1533. 927:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx) ||
  1534. 928:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) ||
  1535. 929:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F410Rx) || defined(STM32F411xE) || defined(STM32F446xx) || defined(STM32F412Zx) ||
  1536. 930:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F412Cx) || defined(STM32F413xx) ||
  1537. 931:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F423xx)
  1538. 932:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  1539. 933:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Mass erase of FLASH memory
  1540. 934:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param VoltageRange The device voltage range which defines the erase parallelism.
  1541. 935:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  1542. 936:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_VOLTAGE_RANGE_1: when the device voltage range is 1.8V to 2.1V,
  1543. 937:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by byte (8-bit)
  1544. 938:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_VOLTAGE_RANGE_2: when the device voltage range is 2.1V to 2.7V,
  1545. 939:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by half word (16-bit)
  1546. 940:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_VOLTAGE_RANGE_3: when the device voltage range is 2.7V to 3.6V,
  1547. 941:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by word (32-bit)
  1548. 942:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_VOLTAGE_RANGE_4: when the device voltage range is 2.7V to 3.6V + External
  1549. 943:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by double word (64-bit)
  1550. 944:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1551. 945:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Banks Banks to be erased
  1552. 946:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  1553. 947:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_1: Bank1 to be erased
  1554. 948:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1555. 949:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval None
  1556. 950:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  1557. 951:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static void FLASH_MassErase(uint8_t VoltageRange, uint32_t Banks)
  1558. 952:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1559. 582 .loc 1 952 1
  1560. 583 .cfi_startproc
  1561. 584 @ args = 0, pretend = 0, frame = 8
  1562. 585 @ frame_needed = 1, uses_anonymous_args = 0
  1563. 586 @ link register save eliminated.
  1564. 587 0000 80B4 push {r7}
  1565. 588 .LCFI20:
  1566. 589 .cfi_def_cfa_offset 4
  1567. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 28
  1568. 590 .cfi_offset 7, -4
  1569. 591 0002 83B0 sub sp, sp, #12
  1570. 592 .LCFI21:
  1571. 593 .cfi_def_cfa_offset 16
  1572. 594 0004 00AF add r7, sp, #0
  1573. 595 .LCFI22:
  1574. 596 .cfi_def_cfa_register 7
  1575. 597 0006 0346 mov r3, r0
  1576. 598 0008 3960 str r1, [r7]
  1577. 599 000a FB71 strb r3, [r7, #7]
  1578. 953:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  1579. 954:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_VOLTAGERANGE(VoltageRange));
  1580. 955:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_BANK(Banks));
  1581. 956:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1582. 957:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* If the previous operation is completed, proceed to erase all sectors */
  1583. 958:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** CLEAR_BIT(FLASH->CR, FLASH_CR_PSIZE);
  1584. 600 .loc 1 958 3
  1585. 601 000c 0D4B ldr r3, .L31
  1586. 602 000e 1B69 ldr r3, [r3, #16]
  1587. 603 0010 0C4A ldr r2, .L31
  1588. 604 0012 23F44073 bic r3, r3, #768
  1589. 605 0016 1361 str r3, [r2, #16]
  1590. 959:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= FLASH_CR_MER;
  1591. 606 .loc 1 959 13
  1592. 607 0018 0A4B ldr r3, .L31
  1593. 608 001a 1B69 ldr r3, [r3, #16]
  1594. 609 001c 094A ldr r2, .L31
  1595. 610 001e 43F00403 orr r3, r3, #4
  1596. 611 0022 1361 str r3, [r2, #16]
  1597. 960:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= FLASH_CR_STRT | ((uint32_t)VoltageRange << 8U);
  1598. 612 .loc 1 960 13
  1599. 613 0024 074B ldr r3, .L31
  1600. 614 0026 1A69 ldr r2, [r3, #16]
  1601. 615 .loc 1 960 33
  1602. 616 0028 FB79 ldrb r3, [r7, #7] @ zero_extendqisi2
  1603. 617 .loc 1 960 56
  1604. 618 002a 1B02 lsls r3, r3, #8
  1605. 619 .loc 1 960 13
  1606. 620 002c 1343 orrs r3, r3, r2
  1607. 621 002e 054A ldr r2, .L31
  1608. 622 0030 43F48033 orr r3, r3, #65536
  1609. 623 0034 1361 str r3, [r2, #16]
  1610. 961:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1611. 624 .loc 1 961 1
  1612. 625 0036 00BF nop
  1613. 626 0038 0C37 adds r7, r7, #12
  1614. 627 .LCFI23:
  1615. 628 .cfi_def_cfa_offset 4
  1616. 629 003a BD46 mov sp, r7
  1617. 630 .LCFI24:
  1618. 631 .cfi_def_cfa_register 13
  1619. 632 @ sp needed
  1620. 633 003c 5DF8047B ldr r7, [sp], #4
  1621. 634 .LCFI25:
  1622. 635 .cfi_restore 7
  1623. 636 .cfi_def_cfa_offset 0
  1624. 637 0040 7047 bx lr
  1625. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 29
  1626. 638 .L32:
  1627. 639 0042 00BF .align 2
  1628. 640 .L31:
  1629. 641 0044 003C0240 .word 1073888256
  1630. 642 .cfi_endproc
  1631. 643 .LFE239:
  1632. 645 .section .text.FLASH_Erase_Sector,"ax",%progbits
  1633. 646 .align 1
  1634. 647 .global FLASH_Erase_Sector
  1635. 648 .syntax unified
  1636. 649 .thumb
  1637. 650 .thumb_func
  1638. 652 FLASH_Erase_Sector:
  1639. 653 .LFB240:
  1640. 962:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1641. 963:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  1642. 964:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Erase the specified FLASH memory sector
  1643. 965:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Sector FLASH sector to erase
  1644. 966:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * The value of this parameter depend on device used within the same series
  1645. 967:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param VoltageRange The device voltage range which defines the erase parallelism.
  1646. 968:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  1647. 969:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_VOLTAGE_RANGE_1: when the device voltage range is 1.8V to 2.1V,
  1648. 970:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by byte (8-bit)
  1649. 971:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_VOLTAGE_RANGE_2: when the device voltage range is 2.1V to 2.7V,
  1650. 972:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by half word (16-bit)
  1651. 973:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_VOLTAGE_RANGE_3: when the device voltage range is 2.7V to 3.6V,
  1652. 974:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by word (32-bit)
  1653. 975:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_VOLTAGE_RANGE_4: when the device voltage range is 2.7V to 3.6V + External
  1654. 976:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by double word (64-bit)
  1655. 977:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1656. 978:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval None
  1657. 979:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  1658. 980:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** void FLASH_Erase_Sector(uint32_t Sector, uint8_t VoltageRange)
  1659. 981:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1660. 654 .loc 1 981 1
  1661. 655 .cfi_startproc
  1662. 656 @ args = 0, pretend = 0, frame = 16
  1663. 657 @ frame_needed = 1, uses_anonymous_args = 0
  1664. 658 @ link register save eliminated.
  1665. 659 0000 80B4 push {r7}
  1666. 660 .LCFI26:
  1667. 661 .cfi_def_cfa_offset 4
  1668. 662 .cfi_offset 7, -4
  1669. 663 0002 85B0 sub sp, sp, #20
  1670. 664 .LCFI27:
  1671. 665 .cfi_def_cfa_offset 24
  1672. 666 0004 00AF add r7, sp, #0
  1673. 667 .LCFI28:
  1674. 668 .cfi_def_cfa_register 7
  1675. 669 0006 7860 str r0, [r7, #4]
  1676. 670 0008 0B46 mov r3, r1
  1677. 671 000a FB70 strb r3, [r7, #3]
  1678. 982:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** uint32_t tmp_psize = 0U;
  1679. 672 .loc 1 982 12
  1680. 673 000c 0023 movs r3, #0
  1681. 674 000e FB60 str r3, [r7, #12]
  1682. 983:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1683. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 30
  1684. 984:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  1685. 985:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_SECTOR(Sector));
  1686. 986:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_VOLTAGERANGE(VoltageRange));
  1687. 987:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1688. 988:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if (VoltageRange == FLASH_VOLTAGE_RANGE_1)
  1689. 675 .loc 1 988 6
  1690. 676 0010 FB78 ldrb r3, [r7, #3] @ zero_extendqisi2
  1691. 677 0012 002B cmp r3, #0
  1692. 678 0014 02D1 bne .L34
  1693. 989:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1694. 990:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** tmp_psize = FLASH_PSIZE_BYTE;
  1695. 679 .loc 1 990 15
  1696. 680 0016 0023 movs r3, #0
  1697. 681 0018 FB60 str r3, [r7, #12]
  1698. 682 001a 10E0 b .L35
  1699. 683 .L34:
  1700. 991:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1701. 992:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else if (VoltageRange == FLASH_VOLTAGE_RANGE_2)
  1702. 684 .loc 1 992 11
  1703. 685 001c FB78 ldrb r3, [r7, #3] @ zero_extendqisi2
  1704. 686 001e 012B cmp r3, #1
  1705. 687 0020 03D1 bne .L36
  1706. 993:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1707. 994:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** tmp_psize = FLASH_PSIZE_HALF_WORD;
  1708. 688 .loc 1 994 15
  1709. 689 0022 4FF48073 mov r3, #256
  1710. 690 0026 FB60 str r3, [r7, #12]
  1711. 691 0028 09E0 b .L35
  1712. 692 .L36:
  1713. 995:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1714. 996:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else if (VoltageRange == FLASH_VOLTAGE_RANGE_3)
  1715. 693 .loc 1 996 11
  1716. 694 002a FB78 ldrb r3, [r7, #3] @ zero_extendqisi2
  1717. 695 002c 022B cmp r3, #2
  1718. 696 002e 03D1 bne .L37
  1719. 997:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1720. 998:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** tmp_psize = FLASH_PSIZE_WORD;
  1721. 697 .loc 1 998 15
  1722. 698 0030 4FF40073 mov r3, #512
  1723. 699 0034 FB60 str r3, [r7, #12]
  1724. 700 0036 02E0 b .L35
  1725. 701 .L37:
  1726. 999:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1727. 1000:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else
  1728. 1001:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1729. 1002:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** tmp_psize = FLASH_PSIZE_DOUBLE_WORD;
  1730. 702 .loc 1 1002 15
  1731. 703 0038 4FF44073 mov r3, #768
  1732. 704 003c FB60 str r3, [r7, #12]
  1733. 705 .L35:
  1734. 1003:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1735. 1004:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1736. 1005:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* If the previous operation is completed, proceed to erase the sector */
  1737. 1006:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** CLEAR_BIT(FLASH->CR, FLASH_CR_PSIZE);
  1738. 706 .loc 1 1006 3
  1739. 707 003e 134B ldr r3, .L38
  1740. 708 0040 1B69 ldr r3, [r3, #16]
  1741. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 31
  1742. 709 0042 124A ldr r2, .L38
  1743. 710 0044 23F44073 bic r3, r3, #768
  1744. 711 0048 1361 str r3, [r2, #16]
  1745. 1007:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= tmp_psize;
  1746. 712 .loc 1 1007 13
  1747. 713 004a 104B ldr r3, .L38
  1748. 714 004c 1A69 ldr r2, [r3, #16]
  1749. 715 004e 0F49 ldr r1, .L38
  1750. 716 0050 FB68 ldr r3, [r7, #12]
  1751. 717 0052 1343 orrs r3, r3, r2
  1752. 718 0054 0B61 str r3, [r1, #16]
  1753. 1008:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** CLEAR_BIT(FLASH->CR, FLASH_CR_SNB);
  1754. 719 .loc 1 1008 3
  1755. 720 0056 0D4B ldr r3, .L38
  1756. 721 0058 1B69 ldr r3, [r3, #16]
  1757. 722 005a 0C4A ldr r2, .L38
  1758. 723 005c 23F0F803 bic r3, r3, #248
  1759. 724 0060 1361 str r3, [r2, #16]
  1760. 1009:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= FLASH_CR_SER | (Sector << FLASH_CR_SNB_Pos);
  1761. 725 .loc 1 1009 13
  1762. 726 0062 0A4B ldr r3, .L38
  1763. 727 0064 1A69 ldr r2, [r3, #16]
  1764. 728 .loc 1 1009 39
  1765. 729 0066 7B68 ldr r3, [r7, #4]
  1766. 730 0068 DB00 lsls r3, r3, #3
  1767. 731 .loc 1 1009 13
  1768. 732 006a 1343 orrs r3, r3, r2
  1769. 733 006c 074A ldr r2, .L38
  1770. 734 006e 43F00203 orr r3, r3, #2
  1771. 735 0072 1361 str r3, [r2, #16]
  1772. 1010:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= FLASH_CR_STRT;
  1773. 736 .loc 1 1010 13
  1774. 737 0074 054B ldr r3, .L38
  1775. 738 0076 1B69 ldr r3, [r3, #16]
  1776. 739 0078 044A ldr r2, .L38
  1777. 740 007a 43F48033 orr r3, r3, #65536
  1778. 741 007e 1361 str r3, [r2, #16]
  1779. 1011:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1780. 742 .loc 1 1011 1
  1781. 743 0080 00BF nop
  1782. 744 0082 1437 adds r7, r7, #20
  1783. 745 .LCFI29:
  1784. 746 .cfi_def_cfa_offset 4
  1785. 747 0084 BD46 mov sp, r7
  1786. 748 .LCFI30:
  1787. 749 .cfi_def_cfa_register 13
  1788. 750 @ sp needed
  1789. 751 0086 5DF8047B ldr r7, [sp], #4
  1790. 752 .LCFI31:
  1791. 753 .cfi_restore 7
  1792. 754 .cfi_def_cfa_offset 0
  1793. 755 008a 7047 bx lr
  1794. 756 .L39:
  1795. 757 .align 2
  1796. 758 .L38:
  1797. 759 008c 003C0240 .word 1073888256
  1798. 760 .cfi_endproc
  1799. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 32
  1800. 761 .LFE240:
  1801. 763 .section .text.FLASH_OB_EnableWRP,"ax",%progbits
  1802. 764 .align 1
  1803. 765 .syntax unified
  1804. 766 .thumb
  1805. 767 .thumb_func
  1806. 769 FLASH_OB_EnableWRP:
  1807. 770 .LFB241:
  1808. 1012:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1809. 1013:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  1810. 1014:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Enable the write protection of the desired bank 1 sectors
  1811. 1015:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1812. 1016:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note When the memory read protection level is selected (RDP level = 1),
  1813. 1017:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * it is not possible to program or erase the flash sector i if CortexM4
  1814. 1018:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * debug features are connected or boot code is executed in RAM, even if nWRPi = 1
  1815. 1019:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note Active value of nWRPi bits is inverted when PCROP mode is active (SPRMOD =1).
  1816. 1020:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1817. 1021:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param WRPSector specifies the sector(s) to be write protected.
  1818. 1022:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * The value of this parameter depend on device used within the same series
  1819. 1023:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1820. 1024:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Banks Enable write protection on all the sectors for the specific bank
  1821. 1025:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  1822. 1026:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_1: WRP on all sectors of bank1
  1823. 1027:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1824. 1028:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status
  1825. 1029:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  1826. 1030:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_EnableWRP(uint32_t WRPSector, uint32_t Banks)
  1827. 1031:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1828. 771 .loc 1 1031 1
  1829. 772 .cfi_startproc
  1830. 773 @ args = 0, pretend = 0, frame = 16
  1831. 774 @ frame_needed = 1, uses_anonymous_args = 0
  1832. 775 0000 80B5 push {r7, lr}
  1833. 776 .LCFI32:
  1834. 777 .cfi_def_cfa_offset 8
  1835. 778 .cfi_offset 7, -8
  1836. 779 .cfi_offset 14, -4
  1837. 780 0002 84B0 sub sp, sp, #16
  1838. 781 .LCFI33:
  1839. 782 .cfi_def_cfa_offset 24
  1840. 783 0004 00AF add r7, sp, #0
  1841. 784 .LCFI34:
  1842. 785 .cfi_def_cfa_register 7
  1843. 786 0006 7860 str r0, [r7, #4]
  1844. 787 0008 3960 str r1, [r7]
  1845. 1032:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK;
  1846. 788 .loc 1 1032 21
  1847. 789 000a 0023 movs r3, #0
  1848. 790 000c FB73 strb r3, [r7, #15]
  1849. 1033:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1850. 1034:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  1851. 1035:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_WRP_SECTOR(WRPSector));
  1852. 1036:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_BANK(Banks));
  1853. 1037:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1854. 1038:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */
  1855. 1039:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
  1856. 791 .loc 1 1039 12
  1857. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 33
  1858. 792 000e 4CF25030 movw r0, #50000
  1859. 793 0012 FFF7FEFF bl FLASH_WaitForLastOperation
  1860. 794 0016 0346 mov r3, r0
  1861. 795 0018 FB73 strb r3, [r7, #15]
  1862. 1040:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1863. 1041:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if (status == HAL_OK)
  1864. 796 .loc 1 1041 6
  1865. 797 001a FB7B ldrb r3, [r7, #15] @ zero_extendqisi2
  1866. 798 001c 002B cmp r3, #0
  1867. 799 001e 0AD1 bne .L41
  1868. 1042:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1869. 1043:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t *)OPTCR_BYTE2_ADDRESS &= (~WRPSector);
  1870. 800 .loc 1 1043 43
  1871. 801 0020 074B ldr r3, .L43
  1872. 802 0022 1B88 ldrh r3, [r3] @ movhi
  1873. 803 0024 9AB2 uxth r2, r3
  1874. 804 0026 7B68 ldr r3, [r7, #4]
  1875. 805 0028 9BB2 uxth r3, r3
  1876. 806 002a DB43 mvns r3, r3
  1877. 807 002c 9BB2 uxth r3, r3
  1878. 808 002e 0449 ldr r1, .L43
  1879. 809 0030 1340 ands r3, r3, r2
  1880. 810 0032 9BB2 uxth r3, r3
  1881. 811 0034 0B80 strh r3, [r1] @ movhi
  1882. 812 .L41:
  1883. 1044:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1884. 1045:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1885. 1046:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status;
  1886. 813 .loc 1 1046 10
  1887. 814 0036 FB7B ldrb r3, [r7, #15] @ zero_extendqisi2
  1888. 1047:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1889. 815 .loc 1 1047 1
  1890. 816 0038 1846 mov r0, r3
  1891. 817 003a 1037 adds r7, r7, #16
  1892. 818 .LCFI35:
  1893. 819 .cfi_def_cfa_offset 8
  1894. 820 003c BD46 mov sp, r7
  1895. 821 .LCFI36:
  1896. 822 .cfi_def_cfa_register 13
  1897. 823 @ sp needed
  1898. 824 003e 80BD pop {r7, pc}
  1899. 825 .L44:
  1900. 826 .align 2
  1901. 827 .L43:
  1902. 828 0040 163C0240 .word 1073888278
  1903. 829 .cfi_endproc
  1904. 830 .LFE241:
  1905. 832 .section .text.FLASH_OB_DisableWRP,"ax",%progbits
  1906. 833 .align 1
  1907. 834 .syntax unified
  1908. 835 .thumb
  1909. 836 .thumb_func
  1910. 838 FLASH_OB_DisableWRP:
  1911. 839 .LFB242:
  1912. 1048:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1913. 1049:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  1914. 1050:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Disable the write protection of the desired bank 1 sectors
  1915. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 34
  1916. 1051:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1917. 1052:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note When the memory read protection level is selected (RDP level = 1),
  1918. 1053:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * it is not possible to program or erase the flash sector i if CortexM4
  1919. 1054:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * debug features are connected or boot code is executed in RAM, even if nWRPi = 1
  1920. 1055:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note Active value of nWRPi bits is inverted when PCROP mode is active (SPRMOD =1).
  1921. 1056:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1922. 1057:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param WRPSector specifies the sector(s) to be write protected.
  1923. 1058:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * The value of this parameter depend on device used within the same series
  1924. 1059:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1925. 1060:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Banks Enable write protection on all the sectors for the specific bank
  1926. 1061:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  1927. 1062:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_1: WRP on all sectors of bank1
  1928. 1063:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1929. 1064:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status
  1930. 1065:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  1931. 1066:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_DisableWRP(uint32_t WRPSector, uint32_t Banks)
  1932. 1067:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1933. 840 .loc 1 1067 1
  1934. 841 .cfi_startproc
  1935. 842 @ args = 0, pretend = 0, frame = 16
  1936. 843 @ frame_needed = 1, uses_anonymous_args = 0
  1937. 844 0000 80B5 push {r7, lr}
  1938. 845 .LCFI37:
  1939. 846 .cfi_def_cfa_offset 8
  1940. 847 .cfi_offset 7, -8
  1941. 848 .cfi_offset 14, -4
  1942. 849 0002 84B0 sub sp, sp, #16
  1943. 850 .LCFI38:
  1944. 851 .cfi_def_cfa_offset 24
  1945. 852 0004 00AF add r7, sp, #0
  1946. 853 .LCFI39:
  1947. 854 .cfi_def_cfa_register 7
  1948. 855 0006 7860 str r0, [r7, #4]
  1949. 856 0008 3960 str r1, [r7]
  1950. 1068:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK;
  1951. 857 .loc 1 1068 21
  1952. 858 000a 0023 movs r3, #0
  1953. 859 000c FB73 strb r3, [r7, #15]
  1954. 1069:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1955. 1070:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  1956. 1071:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_WRP_SECTOR(WRPSector));
  1957. 1072:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_BANK(Banks));
  1958. 1073:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1959. 1074:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */
  1960. 1075:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
  1961. 860 .loc 1 1075 12
  1962. 861 000e 4CF25030 movw r0, #50000
  1963. 862 0012 FFF7FEFF bl FLASH_WaitForLastOperation
  1964. 863 0016 0346 mov r3, r0
  1965. 864 0018 FB73 strb r3, [r7, #15]
  1966. 1076:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1967. 1077:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if (status == HAL_OK)
  1968. 865 .loc 1 1077 6
  1969. 866 001a FB7B ldrb r3, [r7, #15] @ zero_extendqisi2
  1970. 867 001c 002B cmp r3, #0
  1971. 868 001e 08D1 bne .L46
  1972. 1078:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1973. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 35
  1974. 1079:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t *)OPTCR_BYTE2_ADDRESS |= (uint16_t)WRPSector;
  1975. 869 .loc 1 1079 43
  1976. 870 0020 064B ldr r3, .L48
  1977. 871 0022 1B88 ldrh r3, [r3] @ movhi
  1978. 872 0024 9AB2 uxth r2, r3
  1979. 873 .loc 1 1079 46
  1980. 874 0026 7B68 ldr r3, [r7, #4]
  1981. 875 0028 9BB2 uxth r3, r3
  1982. 876 .loc 1 1079 43
  1983. 877 002a 0449 ldr r1, .L48
  1984. 878 002c 1343 orrs r3, r3, r2
  1985. 879 002e 9BB2 uxth r3, r3
  1986. 880 0030 0B80 strh r3, [r1] @ movhi
  1987. 881 .L46:
  1988. 1080:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1989. 1081:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1990. 1082:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status;
  1991. 882 .loc 1 1082 10
  1992. 883 0032 FB7B ldrb r3, [r7, #15] @ zero_extendqisi2
  1993. 1083:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1994. 884 .loc 1 1083 1
  1995. 885 0034 1846 mov r0, r3
  1996. 886 0036 1037 adds r7, r7, #16
  1997. 887 .LCFI40:
  1998. 888 .cfi_def_cfa_offset 8
  1999. 889 0038 BD46 mov sp, r7
  2000. 890 .LCFI41:
  2001. 891 .cfi_def_cfa_register 13
  2002. 892 @ sp needed
  2003. 893 003a 80BD pop {r7, pc}
  2004. 894 .L49:
  2005. 895 .align 2
  2006. 896 .L48:
  2007. 897 003c 163C0240 .word 1073888278
  2008. 898 .cfi_endproc
  2009. 899 .LFE242:
  2010. 901 .section .text.FLASH_OB_RDP_LevelConfig,"ax",%progbits
  2011. 902 .align 1
  2012. 903 .syntax unified
  2013. 904 .thumb
  2014. 905 .thumb_func
  2015. 907 FLASH_OB_RDP_LevelConfig:
  2016. 908 .LFB243:
  2017. 1084:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #endif /* STM32F40xxx || STM32F41xxx || STM32F401xx || STM32F410xx || STM32F411xE || STM32F446xx ||
  2018. 1085:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** STM32F413xx || STM32F423xx */
  2019. 1086:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2020. 1087:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #if defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) ||
  2021. 1088:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F411xE) || defined(STM32F446xx) || defined(STM32F412Zx) || defined(STM32F412Vx) ||
  2022. 1089:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F412Cx) || defined(STM32F413xx) || defined(STM32F423xx)
  2023. 1090:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  2024. 1091:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Enable the read/write protection (PCROP) of the desired sectors.
  2025. 1092:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note This function can be used only for STM32F401xx devices.
  2026. 1093:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Sector specifies the sector(s) to be read/write protected or unprotected.
  2027. 1094:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  2028. 1095:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_PCROP: A value between OB_PCROP_Sector0 and OB_PCROP_Sector5
  2029. 1096:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_PCROP_Sector_All
  2030. 1097:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status
  2031. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 36
  2032. 1098:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  2033. 1099:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_EnablePCROP(uint32_t Sector)
  2034. 1100:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  2035. 1101:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK;
  2036. 1102:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2037. 1103:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  2038. 1104:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_PCROP(Sector));
  2039. 1105:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2040. 1106:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */
  2041. 1107:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
  2042. 1108:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2043. 1109:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if (status == HAL_OK)
  2044. 1110:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  2045. 1111:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t *)OPTCR_BYTE2_ADDRESS |= (uint16_t)Sector;
  2046. 1112:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  2047. 1113:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2048. 1114:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status;
  2049. 1115:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  2050. 1116:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2051. 1117:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2052. 1118:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  2053. 1119:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Disable the read/write protection (PCROP) of the desired sectors.
  2054. 1120:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note This function can be used only for STM32F401xx devices.
  2055. 1121:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Sector specifies the sector(s) to be read/write protected or unprotected.
  2056. 1122:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  2057. 1123:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_PCROP: A value between OB_PCROP_Sector0 and OB_PCROP_Sector5
  2058. 1124:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_PCROP_Sector_All
  2059. 1125:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status
  2060. 1126:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  2061. 1127:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_DisablePCROP(uint32_t Sector)
  2062. 1128:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  2063. 1129:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK;
  2064. 1130:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2065. 1131:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  2066. 1132:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_PCROP(Sector));
  2067. 1133:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2068. 1134:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */
  2069. 1135:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
  2070. 1136:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2071. 1137:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if (status == HAL_OK)
  2072. 1138:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  2073. 1139:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t *)OPTCR_BYTE2_ADDRESS &= (~Sector);
  2074. 1140:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  2075. 1141:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2076. 1142:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status;
  2077. 1143:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2078. 1144:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  2079. 1145:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #endif /* STM32F401xC || STM32F401xE || STM32F411xE || STM32F446xx || STM32F412Zx || STM32F412Vx ||
  2080. 1146:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** STM32F413xx || STM32F423xx */
  2081. 1147:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2082. 1148:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  2083. 1149:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Set the read protection level.
  2084. 1150:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Level specifies the read protection level.
  2085. 1151:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  2086. 1152:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_RDP_LEVEL_0: No protection
  2087. 1153:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_RDP_LEVEL_1: Read protection of the memory
  2088. 1154:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_RDP_LEVEL_2: Full chip protection
  2089. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 37
  2090. 1155:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  2091. 1156:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note WARNING: When enabling OB_RDP level 2 it's no more possible to go back to level 1 or 0
  2092. 1157:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  2093. 1158:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status
  2094. 1159:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  2095. 1160:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_RDP_LevelConfig(uint8_t Level)
  2096. 1161:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  2097. 909 .loc 1 1161 1
  2098. 910 .cfi_startproc
  2099. 911 @ args = 0, pretend = 0, frame = 16
  2100. 912 @ frame_needed = 1, uses_anonymous_args = 0
  2101. 913 0000 80B5 push {r7, lr}
  2102. 914 .LCFI42:
  2103. 915 .cfi_def_cfa_offset 8
  2104. 916 .cfi_offset 7, -8
  2105. 917 .cfi_offset 14, -4
  2106. 918 0002 84B0 sub sp, sp, #16
  2107. 919 .LCFI43:
  2108. 920 .cfi_def_cfa_offset 24
  2109. 921 0004 00AF add r7, sp, #0
  2110. 922 .LCFI44:
  2111. 923 .cfi_def_cfa_register 7
  2112. 924 0006 0346 mov r3, r0
  2113. 925 0008 FB71 strb r3, [r7, #7]
  2114. 1162:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK;
  2115. 926 .loc 1 1162 21
  2116. 927 000a 0023 movs r3, #0
  2117. 928 000c FB73 strb r3, [r7, #15]
  2118. 1163:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2119. 1164:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  2120. 1165:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_RDP_LEVEL(Level));
  2121. 1166:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2122. 1167:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */
  2123. 1168:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
  2124. 929 .loc 1 1168 12
  2125. 930 000e 4CF25030 movw r0, #50000
  2126. 931 0012 FFF7FEFF bl FLASH_WaitForLastOperation
  2127. 932 0016 0346 mov r3, r0
  2128. 933 0018 FB73 strb r3, [r7, #15]
  2129. 1169:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2130. 1170:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if (status == HAL_OK)
  2131. 934 .loc 1 1170 6
  2132. 935 001a FB7B ldrb r3, [r7, #15] @ zero_extendqisi2
  2133. 936 001c 002B cmp r3, #0
  2134. 937 001e 02D1 bne .L51
  2135. 1171:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  2136. 1172:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint8_t *)OPTCR_BYTE1_ADDRESS = Level;
  2137. 938 .loc 1 1172 5
  2138. 939 0020 034A ldr r2, .L53
  2139. 940 .loc 1 1172 42
  2140. 941 0022 FB79 ldrb r3, [r7, #7]
  2141. 942 0024 1370 strb r3, [r2]
  2142. 943 .L51:
  2143. 1173:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  2144. 1174:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2145. 1175:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status;
  2146. 944 .loc 1 1175 10
  2147. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 38
  2148. 945 0026 FB7B ldrb r3, [r7, #15] @ zero_extendqisi2
  2149. 1176:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  2150. 946 .loc 1 1176 1
  2151. 947 0028 1846 mov r0, r3
  2152. 948 002a 1037 adds r7, r7, #16
  2153. 949 .LCFI45:
  2154. 950 .cfi_def_cfa_offset 8
  2155. 951 002c BD46 mov sp, r7
  2156. 952 .LCFI46:
  2157. 953 .cfi_def_cfa_register 13
  2158. 954 @ sp needed
  2159. 955 002e 80BD pop {r7, pc}
  2160. 956 .L54:
  2161. 957 .align 2
  2162. 958 .L53:
  2163. 959 0030 153C0240 .word 1073888277
  2164. 960 .cfi_endproc
  2165. 961 .LFE243:
  2166. 963 .section .text.FLASH_OB_UserConfig,"ax",%progbits
  2167. 964 .align 1
  2168. 965 .syntax unified
  2169. 966 .thumb
  2170. 967 .thumb_func
  2171. 969 FLASH_OB_UserConfig:
  2172. 970 .LFB244:
  2173. 1177:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2174. 1178:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  2175. 1179:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Program the FLASH User Option Byte: IWDG_SW / RST_STOP / RST_STDBY.
  2176. 1180:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Iwdg Selects the IWDG mode
  2177. 1181:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  2178. 1182:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_IWDG_SW: Software IWDG selected
  2179. 1183:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_IWDG_HW: Hardware IWDG selected
  2180. 1184:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Stop Reset event when entering STOP mode.
  2181. 1185:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  2182. 1186:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_STOP_NO_RST: No reset generated when entering in STOP
  2183. 1187:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_STOP_RST: Reset generated when entering in STOP
  2184. 1188:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Stdby Reset event when entering Standby mode.
  2185. 1189:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  2186. 1190:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_STDBY_NO_RST: No reset generated when entering in STANDBY
  2187. 1191:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_STDBY_RST: Reset generated when entering in STANDBY
  2188. 1192:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status
  2189. 1193:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  2190. 1194:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_UserConfig(uint8_t Iwdg, uint8_t Stop, uint8_t Stdby)
  2191. 1195:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  2192. 971 .loc 1 1195 1
  2193. 972 .cfi_startproc
  2194. 973 @ args = 0, pretend = 0, frame = 16
  2195. 974 @ frame_needed = 1, uses_anonymous_args = 0
  2196. 975 0000 80B5 push {r7, lr}
  2197. 976 .LCFI47:
  2198. 977 .cfi_def_cfa_offset 8
  2199. 978 .cfi_offset 7, -8
  2200. 979 .cfi_offset 14, -4
  2201. 980 0002 84B0 sub sp, sp, #16
  2202. 981 .LCFI48:
  2203. 982 .cfi_def_cfa_offset 24
  2204. 983 0004 00AF add r7, sp, #0
  2205. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 39
  2206. 984 .LCFI49:
  2207. 985 .cfi_def_cfa_register 7
  2208. 986 0006 0346 mov r3, r0
  2209. 987 0008 FB71 strb r3, [r7, #7]
  2210. 988 000a 0B46 mov r3, r1
  2211. 989 000c BB71 strb r3, [r7, #6]
  2212. 990 000e 1346 mov r3, r2
  2213. 991 0010 7B71 strb r3, [r7, #5]
  2214. 1196:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** uint8_t optiontmp = 0xFF;
  2215. 992 .loc 1 1196 11
  2216. 993 0012 FF23 movs r3, #255
  2217. 994 0014 FB73 strb r3, [r7, #15]
  2218. 1197:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK;
  2219. 995 .loc 1 1197 21
  2220. 996 0016 0023 movs r3, #0
  2221. 997 0018 BB73 strb r3, [r7, #14]
  2222. 1198:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2223. 1199:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  2224. 1200:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_IWDG_SOURCE(Iwdg));
  2225. 1201:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_STOP_SOURCE(Stop));
  2226. 1202:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_STDBY_SOURCE(Stdby));
  2227. 1203:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2228. 1204:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */
  2229. 1205:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
  2230. 998 .loc 1 1205 12
  2231. 999 001a 4CF25030 movw r0, #50000
  2232. 1000 001e FFF7FEFF bl FLASH_WaitForLastOperation
  2233. 1001 0022 0346 mov r3, r0
  2234. 1002 0024 BB73 strb r3, [r7, #14]
  2235. 1206:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2236. 1207:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if (status == HAL_OK)
  2237. 1003 .loc 1 1207 6
  2238. 1004 0026 BB7B ldrb r3, [r7, #14] @ zero_extendqisi2
  2239. 1005 0028 002B cmp r3, #0
  2240. 1006 002a 11D1 bne .L56
  2241. 1208:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  2242. 1209:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Mask OPTLOCK, OPTSTRT, BOR_LEV and BFB2 bits */
  2243. 1210:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** optiontmp = (uint8_t)((*(__IO uint8_t *)OPTCR_BYTE0_ADDRESS) & (uint8_t)0x1F);
  2244. 1007 .loc 1 1210 66
  2245. 1008 002c 0B4B ldr r3, .L58
  2246. 1009 002e 1B78 ldrb r3, [r3]
  2247. 1010 0030 DBB2 uxtb r3, r3
  2248. 1011 .loc 1 1210 15
  2249. 1012 0032 03F01F03 and r3, r3, #31
  2250. 1013 0036 FB73 strb r3, [r7, #15]
  2251. 1211:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2252. 1212:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Update User Option Byte */
  2253. 1213:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint8_t *)OPTCR_BYTE0_ADDRESS = Iwdg | (uint8_t)(Stdby | (uint8_t)(Stop | ((uint8_t)opti
  2254. 1014 .loc 1 1213 69
  2255. 1015 0038 BA79 ldrb r2, [r7, #6]
  2256. 1016 003a FB7B ldrb r3, [r7, #15]
  2257. 1017 003c 1343 orrs r3, r3, r2
  2258. 1018 003e DAB2 uxtb r2, r3
  2259. 1019 .loc 1 1213 51
  2260. 1020 0040 7B79 ldrb r3, [r7, #5]
  2261. 1021 0042 1343 orrs r3, r3, r2
  2262. 1022 0044 DAB2 uxtb r2, r3
  2263. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 40
  2264. 1023 .loc 1 1213 5
  2265. 1024 0046 0549 ldr r1, .L58
  2266. 1025 .loc 1 1213 42
  2267. 1026 0048 FB79 ldrb r3, [r7, #7]
  2268. 1027 004a 1343 orrs r3, r3, r2
  2269. 1028 004c DBB2 uxtb r3, r3
  2270. 1029 004e 0B70 strb r3, [r1]
  2271. 1030 .L56:
  2272. 1214:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  2273. 1215:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2274. 1216:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status;
  2275. 1031 .loc 1 1216 10
  2276. 1032 0050 BB7B ldrb r3, [r7, #14] @ zero_extendqisi2
  2277. 1217:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  2278. 1033 .loc 1 1217 1
  2279. 1034 0052 1846 mov r0, r3
  2280. 1035 0054 1037 adds r7, r7, #16
  2281. 1036 .LCFI50:
  2282. 1037 .cfi_def_cfa_offset 8
  2283. 1038 0056 BD46 mov sp, r7
  2284. 1039 .LCFI51:
  2285. 1040 .cfi_def_cfa_register 13
  2286. 1041 @ sp needed
  2287. 1042 0058 80BD pop {r7, pc}
  2288. 1043 .L59:
  2289. 1044 005a 00BF .align 2
  2290. 1045 .L58:
  2291. 1046 005c 143C0240 .word 1073888276
  2292. 1047 .cfi_endproc
  2293. 1048 .LFE244:
  2294. 1050 .section .text.FLASH_OB_BOR_LevelConfig,"ax",%progbits
  2295. 1051 .align 1
  2296. 1052 .syntax unified
  2297. 1053 .thumb
  2298. 1054 .thumb_func
  2299. 1056 FLASH_OB_BOR_LevelConfig:
  2300. 1057 .LFB245:
  2301. 1218:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2302. 1219:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  2303. 1220:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Set the BOR Level.
  2304. 1221:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Level specifies the Option Bytes BOR Reset Level.
  2305. 1222:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  2306. 1223:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_BOR_LEVEL3: Supply voltage ranges from 2.7 to 3.6 V
  2307. 1224:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_BOR_LEVEL2: Supply voltage ranges from 2.4 to 2.7 V
  2308. 1225:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_BOR_LEVEL1: Supply voltage ranges from 2.1 to 2.4 V
  2309. 1226:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_BOR_OFF: Supply voltage ranges from 1.62 to 2.1 V
  2310. 1227:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status
  2311. 1228:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  2312. 1229:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_BOR_LevelConfig(uint8_t Level)
  2313. 1230:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  2314. 1058 .loc 1 1230 1
  2315. 1059 .cfi_startproc
  2316. 1060 @ args = 0, pretend = 0, frame = 8
  2317. 1061 @ frame_needed = 1, uses_anonymous_args = 0
  2318. 1062 @ link register save eliminated.
  2319. 1063 0000 80B4 push {r7}
  2320. 1064 .LCFI52:
  2321. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 41
  2322. 1065 .cfi_def_cfa_offset 4
  2323. 1066 .cfi_offset 7, -4
  2324. 1067 0002 83B0 sub sp, sp, #12
  2325. 1068 .LCFI53:
  2326. 1069 .cfi_def_cfa_offset 16
  2327. 1070 0004 00AF add r7, sp, #0
  2328. 1071 .LCFI54:
  2329. 1072 .cfi_def_cfa_register 7
  2330. 1073 0006 0346 mov r3, r0
  2331. 1074 0008 FB71 strb r3, [r7, #7]
  2332. 1231:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  2333. 1232:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_BOR_LEVEL(Level));
  2334. 1233:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2335. 1234:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Set the BOR Level */
  2336. 1235:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint8_t *)OPTCR_BYTE0_ADDRESS &= (~FLASH_OPTCR_BOR_LEV);
  2337. 1075 .loc 1 1235 40
  2338. 1076 000a 0B4B ldr r3, .L62
  2339. 1077 000c 1B78 ldrb r3, [r3]
  2340. 1078 000e DBB2 uxtb r3, r3
  2341. 1079 0010 094A ldr r2, .L62
  2342. 1080 0012 23F00C03 bic r3, r3, #12
  2343. 1081 0016 DBB2 uxtb r3, r3
  2344. 1082 0018 1370 strb r3, [r2]
  2345. 1236:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint8_t *)OPTCR_BYTE0_ADDRESS |= Level;
  2346. 1083 .loc 1 1236 40
  2347. 1084 001a 074B ldr r3, .L62
  2348. 1085 001c 1B78 ldrb r3, [r3]
  2349. 1086 001e DAB2 uxtb r2, r3
  2350. 1087 0020 0549 ldr r1, .L62
  2351. 1088 0022 FB79 ldrb r3, [r7, #7]
  2352. 1089 0024 1343 orrs r3, r3, r2
  2353. 1090 0026 DBB2 uxtb r3, r3
  2354. 1091 0028 0B70 strb r3, [r1]
  2355. 1237:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2356. 1238:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return HAL_OK;
  2357. 1092 .loc 1 1238 10
  2358. 1093 002a 0023 movs r3, #0
  2359. 1239:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2360. 1240:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  2361. 1094 .loc 1 1240 1
  2362. 1095 002c 1846 mov r0, r3
  2363. 1096 002e 0C37 adds r7, r7, #12
  2364. 1097 .LCFI55:
  2365. 1098 .cfi_def_cfa_offset 4
  2366. 1099 0030 BD46 mov sp, r7
  2367. 1100 .LCFI56:
  2368. 1101 .cfi_def_cfa_register 13
  2369. 1102 @ sp needed
  2370. 1103 0032 5DF8047B ldr r7, [sp], #4
  2371. 1104 .LCFI57:
  2372. 1105 .cfi_restore 7
  2373. 1106 .cfi_def_cfa_offset 0
  2374. 1107 0036 7047 bx lr
  2375. 1108 .L63:
  2376. 1109 .align 2
  2377. 1110 .L62:
  2378. 1111 0038 143C0240 .word 1073888276
  2379. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 42
  2380. 1112 .cfi_endproc
  2381. 1113 .LFE245:
  2382. 1115 .section .text.FLASH_OB_GetUser,"ax",%progbits
  2383. 1116 .align 1
  2384. 1117 .syntax unified
  2385. 1118 .thumb
  2386. 1119 .thumb_func
  2387. 1121 FLASH_OB_GetUser:
  2388. 1122 .LFB246:
  2389. 1241:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2390. 1242:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  2391. 1243:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Return the FLASH User Option Byte value.
  2392. 1244:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval uint8_t FLASH User Option Bytes values: IWDG_SW(Bit0), RST_STOP(Bit1)
  2393. 1245:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * and RST_STDBY(Bit2).
  2394. 1246:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  2395. 1247:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static uint8_t FLASH_OB_GetUser(void)
  2396. 1248:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  2397. 1123 .loc 1 1248 1
  2398. 1124 .cfi_startproc
  2399. 1125 @ args = 0, pretend = 0, frame = 0
  2400. 1126 @ frame_needed = 1, uses_anonymous_args = 0
  2401. 1127 @ link register save eliminated.
  2402. 1128 0000 80B4 push {r7}
  2403. 1129 .LCFI58:
  2404. 1130 .cfi_def_cfa_offset 4
  2405. 1131 .cfi_offset 7, -4
  2406. 1132 0002 00AF add r7, sp, #0
  2407. 1133 .LCFI59:
  2408. 1134 .cfi_def_cfa_register 7
  2409. 1249:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Return the User Option Byte */
  2410. 1250:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return ((uint8_t)(FLASH->OPTCR & 0xE0));
  2411. 1135 .loc 1 1250 26
  2412. 1136 0004 054B ldr r3, .L66
  2413. 1137 0006 5B69 ldr r3, [r3, #20]
  2414. 1138 .loc 1 1250 11
  2415. 1139 0008 DBB2 uxtb r3, r3
  2416. 1140 000a 23F01F03 bic r3, r3, #31
  2417. 1141 000e DBB2 uxtb r3, r3
  2418. 1251:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  2419. 1142 .loc 1 1251 1
  2420. 1143 0010 1846 mov r0, r3
  2421. 1144 0012 BD46 mov sp, r7
  2422. 1145 .LCFI60:
  2423. 1146 .cfi_def_cfa_register 13
  2424. 1147 @ sp needed
  2425. 1148 0014 5DF8047B ldr r7, [sp], #4
  2426. 1149 .LCFI61:
  2427. 1150 .cfi_restore 7
  2428. 1151 .cfi_def_cfa_offset 0
  2429. 1152 0018 7047 bx lr
  2430. 1153 .L67:
  2431. 1154 001a 00BF .align 2
  2432. 1155 .L66:
  2433. 1156 001c 003C0240 .word 1073888256
  2434. 1157 .cfi_endproc
  2435. 1158 .LFE246:
  2436. 1160 .section .text.FLASH_OB_GetWRP,"ax",%progbits
  2437. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 43
  2438. 1161 .align 1
  2439. 1162 .syntax unified
  2440. 1163 .thumb
  2441. 1164 .thumb_func
  2442. 1166 FLASH_OB_GetWRP:
  2443. 1167 .LFB247:
  2444. 1252:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2445. 1253:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  2446. 1254:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Return the FLASH Write Protection Option Bytes value.
  2447. 1255:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval uint16_t FLASH Write Protection Option Bytes value
  2448. 1256:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  2449. 1257:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static uint16_t FLASH_OB_GetWRP(void)
  2450. 1258:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  2451. 1168 .loc 1 1258 1
  2452. 1169 .cfi_startproc
  2453. 1170 @ args = 0, pretend = 0, frame = 0
  2454. 1171 @ frame_needed = 1, uses_anonymous_args = 0
  2455. 1172 @ link register save eliminated.
  2456. 1173 0000 80B4 push {r7}
  2457. 1174 .LCFI62:
  2458. 1175 .cfi_def_cfa_offset 4
  2459. 1176 .cfi_offset 7, -4
  2460. 1177 0002 00AF add r7, sp, #0
  2461. 1178 .LCFI63:
  2462. 1179 .cfi_def_cfa_register 7
  2463. 1259:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Return the FLASH write protection Register value */
  2464. 1260:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return (*(__IO uint16_t *)(OPTCR_BYTE2_ADDRESS));
  2465. 1180 .loc 1 1260 11
  2466. 1181 0004 034B ldr r3, .L70
  2467. 1182 0006 1B88 ldrh r3, [r3] @ movhi
  2468. 1183 0008 9BB2 uxth r3, r3
  2469. 1261:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  2470. 1184 .loc 1 1261 1
  2471. 1185 000a 1846 mov r0, r3
  2472. 1186 000c BD46 mov sp, r7
  2473. 1187 .LCFI64:
  2474. 1188 .cfi_def_cfa_register 13
  2475. 1189 @ sp needed
  2476. 1190 000e 5DF8047B ldr r7, [sp], #4
  2477. 1191 .LCFI65:
  2478. 1192 .cfi_restore 7
  2479. 1193 .cfi_def_cfa_offset 0
  2480. 1194 0012 7047 bx lr
  2481. 1195 .L71:
  2482. 1196 .align 2
  2483. 1197 .L70:
  2484. 1198 0014 163C0240 .word 1073888278
  2485. 1199 .cfi_endproc
  2486. 1200 .LFE247:
  2487. 1202 .section .text.FLASH_OB_GetRDP,"ax",%progbits
  2488. 1203 .align 1
  2489. 1204 .syntax unified
  2490. 1205 .thumb
  2491. 1206 .thumb_func
  2492. 1208 FLASH_OB_GetRDP:
  2493. 1209 .LFB248:
  2494. 1262:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2495. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 44
  2496. 1263:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  2497. 1264:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Returns the FLASH Read Protection level.
  2498. 1265:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval FLASH ReadOut Protection Status:
  2499. 1266:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  2500. 1267:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_RDP_LEVEL_0: No protection
  2501. 1268:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_RDP_LEVEL_1: Read protection of the memory
  2502. 1269:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_RDP_LEVEL_2: Full chip protection
  2503. 1270:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  2504. 1271:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static uint8_t FLASH_OB_GetRDP(void)
  2505. 1272:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  2506. 1210 .loc 1 1272 1
  2507. 1211 .cfi_startproc
  2508. 1212 @ args = 0, pretend = 0, frame = 8
  2509. 1213 @ frame_needed = 1, uses_anonymous_args = 0
  2510. 1214 @ link register save eliminated.
  2511. 1215 0000 80B4 push {r7}
  2512. 1216 .LCFI66:
  2513. 1217 .cfi_def_cfa_offset 4
  2514. 1218 .cfi_offset 7, -4
  2515. 1219 0002 83B0 sub sp, sp, #12
  2516. 1220 .LCFI67:
  2517. 1221 .cfi_def_cfa_offset 16
  2518. 1222 0004 00AF add r7, sp, #0
  2519. 1223 .LCFI68:
  2520. 1224 .cfi_def_cfa_register 7
  2521. 1273:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** uint8_t readstatus = OB_RDP_LEVEL_0;
  2522. 1225 .loc 1 1273 11
  2523. 1226 0006 AA23 movs r3, #170
  2524. 1227 0008 FB71 strb r3, [r7, #7]
  2525. 1274:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2526. 1275:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if (*(__IO uint8_t *)(OPTCR_BYTE1_ADDRESS) == (uint8_t)OB_RDP_LEVEL_2)
  2527. 1228 .loc 1 1275 7
  2528. 1229 000a 0C4B ldr r3, .L77
  2529. 1230 000c 1B78 ldrb r3, [r3]
  2530. 1231 000e DBB2 uxtb r3, r3
  2531. 1232 .loc 1 1275 6
  2532. 1233 0010 CC2B cmp r3, #204
  2533. 1234 0012 02D1 bne .L73
  2534. 1276:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  2535. 1277:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** readstatus = OB_RDP_LEVEL_2;
  2536. 1235 .loc 1 1277 16
  2537. 1236 0014 CC23 movs r3, #204
  2538. 1237 0016 FB71 strb r3, [r7, #7]
  2539. 1238 0018 09E0 b .L74
  2540. 1239 .L73:
  2541. 1278:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  2542. 1279:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else if (*(__IO uint8_t *)(OPTCR_BYTE1_ADDRESS) == (uint8_t)OB_RDP_LEVEL_0)
  2543. 1240 .loc 1 1279 12
  2544. 1241 001a 084B ldr r3, .L77
  2545. 1242 001c 1B78 ldrb r3, [r3]
  2546. 1243 001e DBB2 uxtb r3, r3
  2547. 1244 .loc 1 1279 11
  2548. 1245 0020 AA2B cmp r3, #170
  2549. 1246 0022 02D1 bne .L75
  2550. 1280:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  2551. 1281:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** readstatus = OB_RDP_LEVEL_0;
  2552. 1247 .loc 1 1281 16
  2553. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 45
  2554. 1248 0024 AA23 movs r3, #170
  2555. 1249 0026 FB71 strb r3, [r7, #7]
  2556. 1250 0028 01E0 b .L74
  2557. 1251 .L75:
  2558. 1282:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  2559. 1283:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else
  2560. 1284:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  2561. 1285:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** readstatus = OB_RDP_LEVEL_1;
  2562. 1252 .loc 1 1285 16
  2563. 1253 002a 5523 movs r3, #85
  2564. 1254 002c FB71 strb r3, [r7, #7]
  2565. 1255 .L74:
  2566. 1286:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  2567. 1287:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2568. 1288:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return readstatus;
  2569. 1256 .loc 1 1288 10
  2570. 1257 002e FB79 ldrb r3, [r7, #7] @ zero_extendqisi2
  2571. 1289:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  2572. 1258 .loc 1 1289 1
  2573. 1259 0030 1846 mov r0, r3
  2574. 1260 0032 0C37 adds r7, r7, #12
  2575. 1261 .LCFI69:
  2576. 1262 .cfi_def_cfa_offset 4
  2577. 1263 0034 BD46 mov sp, r7
  2578. 1264 .LCFI70:
  2579. 1265 .cfi_def_cfa_register 13
  2580. 1266 @ sp needed
  2581. 1267 0036 5DF8047B ldr r7, [sp], #4
  2582. 1268 .LCFI71:
  2583. 1269 .cfi_restore 7
  2584. 1270 .cfi_def_cfa_offset 0
  2585. 1271 003a 7047 bx lr
  2586. 1272 .L78:
  2587. 1273 .align 2
  2588. 1274 .L77:
  2589. 1275 003c 153C0240 .word 1073888277
  2590. 1276 .cfi_endproc
  2591. 1277 .LFE248:
  2592. 1279 .section .text.FLASH_OB_GetBOR,"ax",%progbits
  2593. 1280 .align 1
  2594. 1281 .syntax unified
  2595. 1282 .thumb
  2596. 1283 .thumb_func
  2597. 1285 FLASH_OB_GetBOR:
  2598. 1286 .LFB249:
  2599. 1290:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2600. 1291:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  2601. 1292:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Returns the FLASH BOR level.
  2602. 1293:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval uint8_t The FLASH BOR level:
  2603. 1294:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * - OB_BOR_LEVEL3: Supply voltage ranges from 2.7 to 3.6 V
  2604. 1295:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * - OB_BOR_LEVEL2: Supply voltage ranges from 2.4 to 2.7 V
  2605. 1296:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * - OB_BOR_LEVEL1: Supply voltage ranges from 2.1 to 2.4 V
  2606. 1297:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * - OB_BOR_OFF : Supply voltage ranges from 1.62 to 2.1 V
  2607. 1298:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  2608. 1299:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static uint8_t FLASH_OB_GetBOR(void)
  2609. 1300:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  2610. 1287 .loc 1 1300 1
  2611. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 46
  2612. 1288 .cfi_startproc
  2613. 1289 @ args = 0, pretend = 0, frame = 0
  2614. 1290 @ frame_needed = 1, uses_anonymous_args = 0
  2615. 1291 @ link register save eliminated.
  2616. 1292 0000 80B4 push {r7}
  2617. 1293 .LCFI72:
  2618. 1294 .cfi_def_cfa_offset 4
  2619. 1295 .cfi_offset 7, -4
  2620. 1296 0002 00AF add r7, sp, #0
  2621. 1297 .LCFI73:
  2622. 1298 .cfi_def_cfa_register 7
  2623. 1301:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Return the FLASH BOR level */
  2624. 1302:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return (uint8_t)(*(__IO uint8_t *)(OPTCR_BYTE0_ADDRESS) & (uint8_t)0x0C);
  2625. 1299 .loc 1 1302 10
  2626. 1300 0004 054B ldr r3, .L81
  2627. 1301 0006 1B78 ldrb r3, [r3]
  2628. 1302 0008 DBB2 uxtb r3, r3
  2629. 1303 000a 03F00C03 and r3, r3, #12
  2630. 1304 000e DBB2 uxtb r3, r3
  2631. 1303:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  2632. 1305 .loc 1 1303 1
  2633. 1306 0010 1846 mov r0, r3
  2634. 1307 0012 BD46 mov sp, r7
  2635. 1308 .LCFI74:
  2636. 1309 .cfi_def_cfa_register 13
  2637. 1310 @ sp needed
  2638. 1311 0014 5DF8047B ldr r7, [sp], #4
  2639. 1312 .LCFI75:
  2640. 1313 .cfi_restore 7
  2641. 1314 .cfi_def_cfa_offset 0
  2642. 1315 0018 7047 bx lr
  2643. 1316 .L82:
  2644. 1317 001a 00BF .align 2
  2645. 1318 .L81:
  2646. 1319 001c 143C0240 .word 1073888276
  2647. 1320 .cfi_endproc
  2648. 1321 .LFE249:
  2649. 1323 .section .text.FLASH_FlushCaches,"ax",%progbits
  2650. 1324 .align 1
  2651. 1325 .global FLASH_FlushCaches
  2652. 1326 .syntax unified
  2653. 1327 .thumb
  2654. 1328 .thumb_func
  2655. 1330 FLASH_FlushCaches:
  2656. 1331 .LFB250:
  2657. 1304:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2658. 1305:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  2659. 1306:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Flush the instruction and data caches
  2660. 1307:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval None
  2661. 1308:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  2662. 1309:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** void FLASH_FlushCaches(void)
  2663. 1310:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  2664. 1332 .loc 1 1310 1
  2665. 1333 .cfi_startproc
  2666. 1334 @ args = 0, pretend = 0, frame = 0
  2667. 1335 @ frame_needed = 1, uses_anonymous_args = 0
  2668. 1336 @ link register save eliminated.
  2669. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 47
  2670. 1337 0000 80B4 push {r7}
  2671. 1338 .LCFI76:
  2672. 1339 .cfi_def_cfa_offset 4
  2673. 1340 .cfi_offset 7, -4
  2674. 1341 0002 00AF add r7, sp, #0
  2675. 1342 .LCFI77:
  2676. 1343 .cfi_def_cfa_register 7
  2677. 1311:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Flush instruction cache */
  2678. 1312:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if (READ_BIT(FLASH->ACR, FLASH_ACR_ICEN) != RESET)
  2679. 1344 .loc 1 1312 7
  2680. 1345 0004 204B ldr r3, .L87
  2681. 1346 0006 1B68 ldr r3, [r3]
  2682. 1347 0008 03F40073 and r3, r3, #512
  2683. 1348 .loc 1 1312 6
  2684. 1349 000c 002B cmp r3, #0
  2685. 1350 000e 17D0 beq .L84
  2686. 1313:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  2687. 1314:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Disable instruction cache */
  2688. 1315:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_FLASH_INSTRUCTION_CACHE_DISABLE();
  2689. 1351 .loc 1 1315 5
  2690. 1352 0010 1D4B ldr r3, .L87
  2691. 1353 0012 1B68 ldr r3, [r3]
  2692. 1354 0014 1C4A ldr r2, .L87
  2693. 1355 0016 23F40073 bic r3, r3, #512
  2694. 1356 001a 1360 str r3, [r2]
  2695. 1316:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Reset instruction cache */
  2696. 1317:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_FLASH_INSTRUCTION_CACHE_RESET();
  2697. 1357 .loc 1 1317 5
  2698. 1358 001c 1A4B ldr r3, .L87
  2699. 1359 001e 1B68 ldr r3, [r3]
  2700. 1360 0020 194A ldr r2, .L87
  2701. 1361 0022 43F40063 orr r3, r3, #2048
  2702. 1362 0026 1360 str r3, [r2]
  2703. 1363 0028 174B ldr r3, .L87
  2704. 1364 002a 1B68 ldr r3, [r3]
  2705. 1365 002c 164A ldr r2, .L87
  2706. 1366 002e 23F40063 bic r3, r3, #2048
  2707. 1367 0032 1360 str r3, [r2]
  2708. 1318:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Enable instruction cache */
  2709. 1319:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_FLASH_INSTRUCTION_CACHE_ENABLE();
  2710. 1368 .loc 1 1319 5
  2711. 1369 0034 144B ldr r3, .L87
  2712. 1370 0036 1B68 ldr r3, [r3]
  2713. 1371 0038 134A ldr r2, .L87
  2714. 1372 003a 43F40073 orr r3, r3, #512
  2715. 1373 003e 1360 str r3, [r2]
  2716. 1374 .L84:
  2717. 1320:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  2718. 1321:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2719. 1322:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Flush data cache */
  2720. 1323:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if (READ_BIT(FLASH->ACR, FLASH_ACR_DCEN) != RESET)
  2721. 1375 .loc 1 1323 7
  2722. 1376 0040 114B ldr r3, .L87
  2723. 1377 0042 1B68 ldr r3, [r3]
  2724. 1378 0044 03F48063 and r3, r3, #1024
  2725. 1379 .loc 1 1323 6
  2726. 1380 0048 002B cmp r3, #0
  2727. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 48
  2728. 1381 004a 17D0 beq .L86
  2729. 1324:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  2730. 1325:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Disable data cache */
  2731. 1326:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_FLASH_DATA_CACHE_DISABLE();
  2732. 1382 .loc 1 1326 5
  2733. 1383 004c 0E4B ldr r3, .L87
  2734. 1384 004e 1B68 ldr r3, [r3]
  2735. 1385 0050 0D4A ldr r2, .L87
  2736. 1386 0052 23F48063 bic r3, r3, #1024
  2737. 1387 0056 1360 str r3, [r2]
  2738. 1327:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Reset data cache */
  2739. 1328:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_FLASH_DATA_CACHE_RESET();
  2740. 1388 .loc 1 1328 5
  2741. 1389 0058 0B4B ldr r3, .L87
  2742. 1390 005a 1B68 ldr r3, [r3]
  2743. 1391 005c 0A4A ldr r2, .L87
  2744. 1392 005e 43F48053 orr r3, r3, #4096
  2745. 1393 0062 1360 str r3, [r2]
  2746. 1394 0064 084B ldr r3, .L87
  2747. 1395 0066 1B68 ldr r3, [r3]
  2748. 1396 0068 074A ldr r2, .L87
  2749. 1397 006a 23F48053 bic r3, r3, #4096
  2750. 1398 006e 1360 str r3, [r2]
  2751. 1329:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Enable data cache */
  2752. 1330:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_FLASH_DATA_CACHE_ENABLE();
  2753. 1399 .loc 1 1330 5
  2754. 1400 0070 054B ldr r3, .L87
  2755. 1401 0072 1B68 ldr r3, [r3]
  2756. 1402 0074 044A ldr r2, .L87
  2757. 1403 0076 43F48063 orr r3, r3, #1024
  2758. 1404 007a 1360 str r3, [r2]
  2759. 1405 .L86:
  2760. 1331:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  2761. 1332:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  2762. 1406 .loc 1 1332 1
  2763. 1407 007c 00BF nop
  2764. 1408 007e BD46 mov sp, r7
  2765. 1409 .LCFI78:
  2766. 1410 .cfi_def_cfa_register 13
  2767. 1411 @ sp needed
  2768. 1412 0080 5DF8047B ldr r7, [sp], #4
  2769. 1413 .LCFI79:
  2770. 1414 .cfi_restore 7
  2771. 1415 .cfi_def_cfa_offset 0
  2772. 1416 0084 7047 bx lr
  2773. 1417 .L88:
  2774. 1418 0086 00BF .align 2
  2775. 1419 .L87:
  2776. 1420 0088 003C0240 .word 1073888256
  2777. 1421 .cfi_endproc
  2778. 1422 .LFE250:
  2779. 1424 .text
  2780. 1425 .Letext0:
  2781. 1426 .file 2 "d:\\arm-gcc\\arm-none-eabi\\include\\machine\\_default_types.h"
  2782. 1427 .file 3 "d:\\arm-gcc\\arm-none-eabi\\include\\sys\\_stdint.h"
  2783. 1428 .file 4 "Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f405xx.h"
  2784. 1429 .file 5 "Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h"
  2785. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 49
  2786. 1430 .file 6 "Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h"
  2787. 1431 .file 7 "Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash.h"
  2788. 1432 .file 8 "Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h"
  2789. ARM GAS C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s page 50
  2790. DEFINED SYMBOLS
  2791. *ABS*:00000000 stm32f4xx_hal_flash_ex.c
  2792. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:20 .text.HAL_FLASHEx_Erase:00000000 $t
  2793. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:26 .text.HAL_FLASHEx_Erase:00000000 HAL_FLASHEx_Erase
  2794. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:580 .text.FLASH_MassErase:00000000 FLASH_MassErase
  2795. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:652 .text.FLASH_Erase_Sector:00000000 FLASH_Erase_Sector
  2796. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:1330 .text.FLASH_FlushCaches:00000000 FLASH_FlushCaches
  2797. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:185 .text.HAL_FLASHEx_Erase:000000d8 $d
  2798. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:191 .text.HAL_FLASHEx_Erase_IT:00000000 $t
  2799. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:197 .text.HAL_FLASHEx_Erase_IT:00000000 HAL_FLASHEx_Erase_IT
  2800. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:327 .text.HAL_FLASHEx_Erase_IT:000000a4 $d
  2801. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:333 .text.HAL_FLASHEx_OBProgram:00000000 $t
  2802. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:339 .text.HAL_FLASHEx_OBProgram:00000000 HAL_FLASHEx_OBProgram
  2803. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:769 .text.FLASH_OB_EnableWRP:00000000 FLASH_OB_EnableWRP
  2804. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:838 .text.FLASH_OB_DisableWRP:00000000 FLASH_OB_DisableWRP
  2805. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:907 .text.FLASH_OB_RDP_LevelConfig:00000000 FLASH_OB_RDP_LevelConfig
  2806. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:969 .text.FLASH_OB_UserConfig:00000000 FLASH_OB_UserConfig
  2807. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:1056 .text.FLASH_OB_BOR_LevelConfig:00000000 FLASH_OB_BOR_LevelConfig
  2808. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:497 .text.HAL_FLASHEx_OBProgram:000000d8 $d
  2809. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:502 .text.HAL_FLASHEx_OBGetConfig:00000000 $t
  2810. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:508 .text.HAL_FLASHEx_OBGetConfig:00000000 HAL_FLASHEx_OBGetConfig
  2811. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:1166 .text.FLASH_OB_GetWRP:00000000 FLASH_OB_GetWRP
  2812. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:1208 .text.FLASH_OB_GetRDP:00000000 FLASH_OB_GetRDP
  2813. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:1121 .text.FLASH_OB_GetUser:00000000 FLASH_OB_GetUser
  2814. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:1285 .text.FLASH_OB_GetBOR:00000000 FLASH_OB_GetBOR
  2815. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:575 .text.FLASH_MassErase:00000000 $t
  2816. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:641 .text.FLASH_MassErase:00000044 $d
  2817. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:646 .text.FLASH_Erase_Sector:00000000 $t
  2818. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:759 .text.FLASH_Erase_Sector:0000008c $d
  2819. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:764 .text.FLASH_OB_EnableWRP:00000000 $t
  2820. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:828 .text.FLASH_OB_EnableWRP:00000040 $d
  2821. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:833 .text.FLASH_OB_DisableWRP:00000000 $t
  2822. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:897 .text.FLASH_OB_DisableWRP:0000003c $d
  2823. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:902 .text.FLASH_OB_RDP_LevelConfig:00000000 $t
  2824. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:959 .text.FLASH_OB_RDP_LevelConfig:00000030 $d
  2825. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:964 .text.FLASH_OB_UserConfig:00000000 $t
  2826. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:1046 .text.FLASH_OB_UserConfig:0000005c $d
  2827. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:1051 .text.FLASH_OB_BOR_LevelConfig:00000000 $t
  2828. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:1111 .text.FLASH_OB_BOR_LevelConfig:00000038 $d
  2829. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:1116 .text.FLASH_OB_GetUser:00000000 $t
  2830. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:1156 .text.FLASH_OB_GetUser:0000001c $d
  2831. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:1161 .text.FLASH_OB_GetWRP:00000000 $t
  2832. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:1198 .text.FLASH_OB_GetWRP:00000014 $d
  2833. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:1203 .text.FLASH_OB_GetRDP:00000000 $t
  2834. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:1275 .text.FLASH_OB_GetRDP:0000003c $d
  2835. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:1280 .text.FLASH_OB_GetBOR:00000000 $t
  2836. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:1319 .text.FLASH_OB_GetBOR:0000001c $d
  2837. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:1324 .text.FLASH_FlushCaches:00000000 $t
  2838. C:\Users\10728\AppData\Local\Temp\ccO0xOXV.s:1420 .text.FLASH_FlushCaches:00000088 $d
  2839. UNDEFINED SYMBOLS
  2840. FLASH_WaitForLastOperation
  2841. pFlash