stm32f4xx_hal_flash_ex.lst 183 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557
  1. ARM GAS /tmp/ccHpGP9I.s page 1
  2. 1 .cpu cortex-m4
  3. 2 .eabi_attribute 27, 1
  4. 3 .eabi_attribute 28, 1
  5. 4 .eabi_attribute 20, 1
  6. 5 .eabi_attribute 21, 1
  7. 6 .eabi_attribute 23, 3
  8. 7 .eabi_attribute 24, 1
  9. 8 .eabi_attribute 25, 1
  10. 9 .eabi_attribute 26, 1
  11. 10 .eabi_attribute 30, 1
  12. 11 .eabi_attribute 34, 1
  13. 12 .eabi_attribute 18, 4
  14. 13 .file "stm32f4xx_hal_flash_ex.c"
  15. 14 .text
  16. 15 .Ltext0:
  17. 16 .cfi_sections .debug_frame
  18. 17 .section .text.FLASH_MassErase,"ax",%progbits
  19. 18 .align 1
  20. 19 .syntax unified
  21. 20 .thumb
  22. 21 .thumb_func
  23. 22 .fpu fpv4-sp-d16
  24. 24 FLASH_MassErase:
  25. 25 .LFB134:
  26. 26 .file 1 "Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c"
  27. 1:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  28. 2:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** ******************************************************************************
  29. 3:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @file stm32f4xx_hal_flash_ex.c
  30. 4:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @author MCD Application Team
  31. 5:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Extended FLASH HAL module driver.
  32. 6:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This file provides firmware functions to manage the following
  33. 7:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * functionalities of the FLASH extension peripheral:
  34. 8:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * + Extended programming operations functions
  35. 9:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  36. 10:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** @verbatim
  37. 11:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** ==============================================================================
  38. 12:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** ##### Flash Extension features #####
  39. 13:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** ==============================================================================
  40. 14:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  41. 15:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** [..] Comparing to other previous devices, the FLASH interface for STM32F427xx/437xx and
  42. 16:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** STM32F429xx/439xx devices contains the following additional features
  43. 17:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  44. 18:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (+) Capacity up to 2 Mbyte with dual bank architecture supporting read-while-write
  45. 19:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** capability (RWW)
  46. 20:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (+) Dual bank memory organization
  47. 21:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (+) PCROP protection for all banks
  48. 22:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  49. 23:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** ##### How to use this driver #####
  50. 24:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** ==============================================================================
  51. 25:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** [..] This driver provides functions to configure and program the FLASH memory
  52. 26:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** of all STM32F427xx/437xx, STM32F429xx/439xx, STM32F469xx/479xx and STM32F446xx
  53. 27:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** devices. It includes
  54. 28:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (#) FLASH Memory Erase functions:
  55. 29:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (++) Lock and Unlock the FLASH interface using HAL_FLASH_Unlock() and
  56. 30:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_FLASH_Lock() functions
  57. 31:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (++) Erase function: Erase sector, erase all sectors
  58. 32:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (++) There are two modes of erase :
  59. ARM GAS /tmp/ccHpGP9I.s page 2
  60. 33:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (+++) Polling Mode using HAL_FLASHEx_Erase()
  61. 34:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (+++) Interrupt Mode using HAL_FLASHEx_Erase_IT()
  62. 35:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  63. 36:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (#) Option Bytes Programming functions: Use HAL_FLASHEx_OBProgram() to :
  64. 37:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (++) Set/Reset the write protection
  65. 38:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (++) Set the Read protection Level
  66. 39:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (++) Set the BOR level
  67. 40:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (++) Program the user Option Bytes
  68. 41:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (#) Advanced Option Bytes Programming functions: Use HAL_FLASHEx_AdvOBProgram() to :
  69. 42:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (++) Extended space (bank 2) erase function
  70. 43:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (++) Full FLASH space (2 Mo) erase (bank 1 and bank 2)
  71. 44:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (++) Dual Boot activation
  72. 45:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (++) Write protection configuration for bank 2
  73. 46:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (++) PCROP protection configuration and control for both banks
  74. 47:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  75. 48:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** @endverbatim
  76. 49:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** ******************************************************************************
  77. 50:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @attention
  78. 51:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  79. 52:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
  80. 53:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * All rights reserved.</center></h2>
  81. 54:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  82. 55:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This software component is licensed by ST under BSD 3-Clause license,
  83. 56:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the "License"; You may not use this file except in compliance with the
  84. 57:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * License. You may obtain a copy of the License at:
  85. 58:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * opensource.org/licenses/BSD-3-Clause
  86. 59:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  87. 60:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** ******************************************************************************
  88. 61:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  89. 62:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  90. 63:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Includes ------------------------------------------------------------------*/
  91. 64:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #include "stm32f4xx_hal.h"
  92. 65:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  93. 66:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** @addtogroup STM32F4xx_HAL_Driver
  94. 67:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @{
  95. 68:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  96. 69:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  97. 70:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** @defgroup FLASHEx FLASHEx
  98. 71:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief FLASH HAL Extension module driver
  99. 72:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @{
  100. 73:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  101. 74:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  102. 75:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #ifdef HAL_FLASH_MODULE_ENABLED
  103. 76:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  104. 77:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Private typedef -----------------------------------------------------------*/
  105. 78:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Private define ------------------------------------------------------------*/
  106. 79:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** @addtogroup FLASHEx_Private_Constants
  107. 80:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @{
  108. 81:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  109. 82:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #define FLASH_TIMEOUT_VALUE 50000U /* 50 s */
  110. 83:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  111. 84:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @}
  112. 85:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  113. 86:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  114. 87:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Private macro -------------------------------------------------------------*/
  115. 88:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Private variables ---------------------------------------------------------*/
  116. 89:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** @addtogroup FLASHEx_Private_Variables
  117. ARM GAS /tmp/ccHpGP9I.s page 3
  118. 90:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @{
  119. 91:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  120. 92:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** extern FLASH_ProcessTypeDef pFlash;
  121. 93:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  122. 94:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @}
  123. 95:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  124. 96:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  125. 97:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Private function prototypes -----------------------------------------------*/
  126. 98:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** @addtogroup FLASHEx_Private_Functions
  127. 99:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @{
  128. 100:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  129. 101:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Option bytes control */
  130. 102:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static void FLASH_MassErase(uint8_t VoltageRange, uint32_t Banks);
  131. 103:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_EnableWRP(uint32_t WRPSector, uint32_t Banks);
  132. 104:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_DisableWRP(uint32_t WRPSector, uint32_t Banks);
  133. 105:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_RDP_LevelConfig(uint8_t Level);
  134. 106: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. 107:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_BOR_LevelConfig(uint8_t Level);
  136. 108:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static uint8_t FLASH_OB_GetUser(void);
  137. 109:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static uint16_t FLASH_OB_GetWRP(void);
  138. 110:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static uint8_t FLASH_OB_GetRDP(void);
  139. 111:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static uint8_t FLASH_OB_GetBOR(void);
  140. 112:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  141. 113:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #if defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) ||
  142. 114:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F446xx) || defined(STM32F412Zx) || defined(STM32F412Vx) || defined(STM32F412Rx) ||
  143. 115:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F423xx)
  144. 116:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_EnablePCROP(uint32_t Sector);
  145. 117:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_DisablePCROP(uint32_t Sector);
  146. 118:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #endif /* STM32F401xC || STM32F401xE || STM32F410xx || STM32F411xE || STM32F446xx || STM32F412Zx ||
  147. 119:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** STM32F413xx || STM32F423xx */
  148. 120:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  149. 121:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx)|| defined(STM32F439xx) ||
  150. 122: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. 123: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. 124:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_BootConfig(uint8_t BootConfig);
  153. 125:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */
  154. 126:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  155. 127:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** extern HAL_StatusTypeDef FLASH_WaitForLastOperation(uint32_t Timeout);
  156. 128:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  157. 129:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @}
  158. 130:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  159. 131:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  160. 132:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Exported functions --------------------------------------------------------*/
  161. 133:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** @defgroup FLASHEx_Exported_Functions FLASHEx Exported Functions
  162. 134:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @{
  163. 135:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  164. 136:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  165. 137:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** @defgroup FLASHEx_Exported_Functions_Group1 Extended IO operation functions
  166. 138:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Extended IO operation functions
  167. 139:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  168. 140:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** @verbatim
  169. 141:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** ===============================================================================
  170. 142:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** ##### Extended programming operation functions #####
  171. 143:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** ===============================================================================
  172. 144:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** [..]
  173. 145:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** This subsection provides a set of functions allowing to manage the Extension FLASH
  174. 146:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** programming operations.
  175. ARM GAS /tmp/ccHpGP9I.s page 4
  176. 147:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  177. 148:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** @endverbatim
  178. 149:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @{
  179. 150:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  180. 151:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  181. 152:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Perform a mass erase or erase the specified FLASH memory sectors
  182. 153:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param[in] pEraseInit pointer to an FLASH_EraseInitTypeDef structure that
  183. 154:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * contains the configuration information for the erasing.
  184. 155:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  185. 156:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param[out] SectorError pointer to variable that
  186. 157:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * contains the configuration information on faulty sector in case of error
  187. 158:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * (0xFFFFFFFFU means that all the sectors have been correctly erased)
  188. 159:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  189. 160:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status
  190. 161:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  191. 162:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef HAL_FLASHEx_Erase(FLASH_EraseInitTypeDef *pEraseInit, uint32_t *SectorError)
  192. 163:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  193. 164:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_ERROR;
  194. 165:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** uint32_t index = 0U;
  195. 166:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  196. 167:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Process Locked */
  197. 168:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_LOCK(&pFlash);
  198. 169:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  199. 170:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  200. 171:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_TYPEERASE(pEraseInit->TypeErase));
  201. 172:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  202. 173:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */
  203. 174:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
  204. 175:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  205. 176:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(status == HAL_OK)
  206. 177:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  207. 178:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Initialization of SectorError variable*/
  208. 179:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *SectorError = 0xFFFFFFFFU;
  209. 180:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  210. 181:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(pEraseInit->TypeErase == FLASH_TYPEERASE_MASSERASE)
  211. 182:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  212. 183:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Mass erase to be done*/
  213. 184:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH_MassErase((uint8_t) pEraseInit->VoltageRange, pEraseInit->Banks);
  214. 185:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  215. 186:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */
  216. 187:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
  217. 188:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  218. 189:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* if the erase operation is completed, disable the MER Bit */
  219. 190:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR &= (~FLASH_MER_BIT);
  220. 191:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  221. 192:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else
  222. 193:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  223. 194:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  224. 195:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_NBSECTORS(pEraseInit->NbSectors + pEraseInit->Sector));
  225. 196:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  226. 197:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Erase by sector by sector to be done*/
  227. 198:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** for(index = pEraseInit->Sector; index < (pEraseInit->NbSectors + pEraseInit->Sector); index++
  228. 199:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  229. 200:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH_Erase_Sector(index, (uint8_t) pEraseInit->VoltageRange);
  230. 201:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  231. 202:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */
  232. 203:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
  233. ARM GAS /tmp/ccHpGP9I.s page 5
  234. 204:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  235. 205:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* If the erase operation is completed, disable the SER and SNB Bits */
  236. 206:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** CLEAR_BIT(FLASH->CR, (FLASH_CR_SER | FLASH_CR_SNB));
  237. 207:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  238. 208:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(status != HAL_OK)
  239. 209:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  240. 210:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* In case of error, stop erase procedure and return the faulty sector*/
  241. 211:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *SectorError = index;
  242. 212:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** break;
  243. 213:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  244. 214:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  245. 215:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  246. 216:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Flush the caches to be sure of the data consistency */
  247. 217:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH_FlushCaches();
  248. 218:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  249. 219:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  250. 220:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Process Unlocked */
  251. 221:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_UNLOCK(&pFlash);
  252. 222:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  253. 223:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status;
  254. 224:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  255. 225:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  256. 226:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  257. 227: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
  258. 228:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param pEraseInit pointer to an FLASH_EraseInitTypeDef structure that
  259. 229:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * contains the configuration information for the erasing.
  260. 230:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  261. 231:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status
  262. 232:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  263. 233:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef HAL_FLASHEx_Erase_IT(FLASH_EraseInitTypeDef *pEraseInit)
  264. 234:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  265. 235:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK;
  266. 236:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  267. 237:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Process Locked */
  268. 238:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_LOCK(&pFlash);
  269. 239:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  270. 240:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  271. 241:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_TYPEERASE(pEraseInit->TypeErase));
  272. 242:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  273. 243:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Enable End of FLASH Operation interrupt */
  274. 244:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_FLASH_ENABLE_IT(FLASH_IT_EOP);
  275. 245:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  276. 246:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Enable Error source interrupt */
  277. 247:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_FLASH_ENABLE_IT(FLASH_IT_ERR);
  278. 248:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  279. 249:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Clear pending flags (if any) */
  280. 250:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP | FLASH_FLAG_OPERR | FLASH_FLAG_WRPERR |\
  281. 251:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH_FLAG_PGAERR | FLASH_FLAG_PGPERR| FLASH_FLAG_PGSERR);
  282. 252:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  283. 253:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(pEraseInit->TypeErase == FLASH_TYPEERASE_MASSERASE)
  284. 254:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  285. 255:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Mass erase to be done*/
  286. 256:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pFlash.ProcedureOnGoing = FLASH_PROC_MASSERASE;
  287. 257:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pFlash.Bank = pEraseInit->Banks;
  288. 258:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH_MassErase((uint8_t) pEraseInit->VoltageRange, pEraseInit->Banks);
  289. 259:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  290. 260:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else
  291. ARM GAS /tmp/ccHpGP9I.s page 6
  292. 261:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  293. 262:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Erase by sector to be done*/
  294. 263:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  295. 264:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  296. 265:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_NBSECTORS(pEraseInit->NbSectors + pEraseInit->Sector));
  297. 266:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  298. 267:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pFlash.ProcedureOnGoing = FLASH_PROC_SECTERASE;
  299. 268:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pFlash.NbSectorsToErase = pEraseInit->NbSectors;
  300. 269:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pFlash.Sector = pEraseInit->Sector;
  301. 270:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pFlash.VoltageForErase = (uint8_t)pEraseInit->VoltageRange;
  302. 271:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  303. 272:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Erase 1st sector and wait for IT*/
  304. 273:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH_Erase_Sector(pEraseInit->Sector, pEraseInit->VoltageRange);
  305. 274:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  306. 275:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  307. 276:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status;
  308. 277:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  309. 278:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  310. 279:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  311. 280:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Program option bytes
  312. 281:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param pOBInit pointer to an FLASH_OBInitStruct structure that
  313. 282:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * contains the configuration information for the programming.
  314. 283:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  315. 284:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status
  316. 285:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  317. 286:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef HAL_FLASHEx_OBProgram(FLASH_OBProgramInitTypeDef *pOBInit)
  318. 287:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  319. 288:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_ERROR;
  320. 289:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  321. 290:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Process Locked */
  322. 291:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_LOCK(&pFlash);
  323. 292:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  324. 293:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  325. 294:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OPTIONBYTE(pOBInit->OptionType));
  326. 295:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  327. 296:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection configuration*/
  328. 297:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if((pOBInit->OptionType & OPTIONBYTE_WRP) == OPTIONBYTE_WRP)
  329. 298:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  330. 299:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_WRPSTATE(pOBInit->WRPState));
  331. 300:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(pOBInit->WRPState == OB_WRPSTATE_ENABLE)
  332. 301:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  333. 302:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Enable of Write protection on the selected Sector*/
  334. 303:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_OB_EnableWRP(pOBInit->WRPSector, pOBInit->Banks);
  335. 304:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  336. 305:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else
  337. 306:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  338. 307:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Disable of Write protection on the selected Sector*/
  339. 308:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_OB_DisableWRP(pOBInit->WRPSector, pOBInit->Banks);
  340. 309:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  341. 310:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  342. 311:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  343. 312:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Read protection configuration*/
  344. 313:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if((pOBInit->OptionType & OPTIONBYTE_RDP) == OPTIONBYTE_RDP)
  345. 314:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  346. 315:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_OB_RDP_LevelConfig(pOBInit->RDPLevel);
  347. 316:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  348. 317:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  349. ARM GAS /tmp/ccHpGP9I.s page 7
  350. 318:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*USER configuration*/
  351. 319:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if((pOBInit->OptionType & OPTIONBYTE_USER) == OPTIONBYTE_USER)
  352. 320:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  353. 321:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_OB_UserConfig(pOBInit->USERConfig&OB_IWDG_SW,
  354. 322:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pOBInit->USERConfig&OB_STOP_NO_RST,
  355. 323:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pOBInit->USERConfig&OB_STDBY_NO_RST);
  356. 324:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  357. 325:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  358. 326:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*BOR Level configuration*/
  359. 327:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if((pOBInit->OptionType & OPTIONBYTE_BOR) == OPTIONBYTE_BOR)
  360. 328:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  361. 329:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_OB_BOR_LevelConfig(pOBInit->BORLevel);
  362. 330:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  363. 331:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  364. 332:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Process Unlocked */
  365. 333:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_UNLOCK(&pFlash);
  366. 334:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  367. 335:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status;
  368. 336:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  369. 337:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  370. 338:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  371. 339:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Get the Option byte configuration
  372. 340:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param pOBInit pointer to an FLASH_OBInitStruct structure that
  373. 341:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * contains the configuration information for the programming.
  374. 342:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  375. 343:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval None
  376. 344:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  377. 345:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** void HAL_FLASHEx_OBGetConfig(FLASH_OBProgramInitTypeDef *pOBInit)
  378. 346:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  379. 347:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pOBInit->OptionType = OPTIONBYTE_WRP | OPTIONBYTE_RDP | OPTIONBYTE_USER | OPTIONBYTE_BOR;
  380. 348:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  381. 349:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Get WRP*/
  382. 350:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pOBInit->WRPSector = (uint32_t)FLASH_OB_GetWRP();
  383. 351:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  384. 352:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Get RDP Level*/
  385. 353:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pOBInit->RDPLevel = (uint32_t)FLASH_OB_GetRDP();
  386. 354:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  387. 355:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Get USER*/
  388. 356:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pOBInit->USERConfig = (uint8_t)FLASH_OB_GetUser();
  389. 357:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  390. 358:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Get BOR Level*/
  391. 359:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pOBInit->BORLevel = (uint32_t)FLASH_OB_GetBOR();
  392. 360:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  393. 361:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  394. 362:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) ||
  395. 363:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) ||
  396. 364:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F410Rx) || defined(STM32F411xE) || defined(STM32F446xx) || defined(STM32F469xx) ||
  397. 365:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx) || defined(STM32F412Rx) ||
  398. 366:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F412Cx) || defined(STM32F413xx) || defined(STM32F423xx)
  399. 367:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  400. 368:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Program option bytes
  401. 369:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param pAdvOBInit pointer to an FLASH_AdvOBProgramInitTypeDef structure that
  402. 370:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * contains the configuration information for the programming.
  403. 371:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  404. 372:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status
  405. 373:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  406. 374:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef HAL_FLASHEx_AdvOBProgram (FLASH_AdvOBProgramInitTypeDef *pAdvOBInit)
  407. ARM GAS /tmp/ccHpGP9I.s page 8
  408. 375:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  409. 376:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_ERROR;
  410. 377:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  411. 378:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  412. 379:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OBEX(pAdvOBInit->OptionType));
  413. 380:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  414. 381:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Program PCROP option byte*/
  415. 382:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(((pAdvOBInit->OptionType) & OPTIONBYTE_PCROP) == OPTIONBYTE_PCROP)
  416. 383:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  417. 384:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  418. 385:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_PCROPSTATE(pAdvOBInit->PCROPState));
  419. 386:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if((pAdvOBInit->PCROPState) == OB_PCROP_STATE_ENABLE)
  420. 387:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  421. 388:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Enable of Write protection on the selected Sector*/
  422. 389:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #if defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) ||
  423. 390:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F411xE) || defined(STM32F446xx) || defined(STM32F412Zx) || defined(STM32F412Vx) ||
  424. 391:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F412Cx) || defined(STM32F413xx) || defined(STM32F423xx)
  425. 392:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_OB_EnablePCROP(pAdvOBInit->Sectors);
  426. 393:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #else /* STM32F427xx || STM32F437xx || STM32F429xx|| STM32F439xx || STM32F469xx || STM32F479xx */
  427. 394:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_OB_EnablePCROP(pAdvOBInit->SectorsBank1, pAdvOBInit->SectorsBank2, pAdvOBInit-
  428. 395:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #endif /* STM32F401xC || STM32F401xE || STM32F410xx || STM32F411xE || STM32F446xx || STM32F412Zx ||
  429. 396:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** STM32F413xx || STM32F423xx */
  430. 397:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  431. 398:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else
  432. 399:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  433. 400:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Disable of Write protection on the selected Sector*/
  434. 401:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #if defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) ||
  435. 402:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F411xE) || defined(STM32F446xx) || defined(STM32F412Zx) || defined(STM32F412Vx) ||
  436. 403:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F412Cx) || defined(STM32F413xx) || defined(STM32F423xx)
  437. 404:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_OB_DisablePCROP(pAdvOBInit->Sectors);
  438. 405:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #else /* STM32F427xx || STM32F437xx || STM32F429xx|| STM32F439xx || STM32F469xx || STM32F479xx */
  439. 406:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_OB_DisablePCROP(pAdvOBInit->SectorsBank1, pAdvOBInit->SectorsBank2, pAdvOBInit
  440. 407:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #endif /* STM32F401xC || STM32F401xE || STM32F410xx || STM32F411xE || STM32F446xx || STM32F412Zx ||
  441. 408:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** STM32F413xx || STM32F423xx */
  442. 409:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  443. 410:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  444. 411:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  445. 412:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) ||
  446. 413:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Program BOOT config option byte*/
  447. 414:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(((pAdvOBInit->OptionType) & OPTIONBYTE_BOOTCONFIG) == OPTIONBYTE_BOOTCONFIG)
  448. 415:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  449. 416:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_OB_BootConfig(pAdvOBInit->BootConfig);
  450. 417:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  451. 418:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */
  452. 419:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  453. 420:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status;
  454. 421:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  455. 422:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  456. 423:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  457. 424:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Get the OBEX byte configuration
  458. 425:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param pAdvOBInit pointer to an FLASH_AdvOBProgramInitTypeDef structure that
  459. 426:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * contains the configuration information for the programming.
  460. 427:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  461. 428:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval None
  462. 429:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  463. 430:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** void HAL_FLASHEx_AdvOBGetConfig(FLASH_AdvOBProgramInitTypeDef *pAdvOBInit)
  464. 431:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  465. ARM GAS /tmp/ccHpGP9I.s page 9
  466. 432:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #if defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) ||
  467. 433:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F411xE) || defined(STM32F446xx) || defined(STM32F412Zx) || defined(STM32F412Vx) ||
  468. 434:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F412Cx) || defined(STM32F413xx) || defined(STM32F423xx)
  469. 435:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Get Sector*/
  470. 436:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pAdvOBInit->Sectors = (*(__IO uint16_t *)(OPTCR_BYTE2_ADDRESS));
  471. 437:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #else /* STM32F427xx || STM32F437xx || STM32F429xx|| STM32F439xx || STM32F469xx || STM32F479xx */
  472. 438:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Get Sector for Bank1*/
  473. 439:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pAdvOBInit->SectorsBank1 = (*(__IO uint16_t *)(OPTCR_BYTE2_ADDRESS));
  474. 440:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  475. 441:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Get Sector for Bank2*/
  476. 442:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pAdvOBInit->SectorsBank2 = (*(__IO uint16_t *)(OPTCR1_BYTE2_ADDRESS));
  477. 443:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  478. 444:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Get Boot config OB*/
  479. 445:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pAdvOBInit->BootConfig = *(__IO uint8_t *)OPTCR_BYTE0_ADDRESS;
  480. 446:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #endif /* STM32F401xC || STM32F401xE || STM32F410xx || STM32F411xE || STM32F446xx || STM32F412Zx ||
  481. 447:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** STM32F413xx || STM32F423xx */
  482. 448:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  483. 449:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  484. 450:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  485. 451:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Select the Protection Mode
  486. 452:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  487. 453:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note After PCROP activated Option Byte modification NOT POSSIBLE! excepted
  488. 454:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * Global Read Out Protection modification (from level1 to level0)
  489. 455:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note Once SPRMOD bit is active unprotection of a protected sector is not possible
  490. 456: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
  491. 457:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note This function can be used only for STM32F42xxx/STM32F43xxx/STM32F401xx/STM32F411xx/STM3
  492. 458:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * STM32F469xx/STM32F479xx/STM32F412xx/STM32F413xx devices.
  493. 459:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  494. 460:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status
  495. 461:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  496. 462:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef HAL_FLASHEx_OB_SelectPCROP(void)
  497. 463:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  498. 464:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** uint8_t optiontmp = 0xFF;
  499. 465:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  500. 466:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Mask SPRMOD bit */
  501. 467:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** optiontmp = (uint8_t)((*(__IO uint8_t *)OPTCR_BYTE3_ADDRESS) & (uint8_t)0x7F);
  502. 468:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  503. 469:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Update Option Byte */
  504. 470:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint8_t *)OPTCR_BYTE3_ADDRESS = (uint8_t)(OB_PCROP_SELECTED | optiontmp);
  505. 471:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  506. 472:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return HAL_OK;
  507. 473:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  508. 474:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  509. 475:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  510. 476:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Deselect the Protection Mode
  511. 477:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  512. 478:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note After PCROP activated Option Byte modification NOT POSSIBLE! excepted
  513. 479:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * Global Read Out Protection modification (from level1 to level0)
  514. 480:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note Once SPRMOD bit is active unprotection of a protected sector is not possible
  515. 481: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
  516. 482:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note This function can be used only for STM32F42xxx/STM32F43xxx/STM32F401xx/STM32F411xx/STM3
  517. 483:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * STM32F469xx/STM32F479xx/STM32F412xx/STM32F413xx devices.
  518. 484:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  519. 485:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status
  520. 486:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  521. 487:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef HAL_FLASHEx_OB_DeSelectPCROP(void)
  522. 488:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  523. ARM GAS /tmp/ccHpGP9I.s page 10
  524. 489:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** uint8_t optiontmp = 0xFF;
  525. 490:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  526. 491:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Mask SPRMOD bit */
  527. 492:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** optiontmp = (uint8_t)((*(__IO uint8_t *)OPTCR_BYTE3_ADDRESS) & (uint8_t)0x7F);
  528. 493:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  529. 494:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Update Option Byte */
  530. 495:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint8_t *)OPTCR_BYTE3_ADDRESS = (uint8_t)(OB_PCROP_DESELECTED | optiontmp);
  531. 496:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  532. 497:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return HAL_OK;
  533. 498:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  534. 499:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F401xC || STM32F401xE ||
  535. 500:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** STM32F411xE || STM32F469xx || STM32F479xx || STM32F412Zx || STM32F412Vx || STM32F412Rx ||
  536. 501:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** STM32F413xx || STM32F423xx */
  537. 502:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  538. 503:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx)|| defined(STM32F439xx) ||
  539. 504:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  540. 505:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Returns the FLASH Write Protection Option Bytes value for Bank 2
  541. 506:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note This function can be used only for STM32F42xxx/STM32F43xxx/STM32F469xx/STM32F479xx devi
  542. 507:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval The FLASH Write Protection Option Bytes value
  543. 508:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  544. 509:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** uint16_t HAL_FLASHEx_OB_GetBank2WRP(void)
  545. 510:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  546. 511:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Return the FLASH write protection Register value */
  547. 512:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return (*(__IO uint16_t *)(OPTCR1_BYTE2_ADDRESS));
  548. 513:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  549. 514:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */
  550. 515:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  551. 516:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  552. 517:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @}
  553. 518:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  554. 519:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  555. 520:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) ||
  556. 521:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  557. 522:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Full erase of FLASH memory sectors
  558. 523:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param VoltageRange The device voltage range which defines the erase parallelism.
  559. 524:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  560. 525: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,
  561. 526:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by byte (8-bit)
  562. 527: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,
  563. 528:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by half word (16-bit)
  564. 529: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,
  565. 530:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by word (32-bit)
  566. 531: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
  567. 532:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by double word (64-bit)
  568. 533:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  569. 534:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Banks Banks to be erased
  570. 535:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  571. 536:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_1: Bank1 to be erased
  572. 537:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_2: Bank2 to be erased
  573. 538:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_BOTH: Bank1 and Bank2 to be erased
  574. 539:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  575. 540:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status
  576. 541:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  577. 542:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static void FLASH_MassErase(uint8_t VoltageRange, uint32_t Banks)
  578. 543:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  579. 544:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  580. 545:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_VOLTAGERANGE(VoltageRange));
  581. ARM GAS /tmp/ccHpGP9I.s page 11
  582. 546:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_BANK(Banks));
  583. 547:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  584. 548:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* if the previous operation is completed, proceed to erase all sectors */
  585. 549:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** CLEAR_BIT(FLASH->CR, FLASH_CR_PSIZE);
  586. 550:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  587. 551:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(Banks == FLASH_BANK_BOTH)
  588. 552:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  589. 553:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* bank1 & bank2 will be erased*/
  590. 554:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= FLASH_MER_BIT;
  591. 555:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  592. 556:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else if(Banks == FLASH_BANK_1)
  593. 557:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  594. 558:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Only bank1 will be erased*/
  595. 559:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= FLASH_CR_MER1;
  596. 560:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  597. 561:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else
  598. 562:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  599. 563:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Only bank2 will be erased*/
  600. 564:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= FLASH_CR_MER2;
  601. 565:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  602. 566:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= FLASH_CR_STRT | ((uint32_t)VoltageRange <<8U);
  603. 567:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  604. 568:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  605. 569:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  606. 570:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Erase the specified FLASH memory sector
  607. 571:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Sector FLASH sector to erase
  608. 572:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * The value of this parameter depend on device used within the same series
  609. 573:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param VoltageRange The device voltage range which defines the erase parallelism.
  610. 574:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  611. 575: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,
  612. 576:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by byte (8-bit)
  613. 577: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,
  614. 578:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by half word (16-bit)
  615. 579: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,
  616. 580:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by word (32-bit)
  617. 581: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
  618. 582:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by double word (64-bit)
  619. 583:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  620. 584:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval None
  621. 585:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  622. 586:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** void FLASH_Erase_Sector(uint32_t Sector, uint8_t VoltageRange)
  623. 587:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  624. 588:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** uint32_t tmp_psize = 0U;
  625. 589:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  626. 590:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  627. 591:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_SECTOR(Sector));
  628. 592:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_VOLTAGERANGE(VoltageRange));
  629. 593:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  630. 594:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(VoltageRange == FLASH_VOLTAGE_RANGE_1)
  631. 595:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  632. 596:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** tmp_psize = FLASH_PSIZE_BYTE;
  633. 597:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  634. 598:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else if(VoltageRange == FLASH_VOLTAGE_RANGE_2)
  635. 599:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  636. 600:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** tmp_psize = FLASH_PSIZE_HALF_WORD;
  637. 601:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  638. 602:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else if(VoltageRange == FLASH_VOLTAGE_RANGE_3)
  639. ARM GAS /tmp/ccHpGP9I.s page 12
  640. 603:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  641. 604:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** tmp_psize = FLASH_PSIZE_WORD;
  642. 605:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  643. 606:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else
  644. 607:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  645. 608:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** tmp_psize = FLASH_PSIZE_DOUBLE_WORD;
  646. 609:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  647. 610:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  648. 611:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Need to add offset of 4 when sector higher than FLASH_SECTOR_11 */
  649. 612:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(Sector > FLASH_SECTOR_11)
  650. 613:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  651. 614:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** Sector += 4U;
  652. 615:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  653. 616:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* If the previous operation is completed, proceed to erase the sector */
  654. 617:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** CLEAR_BIT(FLASH->CR, FLASH_CR_PSIZE);
  655. 618:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= tmp_psize;
  656. 619:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** CLEAR_BIT(FLASH->CR, FLASH_CR_SNB);
  657. 620:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= FLASH_CR_SER | (Sector << FLASH_CR_SNB_Pos);
  658. 621:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= FLASH_CR_STRT;
  659. 622:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  660. 623:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  661. 624:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  662. 625:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Enable the write protection of the desired bank1 or bank 2 sectors
  663. 626:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  664. 627:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note When the memory read protection level is selected (RDP level = 1),
  665. 628:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * it is not possible to program or erase the flash sector i if CortexM4
  666. 629: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
  667. 630: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).
  668. 631:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  669. 632:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param WRPSector specifies the sector(s) to be write protected.
  670. 633:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  671. 634:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg WRPSector: A value between OB_WRP_SECTOR_0 and OB_WRP_SECTOR_23
  672. 635:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_WRP_SECTOR_All
  673. 636:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note BANK2 starts from OB_WRP_SECTOR_12
  674. 637:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  675. 638:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Banks Enable write protection on all the sectors for the specific bank
  676. 639:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  677. 640:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_1: WRP on all sectors of bank1
  678. 641:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_2: WRP on all sectors of bank2
  679. 642:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_BOTH: WRP on all sectors of bank1 & bank2
  680. 643:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  681. 644:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL FLASH State
  682. 645:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  683. 646:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_EnableWRP(uint32_t WRPSector, uint32_t Banks)
  684. 647:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  685. 648:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK;
  686. 649:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  687. 650:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  688. 651:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_WRP_SECTOR(WRPSector));
  689. 652:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_BANK(Banks));
  690. 653:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  691. 654:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */
  692. 655:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
  693. 656:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  694. 657:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(status == HAL_OK)
  695. 658:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  696. 659:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(((WRPSector == OB_WRP_SECTOR_All) && ((Banks == FLASH_BANK_1) || (Banks == FLASH_BANK_BOTH))
  697. ARM GAS /tmp/ccHpGP9I.s page 13
  698. 660:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (WRPSector < OB_WRP_SECTOR_12))
  699. 661:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  700. 662:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(WRPSector == OB_WRP_SECTOR_All)
  701. 663:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  702. 664:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection on all sector of BANK1*/
  703. 665:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t*)OPTCR_BYTE2_ADDRESS &= (~(WRPSector>>12));
  704. 666:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  705. 667:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else
  706. 668:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  707. 669:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection done on sectors of BANK1*/
  708. 670:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t*)OPTCR_BYTE2_ADDRESS &= (~WRPSector);
  709. 671:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  710. 672:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  711. 673:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else
  712. 674:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  713. 675:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection done on sectors of BANK2*/
  714. 676:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t*)OPTCR1_BYTE2_ADDRESS &= (~(WRPSector>>12));
  715. 677:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  716. 678:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  717. 679:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection on all sector of BANK2*/
  718. 680:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if((WRPSector == OB_WRP_SECTOR_All) && (Banks == FLASH_BANK_BOTH))
  719. 681:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  720. 682:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */
  721. 683:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
  722. 684:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  723. 685:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(status == HAL_OK)
  724. 686:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  725. 687:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t*)OPTCR1_BYTE2_ADDRESS &= (~(WRPSector>>12));
  726. 688:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  727. 689:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  728. 690:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  729. 691:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  730. 692:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status;
  731. 693:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  732. 694:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  733. 695:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  734. 696:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Disable the write protection of the desired bank1 or bank 2 sectors
  735. 697:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  736. 698:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note When the memory read protection level is selected (RDP level = 1),
  737. 699:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * it is not possible to program or erase the flash sector i if CortexM4
  738. 700: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
  739. 701: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).
  740. 702:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  741. 703:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param WRPSector specifies the sector(s) to be write protected.
  742. 704:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  743. 705:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg WRPSector: A value between OB_WRP_SECTOR_0 and OB_WRP_SECTOR_23
  744. 706:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_WRP_Sector_All
  745. 707:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note BANK2 starts from OB_WRP_SECTOR_12
  746. 708:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  747. 709:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Banks Disable write protection on all the sectors for the specific bank
  748. 710:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  749. 711:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_1: Bank1 to be erased
  750. 712:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_2: Bank2 to be erased
  751. 713:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_BOTH: Bank1 and Bank2 to be erased
  752. 714:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  753. 715:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status
  754. 716:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  755. ARM GAS /tmp/ccHpGP9I.s page 14
  756. 717:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_DisableWRP(uint32_t WRPSector, uint32_t Banks)
  757. 718:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  758. 719:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK;
  759. 720:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  760. 721:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  761. 722:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_WRP_SECTOR(WRPSector));
  762. 723:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_BANK(Banks));
  763. 724:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  764. 725:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */
  765. 726:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
  766. 727:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  767. 728:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(status == HAL_OK)
  768. 729:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  769. 730:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(((WRPSector == OB_WRP_SECTOR_All) && ((Banks == FLASH_BANK_1) || (Banks == FLASH_BANK_BOTH))
  770. 731:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (WRPSector < OB_WRP_SECTOR_12))
  771. 732:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  772. 733:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(WRPSector == OB_WRP_SECTOR_All)
  773. 734:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  774. 735:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection on all sector of BANK1*/
  775. 736:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t*)OPTCR_BYTE2_ADDRESS |= (uint16_t)(WRPSector>>12);
  776. 737:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  777. 738:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else
  778. 739:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  779. 740:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection done on sectors of BANK1*/
  780. 741:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t*)OPTCR_BYTE2_ADDRESS |= (uint16_t)WRPSector;
  781. 742:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  782. 743:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  783. 744:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else
  784. 745:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  785. 746:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection done on sectors of BANK2*/
  786. 747:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t*)OPTCR1_BYTE2_ADDRESS |= (uint16_t)(WRPSector>>12);
  787. 748:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  788. 749:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  789. 750:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection on all sector of BANK2*/
  790. 751:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if((WRPSector == OB_WRP_SECTOR_All) && (Banks == FLASH_BANK_BOTH))
  791. 752:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  792. 753:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */
  793. 754:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
  794. 755:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  795. 756:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(status == HAL_OK)
  796. 757:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  797. 758:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t*)OPTCR1_BYTE2_ADDRESS |= (uint16_t)(WRPSector>>12);
  798. 759:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  799. 760:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  800. 761:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  801. 762:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  802. 763:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  803. 764:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status;
  804. 765:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  805. 766:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  806. 767:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  807. 768:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Configure the Dual Bank Boot.
  808. 769:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  809. 770:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note This function can be used only for STM32F42xxx/43xxx devices.
  810. 771:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  811. 772:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param BootConfig specifies the Dual Bank Boot Option byte.
  812. 773:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  813. ARM GAS /tmp/ccHpGP9I.s page 15
  814. 774:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_Dual_BootEnabled: Dual Bank Boot Enable
  815. 775:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_Dual_BootDisabled: Dual Bank Boot Disabled
  816. 776:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval None
  817. 777:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  818. 778:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_BootConfig(uint8_t BootConfig)
  819. 779:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  820. 780:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK;
  821. 781:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  822. 782:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  823. 783:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_BOOT(BootConfig));
  824. 784:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  825. 785:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */
  826. 786:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
  827. 787:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  828. 788:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(status == HAL_OK)
  829. 789:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  830. 790:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Set Dual Bank Boot */
  831. 791:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint8_t *)OPTCR_BYTE0_ADDRESS &= (~FLASH_OPTCR_BFB2);
  832. 792:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint8_t *)OPTCR_BYTE0_ADDRESS |= BootConfig;
  833. 793:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  834. 794:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  835. 795:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status;
  836. 796:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  837. 797:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  838. 798:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  839. 799:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Enable the read/write protection (PCROP) of the desired
  840. 800:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * sectors of Bank 1 and/or Bank 2.
  841. 801:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note This function can be used only for STM32F42xxx/43xxx devices.
  842. 802: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
  843. 803:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  844. 804: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
  845. 805:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_PCROP_SECTOR__All
  846. 806: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
  847. 807:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  848. 808: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
  849. 809:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_PCROP_SECTOR__All
  850. 810:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Banks Enable PCROP protection on all the sectors for the specific bank
  851. 811:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  852. 812:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_1: WRP on all sectors of bank1
  853. 813:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_2: WRP on all sectors of bank2
  854. 814:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_BOTH: WRP on all sectors of bank1 & bank2
  855. 815:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  856. 816:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status
  857. 817:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  858. 818:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_EnablePCROP(uint32_t SectorBank1, uint32_t SectorBank2, uint32_t
  859. 819:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  860. 820:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK;
  861. 821:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  862. 822:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_BANK(Banks));
  863. 823:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  864. 824:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */
  865. 825:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
  866. 826:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  867. 827:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(status == HAL_OK)
  868. 828:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  869. 829:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if((Banks == FLASH_BANK_1) || (Banks == FLASH_BANK_BOTH))
  870. 830:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  871. ARM GAS /tmp/ccHpGP9I.s page 16
  872. 831:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_PCROP(SectorBank1));
  873. 832:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection done on sectors of BANK1*/
  874. 833:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t*)OPTCR_BYTE2_ADDRESS |= (uint16_t)SectorBank1;
  875. 834:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  876. 835:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else
  877. 836:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  878. 837:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_PCROP(SectorBank2));
  879. 838:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection done on sectors of BANK2*/
  880. 839:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t*)OPTCR1_BYTE2_ADDRESS |= (uint16_t)SectorBank2;
  881. 840:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  882. 841:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  883. 842:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection on all sector of BANK2*/
  884. 843:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(Banks == FLASH_BANK_BOTH)
  885. 844:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  886. 845:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_PCROP(SectorBank2));
  887. 846:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */
  888. 847:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
  889. 848:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  890. 849:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(status == HAL_OK)
  891. 850:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  892. 851:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection done on sectors of BANK2*/
  893. 852:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t*)OPTCR1_BYTE2_ADDRESS |= (uint16_t)SectorBank2;
  894. 853:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  895. 854:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  896. 855:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  897. 856:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  898. 857:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  899. 858:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status;
  900. 859:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  901. 860:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  902. 861:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  903. 862:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  904. 863:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Disable the read/write protection (PCROP) of the desired
  905. 864:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * sectors of Bank 1 and/or Bank 2.
  906. 865:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note This function can be used only for STM32F42xxx/43xxx devices.
  907. 866: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
  908. 867:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  909. 868: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
  910. 869:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_PCROP_SECTOR__All
  911. 870: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
  912. 871:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  913. 872: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
  914. 873:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_PCROP_SECTOR__All
  915. 874:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Banks Disable PCROP protection on all the sectors for the specific bank
  916. 875:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  917. 876:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_1: WRP on all sectors of bank1
  918. 877:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_2: WRP on all sectors of bank2
  919. 878:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_BOTH: WRP on all sectors of bank1 & bank2
  920. 879:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  921. 880:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status
  922. 881:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  923. 882:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_DisablePCROP(uint32_t SectorBank1, uint32_t SectorBank2, uint32_t
  924. 883:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  925. 884:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK;
  926. 885:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  927. 886:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  928. 887:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_BANK(Banks));
  929. ARM GAS /tmp/ccHpGP9I.s page 17
  930. 888:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  931. 889:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */
  932. 890:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
  933. 891:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  934. 892:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(status == HAL_OK)
  935. 893:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  936. 894:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if((Banks == FLASH_BANK_1) || (Banks == FLASH_BANK_BOTH))
  937. 895:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  938. 896:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_PCROP(SectorBank1));
  939. 897:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection done on sectors of BANK1*/
  940. 898:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t*)OPTCR_BYTE2_ADDRESS &= (~SectorBank1);
  941. 899:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  942. 900:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else
  943. 901:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  944. 902:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection done on sectors of BANK2*/
  945. 903:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_PCROP(SectorBank2));
  946. 904:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t*)OPTCR1_BYTE2_ADDRESS &= (~SectorBank2);
  947. 905:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  948. 906:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  949. 907:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection on all sector of BANK2*/
  950. 908:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(Banks == FLASH_BANK_BOTH)
  951. 909:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  952. 910:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_PCROP(SectorBank2));
  953. 911:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */
  954. 912:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
  955. 913:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  956. 914:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(status == HAL_OK)
  957. 915:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  958. 916:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection done on sectors of BANK2*/
  959. 917:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t*)OPTCR1_BYTE2_ADDRESS &= (~SectorBank2);
  960. 918:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  961. 919:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  962. 920:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  963. 921:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  964. 922:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  965. 923:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status;
  966. 924:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  967. 925:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  968. 926:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  969. 927:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */
  970. 928:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  971. 929:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx) ||
  972. 930:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) ||
  973. 931:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F410Rx) || defined(STM32F411xE) || defined(STM32F446xx) || defined(STM32F412Zx) ||
  974. 932:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F412Cx) || defined(STM32F413xx) ||
  975. 933:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F423xx)
  976. 934:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  977. 935:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Mass erase of FLASH memory
  978. 936:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param VoltageRange The device voltage range which defines the erase parallelism.
  979. 937:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  980. 938: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,
  981. 939:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by byte (8-bit)
  982. 940: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,
  983. 941:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by half word (16-bit)
  984. 942: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,
  985. 943:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by word (32-bit)
  986. 944: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
  987. ARM GAS /tmp/ccHpGP9I.s page 18
  988. 945:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by double word (64-bit)
  989. 946:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  990. 947:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Banks Banks to be erased
  991. 948:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  992. 949:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_1: Bank1 to be erased
  993. 950:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  994. 951:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval None
  995. 952:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  996. 953:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static void FLASH_MassErase(uint8_t VoltageRange, uint32_t Banks)
  997. 954:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  998. 27 .loc 1 954 0
  999. 28 .cfi_startproc
  1000. 29 @ args = 0, pretend = 0, frame = 0
  1001. 30 @ frame_needed = 0, uses_anonymous_args = 0
  1002. 31 @ link register save eliminated.
  1003. 32 .LVL0:
  1004. 955:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  1005. 956:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_VOLTAGERANGE(VoltageRange));
  1006. 957:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_BANK(Banks));
  1007. 958:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1008. 959:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* If the previous operation is completed, proceed to erase all sectors */
  1009. 960:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** CLEAR_BIT(FLASH->CR, FLASH_CR_PSIZE);
  1010. 33 .loc 1 960 0
  1011. 34 0000 074B ldr r3, .L2
  1012. 35 0002 1A69 ldr r2, [r3, #16]
  1013. 36 0004 22F44072 bic r2, r2, #768
  1014. 37 0008 1A61 str r2, [r3, #16]
  1015. 961:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= FLASH_CR_MER;
  1016. 38 .loc 1 961 0
  1017. 39 000a 1A69 ldr r2, [r3, #16]
  1018. 40 000c 42F00402 orr r2, r2, #4
  1019. 41 0010 1A61 str r2, [r3, #16]
  1020. 962:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= FLASH_CR_STRT | ((uint32_t)VoltageRange <<8U);
  1021. 42 .loc 1 962 0
  1022. 43 0012 1A69 ldr r2, [r3, #16]
  1023. 44 0014 42EA0020 orr r0, r2, r0, lsl #8
  1024. 45 .LVL1:
  1025. 46 0018 40F48030 orr r0, r0, #65536
  1026. 47 001c 1861 str r0, [r3, #16]
  1027. 48 001e 7047 bx lr
  1028. 49 .L3:
  1029. 50 .align 2
  1030. 51 .L2:
  1031. 52 0020 003C0240 .word 1073888256
  1032. 53 .cfi_endproc
  1033. 54 .LFE134:
  1034. 56 .section .text.FLASH_OB_BOR_LevelConfig,"ax",%progbits
  1035. 57 .align 1
  1036. 58 .syntax unified
  1037. 59 .thumb
  1038. 60 .thumb_func
  1039. 61 .fpu fpv4-sp-d16
  1040. 63 FLASH_OB_BOR_LevelConfig:
  1041. 64 .LFB140:
  1042. 963:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1043. 964:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1044. 965:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  1045. ARM GAS /tmp/ccHpGP9I.s page 19
  1046. 966:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Erase the specified FLASH memory sector
  1047. 967:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Sector FLASH sector to erase
  1048. 968:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * The value of this parameter depend on device used within the same series
  1049. 969:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param VoltageRange The device voltage range which defines the erase parallelism.
  1050. 970:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  1051. 971: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,
  1052. 972:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by byte (8-bit)
  1053. 973: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,
  1054. 974:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by half word (16-bit)
  1055. 975: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,
  1056. 976:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by word (32-bit)
  1057. 977: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
  1058. 978:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by double word (64-bit)
  1059. 979:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1060. 980:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval None
  1061. 981:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  1062. 982:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** void FLASH_Erase_Sector(uint32_t Sector, uint8_t VoltageRange)
  1063. 983:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1064. 984:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** uint32_t tmp_psize = 0U;
  1065. 985:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1066. 986:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  1067. 987:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_SECTOR(Sector));
  1068. 988:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_VOLTAGERANGE(VoltageRange));
  1069. 989:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1070. 990:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(VoltageRange == FLASH_VOLTAGE_RANGE_1)
  1071. 991:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1072. 992:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** tmp_psize = FLASH_PSIZE_BYTE;
  1073. 993:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1074. 994:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else if(VoltageRange == FLASH_VOLTAGE_RANGE_2)
  1075. 995:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1076. 996:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** tmp_psize = FLASH_PSIZE_HALF_WORD;
  1077. 997:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1078. 998:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else if(VoltageRange == FLASH_VOLTAGE_RANGE_3)
  1079. 999:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1080. 1000:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** tmp_psize = FLASH_PSIZE_WORD;
  1081. 1001:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1082. 1002:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else
  1083. 1003:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1084. 1004:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** tmp_psize = FLASH_PSIZE_DOUBLE_WORD;
  1085. 1005:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1086. 1006:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1087. 1007:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* If the previous operation is completed, proceed to erase the sector */
  1088. 1008:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** CLEAR_BIT(FLASH->CR, FLASH_CR_PSIZE);
  1089. 1009:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= tmp_psize;
  1090. 1010:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** CLEAR_BIT(FLASH->CR, FLASH_CR_SNB);
  1091. 1011:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= FLASH_CR_SER | (Sector << FLASH_CR_SNB_Pos);
  1092. 1012:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= FLASH_CR_STRT;
  1093. 1013:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1094. 1014:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1095. 1015:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  1096. 1016:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Enable the write protection of the desired bank 1 sectors
  1097. 1017:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1098. 1018:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note When the memory read protection level is selected (RDP level = 1),
  1099. 1019:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * it is not possible to program or erase the flash sector i if CortexM4
  1100. 1020: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
  1101. 1021: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).
  1102. 1022:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1103. ARM GAS /tmp/ccHpGP9I.s page 20
  1104. 1023:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param WRPSector specifies the sector(s) to be write protected.
  1105. 1024:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * The value of this parameter depend on device used within the same series
  1106. 1025:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1107. 1026:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Banks Enable write protection on all the sectors for the specific bank
  1108. 1027:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  1109. 1028:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_1: WRP on all sectors of bank1
  1110. 1029:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1111. 1030:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status
  1112. 1031:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  1113. 1032:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_EnableWRP(uint32_t WRPSector, uint32_t Banks)
  1114. 1033:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1115. 1034:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK;
  1116. 1035:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1117. 1036:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  1118. 1037:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_WRP_SECTOR(WRPSector));
  1119. 1038:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_BANK(Banks));
  1120. 1039:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1121. 1040:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */
  1122. 1041:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
  1123. 1042:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1124. 1043:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(status == HAL_OK)
  1125. 1044:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1126. 1045:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t*)OPTCR_BYTE2_ADDRESS &= (~WRPSector);
  1127. 1046:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1128. 1047:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1129. 1048:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status;
  1130. 1049:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1131. 1050:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1132. 1051:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  1133. 1052:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Disable the write protection of the desired bank 1 sectors
  1134. 1053:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1135. 1054:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note When the memory read protection level is selected (RDP level = 1),
  1136. 1055:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * it is not possible to program or erase the flash sector i if CortexM4
  1137. 1056: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
  1138. 1057: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).
  1139. 1058:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1140. 1059:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param WRPSector specifies the sector(s) to be write protected.
  1141. 1060:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * The value of this parameter depend on device used within the same series
  1142. 1061:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1143. 1062:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Banks Enable write protection on all the sectors for the specific bank
  1144. 1063:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  1145. 1064:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_1: WRP on all sectors of bank1
  1146. 1065:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1147. 1066:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status
  1148. 1067:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  1149. 1068:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_DisableWRP(uint32_t WRPSector, uint32_t Banks)
  1150. 1069:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1151. 1070:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK;
  1152. 1071:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1153. 1072:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  1154. 1073:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_WRP_SECTOR(WRPSector));
  1155. 1074:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_BANK(Banks));
  1156. 1075:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1157. 1076:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */
  1158. 1077:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
  1159. 1078:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1160. 1079:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(status == HAL_OK)
  1161. ARM GAS /tmp/ccHpGP9I.s page 21
  1162. 1080:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1163. 1081:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t*)OPTCR_BYTE2_ADDRESS |= (uint16_t)WRPSector;
  1164. 1082:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1165. 1083:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1166. 1084:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status;
  1167. 1085:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1168. 1086:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #endif /* STM32F40xxx || STM32F41xxx || STM32F401xx || STM32F410xx || STM32F411xE || STM32F446xx ||
  1169. 1087:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** STM32F413xx || STM32F423xx */
  1170. 1088:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1171. 1089:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #if defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) ||
  1172. 1090:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F411xE) || defined(STM32F446xx) || defined(STM32F412Zx) || defined(STM32F412Vx) ||
  1173. 1091:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F412Cx) || defined(STM32F413xx) || defined(STM32F423xx)
  1174. 1092:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  1175. 1093:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Enable the read/write protection (PCROP) of the desired sectors.
  1176. 1094:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note This function can be used only for STM32F401xx devices.
  1177. 1095:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Sector specifies the sector(s) to be read/write protected or unprotected.
  1178. 1096:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  1179. 1097:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_PCROP: A value between OB_PCROP_Sector0 and OB_PCROP_Sector5
  1180. 1098:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_PCROP_Sector_All
  1181. 1099:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status
  1182. 1100:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  1183. 1101:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_EnablePCROP(uint32_t Sector)
  1184. 1102:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1185. 1103:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK;
  1186. 1104:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1187. 1105:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  1188. 1106:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_PCROP(Sector));
  1189. 1107:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1190. 1108:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */
  1191. 1109:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
  1192. 1110:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1193. 1111:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(status == HAL_OK)
  1194. 1112:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1195. 1113:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t*)OPTCR_BYTE2_ADDRESS |= (uint16_t)Sector;
  1196. 1114:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1197. 1115:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1198. 1116:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status;
  1199. 1117:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1200. 1118:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1201. 1119:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1202. 1120:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  1203. 1121:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Disable the read/write protection (PCROP) of the desired sectors.
  1204. 1122:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note This function can be used only for STM32F401xx devices.
  1205. 1123:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Sector specifies the sector(s) to be read/write protected or unprotected.
  1206. 1124:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  1207. 1125:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_PCROP: A value between OB_PCROP_Sector0 and OB_PCROP_Sector5
  1208. 1126:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_PCROP_Sector_All
  1209. 1127:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status
  1210. 1128:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  1211. 1129:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_DisablePCROP(uint32_t Sector)
  1212. 1130:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1213. 1131:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK;
  1214. 1132:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1215. 1133:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  1216. 1134:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_PCROP(Sector));
  1217. 1135:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1218. 1136:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */
  1219. ARM GAS /tmp/ccHpGP9I.s page 22
  1220. 1137:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
  1221. 1138:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1222. 1139:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(status == HAL_OK)
  1223. 1140:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1224. 1141:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t*)OPTCR_BYTE2_ADDRESS &= (~Sector);
  1225. 1142:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1226. 1143:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1227. 1144:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status;
  1228. 1145:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1229. 1146:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1230. 1147:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #endif /* STM32F401xC || STM32F401xE || STM32F411xE || STM32F446xx || STM32F412Zx || STM32F412Vx ||
  1231. 1148:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** STM32F413xx || STM32F423xx */
  1232. 1149:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1233. 1150:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  1234. 1151:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Set the read protection level.
  1235. 1152:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Level specifies the read protection level.
  1236. 1153:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  1237. 1154:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_RDP_LEVEL_0: No protection
  1238. 1155:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_RDP_LEVEL_1: Read protection of the memory
  1239. 1156:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_RDP_LEVEL_2: Full chip protection
  1240. 1157:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1241. 1158: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
  1242. 1159:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *
  1243. 1160:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status
  1244. 1161:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  1245. 1162:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_RDP_LevelConfig(uint8_t Level)
  1246. 1163:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1247. 1164:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK;
  1248. 1165:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1249. 1166:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  1250. 1167:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_RDP_LEVEL(Level));
  1251. 1168:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1252. 1169:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */
  1253. 1170:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
  1254. 1171:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1255. 1172:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(status == HAL_OK)
  1256. 1173:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1257. 1174:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint8_t*)OPTCR_BYTE1_ADDRESS = Level;
  1258. 1175:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1259. 1176:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1260. 1177:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status;
  1261. 1178:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1262. 1179:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1263. 1180:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  1264. 1181:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Program the FLASH User Option Byte: IWDG_SW / RST_STOP / RST_STDBY.
  1265. 1182:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Iwdg Selects the IWDG mode
  1266. 1183:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  1267. 1184:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_IWDG_SW: Software IWDG selected
  1268. 1185:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_IWDG_HW: Hardware IWDG selected
  1269. 1186:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Stop Reset event when entering STOP mode.
  1270. 1187:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  1271. 1188:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_STOP_NO_RST: No reset generated when entering in STOP
  1272. 1189:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_STOP_RST: Reset generated when entering in STOP
  1273. 1190:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Stdby Reset event when entering Standby mode.
  1274. 1191:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  1275. 1192:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_STDBY_NO_RST: No reset generated when entering in STANDBY
  1276. 1193:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_STDBY_RST: Reset generated when entering in STANDBY
  1277. ARM GAS /tmp/ccHpGP9I.s page 23
  1278. 1194:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status
  1279. 1195:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  1280. 1196: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)
  1281. 1197:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1282. 1198:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** uint8_t optiontmp = 0xFF;
  1283. 1199:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK;
  1284. 1200:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1285. 1201:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  1286. 1202:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_IWDG_SOURCE(Iwdg));
  1287. 1203:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_STOP_SOURCE(Stop));
  1288. 1204:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_STDBY_SOURCE(Stdby));
  1289. 1205:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1290. 1206:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */
  1291. 1207:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
  1292. 1208:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1293. 1209:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(status == HAL_OK)
  1294. 1210:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1295. 1211:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Mask OPTLOCK, OPTSTRT, BOR_LEV and BFB2 bits */
  1296. 1212:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** optiontmp = (uint8_t)((*(__IO uint8_t *)OPTCR_BYTE0_ADDRESS) & (uint8_t)0x1F);
  1297. 1213:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1298. 1214:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Update User Option Byte */
  1299. 1215: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
  1300. 1216:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1301. 1217:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1302. 1218:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status;
  1303. 1219:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1304. 1220:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1305. 1221:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  1306. 1222:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Set the BOR Level.
  1307. 1223:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Level specifies the Option Bytes BOR Reset Level.
  1308. 1224:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  1309. 1225:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_BOR_LEVEL3: Supply voltage ranges from 2.7 to 3.6 V
  1310. 1226:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_BOR_LEVEL2: Supply voltage ranges from 2.4 to 2.7 V
  1311. 1227:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_BOR_LEVEL1: Supply voltage ranges from 2.1 to 2.4 V
  1312. 1228:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_BOR_OFF: Supply voltage ranges from 1.62 to 2.1 V
  1313. 1229:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status
  1314. 1230:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  1315. 1231:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_BOR_LevelConfig(uint8_t Level)
  1316. 1232:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1317. 65 .loc 1 1232 0
  1318. 66 .cfi_startproc
  1319. 67 @ args = 0, pretend = 0, frame = 0
  1320. 68 @ frame_needed = 0, uses_anonymous_args = 0
  1321. 69 @ link register save eliminated.
  1322. 70 .LVL2:
  1323. 1233:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */
  1324. 1234:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_BOR_LEVEL(Level));
  1325. 1235:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1326. 1236:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Set the BOR Level */
  1327. 1237:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint8_t *)OPTCR_BYTE0_ADDRESS &= (~FLASH_OPTCR_BOR_LEV);
  1328. 71 .loc 1 1237 0
  1329. 72 0000 044B ldr r3, .L5
  1330. 73 0002 1A78 ldrb r2, [r3] @ zero_extendqisi2
  1331. 74 0004 02F0F302 and r2, r2, #243
  1332. 75 0008 1A70 strb r2, [r3]
  1333. 1238:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint8_t *)OPTCR_BYTE0_ADDRESS |= Level;
  1334. 76 .loc 1 1238 0
  1335. ARM GAS /tmp/ccHpGP9I.s page 24
  1336. 77 000a 1A78 ldrb r2, [r3] @ zero_extendqisi2
  1337. 78 000c 1043 orrs r0, r0, r2
  1338. 79 .LVL3:
  1339. 80 000e 1870 strb r0, [r3]
  1340. 1239:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1341. 1240:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return HAL_OK;
  1342. 1241:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1343. 1242:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1344. 81 .loc 1 1242 0
  1345. 82 0010 0020 movs r0, #0
  1346. 83 0012 7047 bx lr
  1347. 84 .L6:
  1348. 85 .align 2
  1349. 86 .L5:
  1350. 87 0014 143C0240 .word 1073888276
  1351. 88 .cfi_endproc
  1352. 89 .LFE140:
  1353. 91 .section .text.FLASH_OB_GetUser,"ax",%progbits
  1354. 92 .align 1
  1355. 93 .syntax unified
  1356. 94 .thumb
  1357. 95 .thumb_func
  1358. 96 .fpu fpv4-sp-d16
  1359. 98 FLASH_OB_GetUser:
  1360. 99 .LFB141:
  1361. 1243:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1362. 1244:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  1363. 1245:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Return the FLASH User Option Byte value.
  1364. 1246:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval uint8_t FLASH User Option Bytes values: IWDG_SW(Bit0), RST_STOP(Bit1)
  1365. 1247:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * and RST_STDBY(Bit2).
  1366. 1248:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  1367. 1249:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static uint8_t FLASH_OB_GetUser(void)
  1368. 1250:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1369. 100 .loc 1 1250 0
  1370. 101 .cfi_startproc
  1371. 102 @ args = 0, pretend = 0, frame = 0
  1372. 103 @ frame_needed = 0, uses_anonymous_args = 0
  1373. 104 @ link register save eliminated.
  1374. 1251:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Return the User Option Byte */
  1375. 1252:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return ((uint8_t)(FLASH->OPTCR & 0xE0));
  1376. 105 .loc 1 1252 0
  1377. 106 0000 024B ldr r3, .L8
  1378. 107 0002 5869 ldr r0, [r3, #20]
  1379. 1253:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1380. 108 .loc 1 1253 0
  1381. 109 0004 00F0E000 and r0, r0, #224
  1382. 110 0008 7047 bx lr
  1383. 111 .L9:
  1384. 112 000a 00BF .align 2
  1385. 113 .L8:
  1386. 114 000c 003C0240 .word 1073888256
  1387. 115 .cfi_endproc
  1388. 116 .LFE141:
  1389. 118 .section .text.FLASH_OB_GetWRP,"ax",%progbits
  1390. 119 .align 1
  1391. 120 .syntax unified
  1392. 121 .thumb
  1393. ARM GAS /tmp/ccHpGP9I.s page 25
  1394. 122 .thumb_func
  1395. 123 .fpu fpv4-sp-d16
  1396. 125 FLASH_OB_GetWRP:
  1397. 126 .LFB142:
  1398. 1254:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1399. 1255:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  1400. 1256:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Return the FLASH Write Protection Option Bytes value.
  1401. 1257:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval uint16_t FLASH Write Protection Option Bytes value
  1402. 1258:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  1403. 1259:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static uint16_t FLASH_OB_GetWRP(void)
  1404. 1260:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1405. 127 .loc 1 1260 0
  1406. 128 .cfi_startproc
  1407. 129 @ args = 0, pretend = 0, frame = 0
  1408. 130 @ frame_needed = 0, uses_anonymous_args = 0
  1409. 131 @ link register save eliminated.
  1410. 1261:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Return the FLASH write protection Register value */
  1411. 1262:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return (*(__IO uint16_t *)(OPTCR_BYTE2_ADDRESS));
  1412. 132 .loc 1 1262 0
  1413. 133 0000 014B ldr r3, .L11
  1414. 134 0002 1888 ldrh r0, [r3]
  1415. 1263:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1416. 135 .loc 1 1263 0
  1417. 136 0004 80B2 uxth r0, r0
  1418. 137 0006 7047 bx lr
  1419. 138 .L12:
  1420. 139 .align 2
  1421. 140 .L11:
  1422. 141 0008 163C0240 .word 1073888278
  1423. 142 .cfi_endproc
  1424. 143 .LFE142:
  1425. 145 .section .text.FLASH_OB_GetRDP,"ax",%progbits
  1426. 146 .align 1
  1427. 147 .syntax unified
  1428. 148 .thumb
  1429. 149 .thumb_func
  1430. 150 .fpu fpv4-sp-d16
  1431. 152 FLASH_OB_GetRDP:
  1432. 153 .LFB143:
  1433. 1264:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1434. 1265:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  1435. 1266:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Returns the FLASH Read Protection level.
  1436. 1267:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval FLASH ReadOut Protection Status:
  1437. 1268:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values:
  1438. 1269:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_RDP_LEVEL_0: No protection
  1439. 1270:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_RDP_LEVEL_1: Read protection of the memory
  1440. 1271:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_RDP_LEVEL_2: Full chip protection
  1441. 1272:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  1442. 1273:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static uint8_t FLASH_OB_GetRDP(void)
  1443. 1274:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1444. 154 .loc 1 1274 0
  1445. 155 .cfi_startproc
  1446. 156 @ args = 0, pretend = 0, frame = 0
  1447. 157 @ frame_needed = 0, uses_anonymous_args = 0
  1448. 158 @ link register save eliminated.
  1449. 159 .LVL4:
  1450. 1275:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** uint8_t readstatus = OB_RDP_LEVEL_0;
  1451. ARM GAS /tmp/ccHpGP9I.s page 26
  1452. 1276:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1453. 1277:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if((*(__IO uint8_t*)(OPTCR_BYTE1_ADDRESS) == (uint8_t)OB_RDP_LEVEL_2))
  1454. 160 .loc 1 1277 0
  1455. 161 0000 074B ldr r3, .L18
  1456. 162 0002 1B78 ldrb r3, [r3] @ zero_extendqisi2
  1457. 163 0004 DBB2 uxtb r3, r3
  1458. 164 0006 CC2B cmp r3, #204
  1459. 165 0008 08D0 beq .L15
  1460. 1278:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1461. 1279:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** readstatus = OB_RDP_LEVEL_2;
  1462. 1280:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1463. 1281:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else if((*(__IO uint8_t*)(OPTCR_BYTE1_ADDRESS) == (uint8_t)OB_RDP_LEVEL_0))
  1464. 166 .loc 1 1281 0
  1465. 167 000a 054B ldr r3, .L18
  1466. 168 000c 1B78 ldrb r3, [r3] @ zero_extendqisi2
  1467. 169 000e DBB2 uxtb r3, r3
  1468. 170 0010 AA2B cmp r3, #170
  1469. 171 0012 01D0 beq .L17
  1470. 1282:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1471. 1283:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** readstatus = OB_RDP_LEVEL_0;
  1472. 1284:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1473. 1285:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else
  1474. 1286:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1475. 1287:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** readstatus = OB_RDP_LEVEL_1;
  1476. 172 .loc 1 1287 0
  1477. 173 0014 5520 movs r0, #85
  1478. 174 .LVL5:
  1479. 1288:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1480. 1289:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1481. 1290:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return readstatus;
  1482. 1291:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1483. 175 .loc 1 1291 0
  1484. 176 0016 7047 bx lr
  1485. 177 .LVL6:
  1486. 178 .L17:
  1487. 1283:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1488. 179 .loc 1 1283 0
  1489. 180 0018 AA20 movs r0, #170
  1490. 181 001a 7047 bx lr
  1491. 182 .L15:
  1492. 1279:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1493. 183 .loc 1 1279 0
  1494. 184 001c CC20 movs r0, #204
  1495. 185 001e 7047 bx lr
  1496. 186 .L19:
  1497. 187 .align 2
  1498. 188 .L18:
  1499. 189 0020 153C0240 .word 1073888277
  1500. 190 .cfi_endproc
  1501. 191 .LFE143:
  1502. 193 .section .text.FLASH_OB_GetBOR,"ax",%progbits
  1503. 194 .align 1
  1504. 195 .syntax unified
  1505. 196 .thumb
  1506. 197 .thumb_func
  1507. 198 .fpu fpv4-sp-d16
  1508. 200 FLASH_OB_GetBOR:
  1509. ARM GAS /tmp/ccHpGP9I.s page 27
  1510. 201 .LFB144:
  1511. 1292:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1512. 1293:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  1513. 1294:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Returns the FLASH BOR level.
  1514. 1295:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval uint8_t The FLASH BOR level:
  1515. 1296:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * - OB_BOR_LEVEL3: Supply voltage ranges from 2.7 to 3.6 V
  1516. 1297:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * - OB_BOR_LEVEL2: Supply voltage ranges from 2.4 to 2.7 V
  1517. 1298:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * - OB_BOR_LEVEL1: Supply voltage ranges from 2.1 to 2.4 V
  1518. 1299:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * - OB_BOR_OFF : Supply voltage ranges from 1.62 to 2.1 V
  1519. 1300:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  1520. 1301:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static uint8_t FLASH_OB_GetBOR(void)
  1521. 1302:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1522. 202 .loc 1 1302 0
  1523. 203 .cfi_startproc
  1524. 204 @ args = 0, pretend = 0, frame = 0
  1525. 205 @ frame_needed = 0, uses_anonymous_args = 0
  1526. 206 @ link register save eliminated.
  1527. 1303:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Return the FLASH BOR level */
  1528. 1304:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return (uint8_t)(*(__IO uint8_t *)(OPTCR_BYTE0_ADDRESS) & (uint8_t)0x0C);
  1529. 207 .loc 1 1304 0
  1530. 208 0000 024B ldr r3, .L21
  1531. 209 0002 1878 ldrb r0, [r3] @ zero_extendqisi2
  1532. 1305:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1533. 210 .loc 1 1305 0
  1534. 211 0004 00F00C00 and r0, r0, #12
  1535. 212 0008 7047 bx lr
  1536. 213 .L22:
  1537. 214 000a 00BF .align 2
  1538. 215 .L21:
  1539. 216 000c 143C0240 .word 1073888276
  1540. 217 .cfi_endproc
  1541. 218 .LFE144:
  1542. 220 .section .text.FLASH_OB_EnableWRP,"ax",%progbits
  1543. 221 .align 1
  1544. 222 .syntax unified
  1545. 223 .thumb
  1546. 224 .thumb_func
  1547. 225 .fpu fpv4-sp-d16
  1548. 227 FLASH_OB_EnableWRP:
  1549. 228 .LFB136:
  1550. 1033:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK;
  1551. 229 .loc 1 1033 0
  1552. 230 .cfi_startproc
  1553. 231 @ args = 0, pretend = 0, frame = 0
  1554. 232 @ frame_needed = 0, uses_anonymous_args = 0
  1555. 233 .LVL7:
  1556. 234 0000 10B5 push {r4, lr}
  1557. 235 .LCFI0:
  1558. 236 .cfi_def_cfa_offset 8
  1559. 237 .cfi_offset 4, -8
  1560. 238 .cfi_offset 14, -4
  1561. 239 0002 0446 mov r4, r0
  1562. 240 .LVL8:
  1563. 1041:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1564. 241 .loc 1 1041 0
  1565. 242 0004 4CF25030 movw r0, #50000
  1566. 243 .LVL9:
  1567. ARM GAS /tmp/ccHpGP9I.s page 28
  1568. 244 0008 FFF7FEFF bl FLASH_WaitForLastOperation
  1569. 245 .LVL10:
  1570. 1043:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1571. 246 .loc 1 1043 0
  1572. 247 000c 0346 mov r3, r0
  1573. 248 000e 28B9 cbnz r0, .L24
  1574. 1045:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1575. 249 .loc 1 1045 0
  1576. 250 0010 034A ldr r2, .L26
  1577. 251 0012 1088 ldrh r0, [r2]
  1578. 252 .LVL11:
  1579. 253 0014 80B2 uxth r0, r0
  1580. 254 0016 20EA0400 bic r0, r0, r4
  1581. 255 001a 1080 strh r0, [r2] @ movhi
  1582. 256 .L24:
  1583. 1049:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1584. 257 .loc 1 1049 0
  1585. 258 001c 1846 mov r0, r3
  1586. 259 001e 10BD pop {r4, pc}
  1587. 260 .LVL12:
  1588. 261 .L27:
  1589. 262 .align 2
  1590. 263 .L26:
  1591. 264 0020 163C0240 .word 1073888278
  1592. 265 .cfi_endproc
  1593. 266 .LFE136:
  1594. 268 .section .text.FLASH_OB_DisableWRP,"ax",%progbits
  1595. 269 .align 1
  1596. 270 .syntax unified
  1597. 271 .thumb
  1598. 272 .thumb_func
  1599. 273 .fpu fpv4-sp-d16
  1600. 275 FLASH_OB_DisableWRP:
  1601. 276 .LFB137:
  1602. 1069:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK;
  1603. 277 .loc 1 1069 0
  1604. 278 .cfi_startproc
  1605. 279 @ args = 0, pretend = 0, frame = 0
  1606. 280 @ frame_needed = 0, uses_anonymous_args = 0
  1607. 281 .LVL13:
  1608. 282 0000 10B5 push {r4, lr}
  1609. 283 .LCFI1:
  1610. 284 .cfi_def_cfa_offset 8
  1611. 285 .cfi_offset 4, -8
  1612. 286 .cfi_offset 14, -4
  1613. 287 0002 0446 mov r4, r0
  1614. 288 .LVL14:
  1615. 1077:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1616. 289 .loc 1 1077 0
  1617. 290 0004 4CF25030 movw r0, #50000
  1618. 291 .LVL15:
  1619. 292 0008 FFF7FEFF bl FLASH_WaitForLastOperation
  1620. 293 .LVL16:
  1621. 1079:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1622. 294 .loc 1 1079 0
  1623. 295 000c 0346 mov r3, r0
  1624. 296 000e 28B9 cbnz r0, .L29
  1625. ARM GAS /tmp/ccHpGP9I.s page 29
  1626. 1081:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1627. 297 .loc 1 1081 0
  1628. 298 0010 034A ldr r2, .L31
  1629. 299 0012 1088 ldrh r0, [r2]
  1630. 300 .LVL17:
  1631. 301 0014 80B2 uxth r0, r0
  1632. 302 0016 A4B2 uxth r4, r4
  1633. 303 .LVL18:
  1634. 304 0018 2043 orrs r0, r0, r4
  1635. 305 001a 1080 strh r0, [r2] @ movhi
  1636. 306 .L29:
  1637. 1085:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #endif /* STM32F40xxx || STM32F41xxx || STM32F401xx || STM32F410xx || STM32F411xE || STM32F446xx ||
  1638. 307 .loc 1 1085 0
  1639. 308 001c 1846 mov r0, r3
  1640. 309 001e 10BD pop {r4, pc}
  1641. 310 .L32:
  1642. 311 .align 2
  1643. 312 .L31:
  1644. 313 0020 163C0240 .word 1073888278
  1645. 314 .cfi_endproc
  1646. 315 .LFE137:
  1647. 317 .section .text.FLASH_OB_RDP_LevelConfig,"ax",%progbits
  1648. 318 .align 1
  1649. 319 .syntax unified
  1650. 320 .thumb
  1651. 321 .thumb_func
  1652. 322 .fpu fpv4-sp-d16
  1653. 324 FLASH_OB_RDP_LevelConfig:
  1654. 325 .LFB138:
  1655. 1163:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK;
  1656. 326 .loc 1 1163 0
  1657. 327 .cfi_startproc
  1658. 328 @ args = 0, pretend = 0, frame = 0
  1659. 329 @ frame_needed = 0, uses_anonymous_args = 0
  1660. 330 .LVL19:
  1661. 331 0000 10B5 push {r4, lr}
  1662. 332 .LCFI2:
  1663. 333 .cfi_def_cfa_offset 8
  1664. 334 .cfi_offset 4, -8
  1665. 335 .cfi_offset 14, -4
  1666. 336 0002 0446 mov r4, r0
  1667. 337 .LVL20:
  1668. 1170:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1669. 338 .loc 1 1170 0
  1670. 339 0004 4CF25030 movw r0, #50000
  1671. 340 .LVL21:
  1672. 341 0008 FFF7FEFF bl FLASH_WaitForLastOperation
  1673. 342 .LVL22:
  1674. 1172:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1675. 343 .loc 1 1172 0
  1676. 344 000c 0346 mov r3, r0
  1677. 345 000e 08B9 cbnz r0, .L34
  1678. 1174:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1679. 346 .loc 1 1174 0
  1680. 347 0010 014A ldr r2, .L36
  1681. 348 0012 1470 strb r4, [r2]
  1682. 349 .L34:
  1683. ARM GAS /tmp/ccHpGP9I.s page 30
  1684. 1178:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1685. 350 .loc 1 1178 0
  1686. 351 0014 1846 mov r0, r3
  1687. 352 .LVL23:
  1688. 353 0016 10BD pop {r4, pc}
  1689. 354 .L37:
  1690. 355 .align 2
  1691. 356 .L36:
  1692. 357 0018 153C0240 .word 1073888277
  1693. 358 .cfi_endproc
  1694. 359 .LFE138:
  1695. 361 .section .text.FLASH_OB_UserConfig,"ax",%progbits
  1696. 362 .align 1
  1697. 363 .syntax unified
  1698. 364 .thumb
  1699. 365 .thumb_func
  1700. 366 .fpu fpv4-sp-d16
  1701. 368 FLASH_OB_UserConfig:
  1702. 369 .LFB139:
  1703. 1197:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** uint8_t optiontmp = 0xFF;
  1704. 370 .loc 1 1197 0
  1705. 371 .cfi_startproc
  1706. 372 @ args = 0, pretend = 0, frame = 0
  1707. 373 @ frame_needed = 0, uses_anonymous_args = 0
  1708. 374 .LVL24:
  1709. 375 0000 70B5 push {r4, r5, r6, lr}
  1710. 376 .LCFI3:
  1711. 377 .cfi_def_cfa_offset 16
  1712. 378 .cfi_offset 4, -16
  1713. 379 .cfi_offset 5, -12
  1714. 380 .cfi_offset 6, -8
  1715. 381 .cfi_offset 14, -4
  1716. 382 0002 0446 mov r4, r0
  1717. 383 0004 0E46 mov r6, r1
  1718. 384 0006 1546 mov r5, r2
  1719. 385 .LVL25:
  1720. 1207:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1721. 386 .loc 1 1207 0
  1722. 387 0008 4CF25030 movw r0, #50000
  1723. 388 .LVL26:
  1724. 389 000c FFF7FEFF bl FLASH_WaitForLastOperation
  1725. 390 .LVL27:
  1726. 1209:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1727. 391 .loc 1 1209 0
  1728. 392 0010 0346 mov r3, r0
  1729. 393 0012 38B9 cbnz r0, .L39
  1730. 1212:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1731. 394 .loc 1 1212 0
  1732. 395 0014 044A ldr r2, .L41
  1733. 396 0016 1078 ldrb r0, [r2] @ zero_extendqisi2
  1734. 397 .LVL28:
  1735. 398 0018 00F01F00 and r0, r0, #31
  1736. 399 .LVL29:
  1737. 1215:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1738. 400 .loc 1 1215 0
  1739. 401 001c 3043 orrs r0, r0, r6
  1740. 402 .LVL30:
  1741. ARM GAS /tmp/ccHpGP9I.s page 31
  1742. 403 001e 2843 orrs r0, r0, r5
  1743. 404 0020 2043 orrs r0, r0, r4
  1744. 405 0022 1070 strb r0, [r2]
  1745. 406 .L39:
  1746. 1219:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1747. 407 .loc 1 1219 0
  1748. 408 0024 1846 mov r0, r3
  1749. 409 0026 70BD pop {r4, r5, r6, pc}
  1750. 410 .L42:
  1751. 411 .align 2
  1752. 412 .L41:
  1753. 413 0028 143C0240 .word 1073888276
  1754. 414 .cfi_endproc
  1755. 415 .LFE139:
  1756. 417 .section .text.HAL_FLASHEx_OBProgram,"ax",%progbits
  1757. 418 .align 1
  1758. 419 .global HAL_FLASHEx_OBProgram
  1759. 420 .syntax unified
  1760. 421 .thumb
  1761. 422 .thumb_func
  1762. 423 .fpu fpv4-sp-d16
  1763. 425 HAL_FLASHEx_OBProgram:
  1764. 426 .LFB132:
  1765. 287:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_ERROR;
  1766. 427 .loc 1 287 0
  1767. 428 .cfi_startproc
  1768. 429 @ args = 0, pretend = 0, frame = 0
  1769. 430 @ frame_needed = 0, uses_anonymous_args = 0
  1770. 431 .LVL31:
  1771. 291:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1772. 432 .loc 1 291 0
  1773. 433 0000 1F4B ldr r3, .L60
  1774. 434 0002 1B7E ldrb r3, [r3, #24] @ zero_extendqisi2
  1775. 435 0004 012B cmp r3, #1
  1776. 436 0006 38D0 beq .L50
  1777. 287:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_ERROR;
  1778. 437 .loc 1 287 0 discriminator 2
  1779. 438 0008 10B5 push {r4, lr}
  1780. 439 .LCFI4:
  1781. 440 .cfi_def_cfa_offset 8
  1782. 441 .cfi_offset 4, -8
  1783. 442 .cfi_offset 14, -4
  1784. 443 000a 0446 mov r4, r0
  1785. 291:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1786. 444 .loc 1 291 0 discriminator 2
  1787. 445 000c 0122 movs r2, #1
  1788. 446 000e 1C4B ldr r3, .L60
  1789. 447 0010 1A76 strb r2, [r3, #24]
  1790. 297:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1791. 448 .loc 1 297 0 discriminator 2
  1792. 449 0012 0368 ldr r3, [r0]
  1793. 450 0014 13F0010F tst r3, #1
  1794. 451 0018 0CD0 beq .L51
  1795. 300:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1796. 452 .loc 1 300 0
  1797. 453 001a 4368 ldr r3, [r0, #4]
  1798. 454 001c 9342 cmp r3, r2
  1799. ARM GAS /tmp/ccHpGP9I.s page 32
  1800. 455 001e 04D0 beq .L56
  1801. 308:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1802. 456 .loc 1 308 0
  1803. 457 0020 C168 ldr r1, [r0, #12]
  1804. 458 0022 8068 ldr r0, [r0, #8]
  1805. 459 .LVL32:
  1806. 460 0024 FFF7FEFF bl FLASH_OB_DisableWRP
  1807. 461 .LVL33:
  1808. 462 0028 05E0 b .L45
  1809. 463 .LVL34:
  1810. 464 .L56:
  1811. 303:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1812. 465 .loc 1 303 0
  1813. 466 002a C168 ldr r1, [r0, #12]
  1814. 467 002c 8068 ldr r0, [r0, #8]
  1815. 468 .LVL35:
  1816. 469 002e FFF7FEFF bl FLASH_OB_EnableWRP
  1817. 470 .LVL36:
  1818. 471 0032 00E0 b .L45
  1819. 472 .LVL37:
  1820. 473 .L51:
  1821. 288:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1822. 474 .loc 1 288 0
  1823. 475 0034 0120 movs r0, #1
  1824. 476 .LVL38:
  1825. 477 .L45:
  1826. 313:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1827. 478 .loc 1 313 0
  1828. 479 0036 2368 ldr r3, [r4]
  1829. 480 0038 13F0020F tst r3, #2
  1830. 481 003c 0BD1 bne .L57
  1831. 482 .L47:
  1832. 319:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1833. 483 .loc 1 319 0
  1834. 484 003e 2368 ldr r3, [r4]
  1835. 485 0040 13F0040F tst r3, #4
  1836. 486 0044 0BD1 bne .L58
  1837. 487 .L48:
  1838. 327:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1839. 488 .loc 1 327 0
  1840. 489 0046 2368 ldr r3, [r4]
  1841. 490 0048 13F0080F tst r3, #8
  1842. 491 004c 11D1 bne .L59
  1843. 492 .L49:
  1844. 333:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1845. 493 .loc 1 333 0
  1846. 494 004e 0022 movs r2, #0
  1847. 495 0050 0B4B ldr r3, .L60
  1848. 496 0052 1A76 strb r2, [r3, #24]
  1849. 335:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1850. 497 .loc 1 335 0
  1851. 498 0054 10BD pop {r4, pc}
  1852. 499 .LVL39:
  1853. 500 .L57:
  1854. 315:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1855. 501 .loc 1 315 0
  1856. 502 0056 207C ldrb r0, [r4, #16] @ zero_extendqisi2
  1857. ARM GAS /tmp/ccHpGP9I.s page 33
  1858. 503 .LVL40:
  1859. 504 0058 FFF7FEFF bl FLASH_OB_RDP_LevelConfig
  1860. 505 .LVL41:
  1861. 506 005c EFE7 b .L47
  1862. 507 .L58:
  1863. 321:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pOBInit->USERConfig&OB_STOP_NO_RST,
  1864. 508 .loc 1 321 0
  1865. 509 005e 207E ldrb r0, [r4, #24] @ zero_extendqisi2
  1866. 510 .LVL42:
  1867. 511 0060 00F08002 and r2, r0, #128
  1868. 512 0064 00F04001 and r1, r0, #64
  1869. 513 0068 00F02000 and r0, r0, #32
  1870. 514 006c FFF7FEFF bl FLASH_OB_UserConfig
  1871. 515 .LVL43:
  1872. 516 0070 E9E7 b .L48
  1873. 517 .L59:
  1874. 329:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1875. 518 .loc 1 329 0
  1876. 519 0072 207D ldrb r0, [r4, #20] @ zero_extendqisi2
  1877. 520 .LVL44:
  1878. 521 0074 FFF7FEFF bl FLASH_OB_BOR_LevelConfig
  1879. 522 .LVL45:
  1880. 523 0078 E9E7 b .L49
  1881. 524 .LVL46:
  1882. 525 .L50:
  1883. 526 .LCFI5:
  1884. 527 .cfi_def_cfa_offset 0
  1885. 528 .cfi_restore 4
  1886. 529 .cfi_restore 14
  1887. 291:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1888. 530 .loc 1 291 0
  1889. 531 007a 0220 movs r0, #2
  1890. 532 .LVL47:
  1891. 533 007c 7047 bx lr
  1892. 534 .L61:
  1893. 535 007e 00BF .align 2
  1894. 536 .L60:
  1895. 537 0080 00000000 .word pFlash
  1896. 538 .cfi_endproc
  1897. 539 .LFE132:
  1898. 541 .section .text.HAL_FLASHEx_OBGetConfig,"ax",%progbits
  1899. 542 .align 1
  1900. 543 .global HAL_FLASHEx_OBGetConfig
  1901. 544 .syntax unified
  1902. 545 .thumb
  1903. 546 .thumb_func
  1904. 547 .fpu fpv4-sp-d16
  1905. 549 HAL_FLASHEx_OBGetConfig:
  1906. 550 .LFB133:
  1907. 346:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pOBInit->OptionType = OPTIONBYTE_WRP | OPTIONBYTE_RDP | OPTIONBYTE_USER | OPTIONBYTE_BOR;
  1908. 551 .loc 1 346 0
  1909. 552 .cfi_startproc
  1910. 553 @ args = 0, pretend = 0, frame = 0
  1911. 554 @ frame_needed = 0, uses_anonymous_args = 0
  1912. 555 .LVL48:
  1913. 556 0000 10B5 push {r4, lr}
  1914. 557 .LCFI6:
  1915. ARM GAS /tmp/ccHpGP9I.s page 34
  1916. 558 .cfi_def_cfa_offset 8
  1917. 559 .cfi_offset 4, -8
  1918. 560 .cfi_offset 14, -4
  1919. 561 0002 0446 mov r4, r0
  1920. 347:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1921. 562 .loc 1 347 0
  1922. 563 0004 0F23 movs r3, #15
  1923. 564 0006 0360 str r3, [r0]
  1924. 350:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1925. 565 .loc 1 350 0
  1926. 566 0008 FFF7FEFF bl FLASH_OB_GetWRP
  1927. 567 .LVL49:
  1928. 568 000c A060 str r0, [r4, #8]
  1929. 353:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1930. 569 .loc 1 353 0
  1931. 570 000e FFF7FEFF bl FLASH_OB_GetRDP
  1932. 571 .LVL50:
  1933. 572 0012 2061 str r0, [r4, #16]
  1934. 356:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  1935. 573 .loc 1 356 0
  1936. 574 0014 FFF7FEFF bl FLASH_OB_GetUser
  1937. 575 .LVL51:
  1938. 576 0018 2076 strb r0, [r4, #24]
  1939. 359:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1940. 577 .loc 1 359 0
  1941. 578 001a FFF7FEFF bl FLASH_OB_GetBOR
  1942. 579 .LVL52:
  1943. 580 001e 6061 str r0, [r4, #20]
  1944. 581 0020 10BD pop {r4, pc}
  1945. 582 .cfi_endproc
  1946. 583 .LFE133:
  1947. 585 .section .text.FLASH_Erase_Sector,"ax",%progbits
  1948. 586 .align 1
  1949. 587 .global FLASH_Erase_Sector
  1950. 588 .syntax unified
  1951. 589 .thumb
  1952. 590 .thumb_func
  1953. 591 .fpu fpv4-sp-d16
  1954. 593 FLASH_Erase_Sector:
  1955. 594 .LFB135:
  1956. 983:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** uint32_t tmp_psize = 0U;
  1957. 595 .loc 1 983 0
  1958. 596 .cfi_startproc
  1959. 597 @ args = 0, pretend = 0, frame = 0
  1960. 598 @ frame_needed = 0, uses_anonymous_args = 0
  1961. 599 @ link register save eliminated.
  1962. 600 .LVL53:
  1963. 990:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1964. 601 .loc 1 990 0
  1965. 602 0000 F9B1 cbz r1, .L66
  1966. 994:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1967. 603 .loc 1 994 0
  1968. 604 0002 0129 cmp r1, #1
  1969. 605 0004 1FD0 beq .L67
  1970. 998:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  1971. 606 .loc 1 998 0
  1972. 607 0006 0229 cmp r1, #2
  1973. ARM GAS /tmp/ccHpGP9I.s page 35
  1974. 608 0008 18D0 beq .L69
  1975. 1004:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  1976. 609 .loc 1 1004 0
  1977. 610 000a 4FF44071 mov r1, #768
  1978. 611 .LVL54:
  1979. 612 .L65:
  1980. 1008:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= tmp_psize;
  1981. 613 .loc 1 1008 0
  1982. 614 000e 0F4B ldr r3, .L70
  1983. 615 0010 1A69 ldr r2, [r3, #16]
  1984. 616 0012 22F44072 bic r2, r2, #768
  1985. 617 0016 1A61 str r2, [r3, #16]
  1986. 1009:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** CLEAR_BIT(FLASH->CR, FLASH_CR_SNB);
  1987. 618 .loc 1 1009 0
  1988. 619 0018 1A69 ldr r2, [r3, #16]
  1989. 620 001a 0A43 orrs r2, r2, r1
  1990. 621 001c 1A61 str r2, [r3, #16]
  1991. 1010:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= FLASH_CR_SER | (Sector << FLASH_CR_SNB_Pos);
  1992. 622 .loc 1 1010 0
  1993. 623 001e 1A69 ldr r2, [r3, #16]
  1994. 624 0020 22F0F802 bic r2, r2, #248
  1995. 625 0024 1A61 str r2, [r3, #16]
  1996. 1011:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= FLASH_CR_STRT;
  1997. 626 .loc 1 1011 0
  1998. 627 0026 1A69 ldr r2, [r3, #16]
  1999. 628 0028 42EAC000 orr r0, r2, r0, lsl #3
  2000. 629 .LVL55:
  2001. 630 002c 40F00200 orr r0, r0, #2
  2002. 631 0030 1861 str r0, [r3, #16]
  2003. 1012:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  2004. 632 .loc 1 1012 0
  2005. 633 0032 1A69 ldr r2, [r3, #16]
  2006. 634 0034 42F48032 orr r2, r2, #65536
  2007. 635 0038 1A61 str r2, [r3, #16]
  2008. 636 003a 7047 bx lr
  2009. 637 .LVL56:
  2010. 638 .L69:
  2011. 1000:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  2012. 639 .loc 1 1000 0
  2013. 640 003c 4FF40071 mov r1, #512
  2014. 641 .LVL57:
  2015. 642 0040 E5E7 b .L65
  2016. 643 .LVL58:
  2017. 644 .L66:
  2018. 992:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  2019. 645 .loc 1 992 0
  2020. 646 0042 0021 movs r1, #0
  2021. 647 .LVL59:
  2022. 648 0044 E3E7 b .L65
  2023. 649 .LVL60:
  2024. 650 .L67:
  2025. 996:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  2026. 651 .loc 1 996 0
  2027. 652 0046 4FF48071 mov r1, #256
  2028. 653 .LVL61:
  2029. 654 004a E0E7 b .L65
  2030. 655 .L71:
  2031. ARM GAS /tmp/ccHpGP9I.s page 36
  2032. 656 .align 2
  2033. 657 .L70:
  2034. 658 004c 003C0240 .word 1073888256
  2035. 659 .cfi_endproc
  2036. 660 .LFE135:
  2037. 662 .section .text.HAL_FLASHEx_Erase_IT,"ax",%progbits
  2038. 663 .align 1
  2039. 664 .global HAL_FLASHEx_Erase_IT
  2040. 665 .syntax unified
  2041. 666 .thumb
  2042. 667 .thumb_func
  2043. 668 .fpu fpv4-sp-d16
  2044. 670 HAL_FLASHEx_Erase_IT:
  2045. 671 .LFB131:
  2046. 234:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK;
  2047. 672 .loc 1 234 0
  2048. 673 .cfi_startproc
  2049. 674 @ args = 0, pretend = 0, frame = 0
  2050. 675 @ frame_needed = 0, uses_anonymous_args = 0
  2051. 676 .LVL62:
  2052. 677 0000 08B5 push {r3, lr}
  2053. 678 .LCFI7:
  2054. 679 .cfi_def_cfa_offset 8
  2055. 680 .cfi_offset 3, -8
  2056. 681 .cfi_offset 14, -4
  2057. 682 .LVL63:
  2058. 238:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2059. 683 .loc 1 238 0
  2060. 684 0002 184B ldr r3, .L78
  2061. 685 0004 1B7E ldrb r3, [r3, #24] @ zero_extendqisi2
  2062. 686 0006 012B cmp r3, #1
  2063. 687 0008 29D0 beq .L75
  2064. 238:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2065. 688 .loc 1 238 0 is_stmt 0 discriminator 2
  2066. 689 000a 0122 movs r2, #1
  2067. 690 000c 154B ldr r3, .L78
  2068. 691 000e 1A76 strb r2, [r3, #24]
  2069. 244:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2070. 692 .loc 1 244 0 is_stmt 1 discriminator 2
  2071. 693 0010 154B ldr r3, .L78+4
  2072. 694 0012 1A69 ldr r2, [r3, #16]
  2073. 695 0014 42F08072 orr r2, r2, #16777216
  2074. 696 0018 1A61 str r2, [r3, #16]
  2075. 247:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2076. 697 .loc 1 247 0 discriminator 2
  2077. 698 001a 1A69 ldr r2, [r3, #16]
  2078. 699 001c 42F00072 orr r2, r2, #33554432
  2079. 700 0020 1A61 str r2, [r3, #16]
  2080. 250:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH_FLAG_PGAERR | FLASH_FLAG_PGPERR| FLASH_FLAG_PGSERR);
  2081. 701 .loc 1 250 0 discriminator 2
  2082. 702 0022 F322 movs r2, #243
  2083. 703 0024 DA60 str r2, [r3, #12]
  2084. 253:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  2085. 704 .loc 1 253 0 discriminator 2
  2086. 705 0026 0368 ldr r3, [r0]
  2087. 706 0028 012B cmp r3, #1
  2088. 707 002a 0DD0 beq .L77
  2089. ARM GAS /tmp/ccHpGP9I.s page 37
  2090. 267:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pFlash.NbSectorsToErase = pEraseInit->NbSectors;
  2091. 708 .loc 1 267 0
  2092. 709 002c 0D4B ldr r3, .L78
  2093. 710 002e 0122 movs r2, #1
  2094. 711 0030 1A70 strb r2, [r3]
  2095. 268:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pFlash.Sector = pEraseInit->Sector;
  2096. 712 .loc 1 268 0
  2097. 713 0032 C268 ldr r2, [r0, #12]
  2098. 714 0034 5A60 str r2, [r3, #4]
  2099. 269:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pFlash.VoltageForErase = (uint8_t)pEraseInit->VoltageRange;
  2100. 715 .loc 1 269 0
  2101. 716 0036 8268 ldr r2, [r0, #8]
  2102. 717 0038 DA60 str r2, [r3, #12]
  2103. 270:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2104. 718 .loc 1 270 0
  2105. 719 003a 017C ldrb r1, [r0, #16] @ zero_extendqisi2
  2106. 720 003c 1972 strb r1, [r3, #8]
  2107. 273:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  2108. 721 .loc 1 273 0
  2109. 722 003e 8068 ldr r0, [r0, #8]
  2110. 723 .LVL64:
  2111. 724 0040 FFF7FEFF bl FLASH_Erase_Sector
  2112. 725 .LVL65:
  2113. 276:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  2114. 726 .loc 1 276 0
  2115. 727 0044 0020 movs r0, #0
  2116. 728 0046 08BD pop {r3, pc}
  2117. 729 .LVL66:
  2118. 730 .L77:
  2119. 256:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pFlash.Bank = pEraseInit->Banks;
  2120. 731 .loc 1 256 0
  2121. 732 0048 064B ldr r3, .L78
  2122. 733 004a 0222 movs r2, #2
  2123. 734 004c 1A70 strb r2, [r3]
  2124. 257:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH_MassErase((uint8_t) pEraseInit->VoltageRange, pEraseInit->Banks);
  2125. 735 .loc 1 257 0
  2126. 736 004e 4268 ldr r2, [r0, #4]
  2127. 737 0050 1A61 str r2, [r3, #16]
  2128. 258:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  2129. 738 .loc 1 258 0
  2130. 739 0052 4168 ldr r1, [r0, #4]
  2131. 740 0054 007C ldrb r0, [r0, #16] @ zero_extendqisi2
  2132. 741 .LVL67:
  2133. 742 0056 FFF7FEFF bl FLASH_MassErase
  2134. 743 .LVL68:
  2135. 276:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  2136. 744 .loc 1 276 0
  2137. 745 005a 0020 movs r0, #0
  2138. 746 005c 08BD pop {r3, pc}
  2139. 747 .LVL69:
  2140. 748 .L75:
  2141. 238:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2142. 749 .loc 1 238 0
  2143. 750 005e 0220 movs r0, #2
  2144. 751 .LVL70:
  2145. 277:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2146. 752 .loc 1 277 0
  2147. ARM GAS /tmp/ccHpGP9I.s page 38
  2148. 753 0060 08BD pop {r3, pc}
  2149. 754 .L79:
  2150. 755 0062 00BF .align 2
  2151. 756 .L78:
  2152. 757 0064 00000000 .word pFlash
  2153. 758 0068 003C0240 .word 1073888256
  2154. 759 .cfi_endproc
  2155. 760 .LFE131:
  2156. 762 .section .text.FLASH_FlushCaches,"ax",%progbits
  2157. 763 .align 1
  2158. 764 .global FLASH_FlushCaches
  2159. 765 .syntax unified
  2160. 766 .thumb
  2161. 767 .thumb_func
  2162. 768 .fpu fpv4-sp-d16
  2163. 770 FLASH_FlushCaches:
  2164. 771 .LFB145:
  2165. 1306:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2166. 1307:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /**
  2167. 1308:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Flush the instruction and data caches
  2168. 1309:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval None
  2169. 1310:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */
  2170. 1311:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** void FLASH_FlushCaches(void)
  2171. 1312:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  2172. 772 .loc 1 1312 0
  2173. 773 .cfi_startproc
  2174. 774 @ args = 0, pretend = 0, frame = 0
  2175. 775 @ frame_needed = 0, uses_anonymous_args = 0
  2176. 776 @ link register save eliminated.
  2177. 1313:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Flush instruction cache */
  2178. 1314:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(READ_BIT(FLASH->ACR, FLASH_ACR_ICEN)!= RESET)
  2179. 777 .loc 1 1314 0
  2180. 778 0000 164B ldr r3, .L83
  2181. 779 0002 1B68 ldr r3, [r3]
  2182. 780 0004 13F4007F tst r3, #512
  2183. 781 0008 10D0 beq .L81
  2184. 1315:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  2185. 1316:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Disable instruction cache */
  2186. 1317:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_FLASH_INSTRUCTION_CACHE_DISABLE();
  2187. 782 .loc 1 1317 0
  2188. 783 000a 144B ldr r3, .L83
  2189. 784 000c 1A68 ldr r2, [r3]
  2190. 785 000e 22F40072 bic r2, r2, #512
  2191. 786 0012 1A60 str r2, [r3]
  2192. 1318:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Reset instruction cache */
  2193. 1319:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_FLASH_INSTRUCTION_CACHE_RESET();
  2194. 787 .loc 1 1319 0
  2195. 788 0014 1A68 ldr r2, [r3]
  2196. 789 0016 42F40062 orr r2, r2, #2048
  2197. 790 001a 1A60 str r2, [r3]
  2198. 791 001c 1A68 ldr r2, [r3]
  2199. 792 001e 22F40062 bic r2, r2, #2048
  2200. 793 0022 1A60 str r2, [r3]
  2201. 1320:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Enable instruction cache */
  2202. 1321:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_FLASH_INSTRUCTION_CACHE_ENABLE();
  2203. 794 .loc 1 1321 0
  2204. 795 0024 1A68 ldr r2, [r3]
  2205. ARM GAS /tmp/ccHpGP9I.s page 39
  2206. 796 0026 42F40072 orr r2, r2, #512
  2207. 797 002a 1A60 str r2, [r3]
  2208. 798 .L81:
  2209. 1322:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  2210. 1323:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2211. 1324:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Flush data cache */
  2212. 1325:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(READ_BIT(FLASH->ACR, FLASH_ACR_DCEN) != RESET)
  2213. 799 .loc 1 1325 0
  2214. 800 002c 0B4B ldr r3, .L83
  2215. 801 002e 1B68 ldr r3, [r3]
  2216. 802 0030 13F4806F tst r3, #1024
  2217. 803 0034 10D0 beq .L80
  2218. 1326:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  2219. 1327:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Disable data cache */
  2220. 1328:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_FLASH_DATA_CACHE_DISABLE();
  2221. 804 .loc 1 1328 0
  2222. 805 0036 094B ldr r3, .L83
  2223. 806 0038 1A68 ldr r2, [r3]
  2224. 807 003a 22F48062 bic r2, r2, #1024
  2225. 808 003e 1A60 str r2, [r3]
  2226. 1329:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Reset data cache */
  2227. 1330:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_FLASH_DATA_CACHE_RESET();
  2228. 809 .loc 1 1330 0
  2229. 810 0040 1A68 ldr r2, [r3]
  2230. 811 0042 42F48052 orr r2, r2, #4096
  2231. 812 0046 1A60 str r2, [r3]
  2232. 813 0048 1A68 ldr r2, [r3]
  2233. 814 004a 22F48052 bic r2, r2, #4096
  2234. 815 004e 1A60 str r2, [r3]
  2235. 1331:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Enable data cache */
  2236. 1332:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_FLASH_DATA_CACHE_ENABLE();
  2237. 816 .loc 1 1332 0
  2238. 817 0050 1A68 ldr r2, [r3]
  2239. 818 0052 42F48062 orr r2, r2, #1024
  2240. 819 0056 1A60 str r2, [r3]
  2241. 820 .L80:
  2242. 821 0058 7047 bx lr
  2243. 822 .L84:
  2244. 823 005a 00BF .align 2
  2245. 824 .L83:
  2246. 825 005c 003C0240 .word 1073888256
  2247. 826 .cfi_endproc
  2248. 827 .LFE145:
  2249. 829 .section .text.HAL_FLASHEx_Erase,"ax",%progbits
  2250. 830 .align 1
  2251. 831 .global HAL_FLASHEx_Erase
  2252. 832 .syntax unified
  2253. 833 .thumb
  2254. 834 .thumb_func
  2255. 835 .fpu fpv4-sp-d16
  2256. 837 HAL_FLASHEx_Erase:
  2257. 838 .LFB130:
  2258. 163:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_ERROR;
  2259. 839 .loc 1 163 0
  2260. 840 .cfi_startproc
  2261. 841 @ args = 0, pretend = 0, frame = 0
  2262. 842 @ frame_needed = 0, uses_anonymous_args = 0
  2263. ARM GAS /tmp/ccHpGP9I.s page 40
  2264. 843 .LVL71:
  2265. 844 0000 F8B5 push {r3, r4, r5, r6, r7, lr}
  2266. 845 .LCFI8:
  2267. 846 .cfi_def_cfa_offset 24
  2268. 847 .cfi_offset 3, -24
  2269. 848 .cfi_offset 4, -20
  2270. 849 .cfi_offset 5, -16
  2271. 850 .cfi_offset 6, -12
  2272. 851 .cfi_offset 7, -8
  2273. 852 .cfi_offset 14, -4
  2274. 853 .LVL72:
  2275. 168:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2276. 854 .loc 1 168 0
  2277. 855 0002 224B ldr r3, .L98
  2278. 856 0004 1B7E ldrb r3, [r3, #24] @ zero_extendqisi2
  2279. 857 0006 012B cmp r3, #1
  2280. 858 0008 02D1 bne .L95
  2281. 859 000a 0227 movs r7, #2
  2282. 860 .LVL73:
  2283. 861 .L86:
  2284. 224:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2285. 862 .loc 1 224 0
  2286. 863 000c 3846 mov r0, r7
  2287. 864 000e F8BD pop {r3, r4, r5, r6, r7, pc}
  2288. 865 .LVL74:
  2289. 866 .L95:
  2290. 867 0010 0E46 mov r6, r1
  2291. 868 0012 0446 mov r4, r0
  2292. 168:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2293. 869 .loc 1 168 0 discriminator 2
  2294. 870 0014 0122 movs r2, #1
  2295. 871 0016 1D4B ldr r3, .L98
  2296. 872 0018 1A76 strb r2, [r3, #24]
  2297. 174:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2298. 873 .loc 1 174 0 discriminator 2
  2299. 874 001a 4CF25030 movw r0, #50000
  2300. 875 .LVL75:
  2301. 876 001e FFF7FEFF bl FLASH_WaitForLastOperation
  2302. 877 .LVL76:
  2303. 176:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  2304. 878 .loc 1 176 0 discriminator 2
  2305. 879 0022 0746 mov r7, r0
  2306. 880 0024 70BB cbnz r0, .L87
  2307. 179:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2308. 881 .loc 1 179 0
  2309. 882 0026 4FF0FF33 mov r3, #-1
  2310. 883 002a 3360 str r3, [r6]
  2311. 181:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  2312. 884 .loc 1 181 0
  2313. 885 002c 2368 ldr r3, [r4]
  2314. 886 002e 012B cmp r3, #1
  2315. 887 0030 16D0 beq .L96
  2316. 198:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  2317. 888 .loc 1 198 0
  2318. 889 0032 A568 ldr r5, [r4, #8]
  2319. 890 .LVL77:
  2320. 891 .L90:
  2321. ARM GAS /tmp/ccHpGP9I.s page 41
  2322. 198:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  2323. 892 .loc 1 198 0 is_stmt 0 discriminator 1
  2324. 893 0034 E368 ldr r3, [r4, #12]
  2325. 894 0036 A268 ldr r2, [r4, #8]
  2326. 895 0038 1344 add r3, r3, r2
  2327. 896 003a 9D42 cmp r5, r3
  2328. 897 003c 20D2 bcs .L89
  2329. 200:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2330. 898 .loc 1 200 0 is_stmt 1
  2331. 899 003e 217C ldrb r1, [r4, #16] @ zero_extendqisi2
  2332. 900 0040 2846 mov r0, r5
  2333. 901 0042 FFF7FEFF bl FLASH_Erase_Sector
  2334. 902 .LVL78:
  2335. 203:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2336. 903 .loc 1 203 0
  2337. 904 0046 4CF25030 movw r0, #50000
  2338. 905 004a FFF7FEFF bl FLASH_WaitForLastOperation
  2339. 906 .LVL79:
  2340. 206:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2341. 907 .loc 1 206 0
  2342. 908 004e 104A ldr r2, .L98+4
  2343. 909 0050 1369 ldr r3, [r2, #16]
  2344. 910 0052 23F0FA03 bic r3, r3, #250
  2345. 911 0056 1361 str r3, [r2, #16]
  2346. 208:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  2347. 912 .loc 1 208 0
  2348. 913 0058 0746 mov r7, r0
  2349. 914 005a 80B9 cbnz r0, .L97
  2350. 198:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** {
  2351. 915 .loc 1 198 0 discriminator 2
  2352. 916 005c 0135 adds r5, r5, #1
  2353. 917 .LVL80:
  2354. 918 005e E9E7 b .L90
  2355. 919 .LVL81:
  2356. 920 .L96:
  2357. 184:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2358. 921 .loc 1 184 0
  2359. 922 0060 6168 ldr r1, [r4, #4]
  2360. 923 0062 207C ldrb r0, [r4, #16] @ zero_extendqisi2
  2361. 924 .LVL82:
  2362. 925 0064 FFF7FEFF bl FLASH_MassErase
  2363. 926 .LVL83:
  2364. 187:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2365. 927 .loc 1 187 0
  2366. 928 0068 4CF25030 movw r0, #50000
  2367. 929 006c FFF7FEFF bl FLASH_WaitForLastOperation
  2368. 930 .LVL84:
  2369. 931 0070 0746 mov r7, r0
  2370. 932 .LVL85:
  2371. 190:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  2372. 933 .loc 1 190 0
  2373. 934 0072 074A ldr r2, .L98+4
  2374. 935 0074 1369 ldr r3, [r2, #16]
  2375. 936 0076 23F00403 bic r3, r3, #4
  2376. 937 007a 1361 str r3, [r2, #16]
  2377. 938 007c 00E0 b .L89
  2378. 939 .LVL86:
  2379. ARM GAS /tmp/ccHpGP9I.s page 42
  2380. 940 .L97:
  2381. 211:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** break;
  2382. 941 .loc 1 211 0
  2383. 942 007e 3560 str r5, [r6]
  2384. 943 .LVL87:
  2385. 944 .L89:
  2386. 217:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  2387. 945 .loc 1 217 0
  2388. 946 0080 FFF7FEFF bl FLASH_FlushCaches
  2389. 947 .LVL88:
  2390. 948 .L87:
  2391. 221:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c ****
  2392. 949 .loc 1 221 0
  2393. 950 0084 0022 movs r2, #0
  2394. 951 0086 014B ldr r3, .L98
  2395. 952 0088 1A76 strb r2, [r3, #24]
  2396. 223:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** }
  2397. 953 .loc 1 223 0
  2398. 954 008a BFE7 b .L86
  2399. 955 .L99:
  2400. 956 .align 2
  2401. 957 .L98:
  2402. 958 008c 00000000 .word pFlash
  2403. 959 0090 003C0240 .word 1073888256
  2404. 960 .cfi_endproc
  2405. 961 .LFE130:
  2406. 963 .text
  2407. 964 .Letext0:
  2408. 965 .file 2 "/usr/include/newlib/machine/_default_types.h"
  2409. 966 .file 3 "/usr/include/newlib/sys/_stdint.h"
  2410. 967 .file 4 "Drivers/CMSIS/Include/core_cm4.h"
  2411. 968 .file 5 "Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h"
  2412. 969 .file 6 "Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f407xx.h"
  2413. 970 .file 7 "Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h"
  2414. 971 .file 8 "Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h"
  2415. 972 .file 9 "Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash.h"
  2416. 973 .file 10 "Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h"
  2417. ARM GAS /tmp/ccHpGP9I.s page 43
  2418. DEFINED SYMBOLS
  2419. *ABS*:0000000000000000 stm32f4xx_hal_flash_ex.c
  2420. /tmp/ccHpGP9I.s:18 .text.FLASH_MassErase:0000000000000000 $t
  2421. /tmp/ccHpGP9I.s:24 .text.FLASH_MassErase:0000000000000000 FLASH_MassErase
  2422. /tmp/ccHpGP9I.s:52 .text.FLASH_MassErase:0000000000000020 $d
  2423. /tmp/ccHpGP9I.s:57 .text.FLASH_OB_BOR_LevelConfig:0000000000000000 $t
  2424. /tmp/ccHpGP9I.s:63 .text.FLASH_OB_BOR_LevelConfig:0000000000000000 FLASH_OB_BOR_LevelConfig
  2425. /tmp/ccHpGP9I.s:87 .text.FLASH_OB_BOR_LevelConfig:0000000000000014 $d
  2426. /tmp/ccHpGP9I.s:92 .text.FLASH_OB_GetUser:0000000000000000 $t
  2427. /tmp/ccHpGP9I.s:98 .text.FLASH_OB_GetUser:0000000000000000 FLASH_OB_GetUser
  2428. /tmp/ccHpGP9I.s:114 .text.FLASH_OB_GetUser:000000000000000c $d
  2429. /tmp/ccHpGP9I.s:119 .text.FLASH_OB_GetWRP:0000000000000000 $t
  2430. /tmp/ccHpGP9I.s:125 .text.FLASH_OB_GetWRP:0000000000000000 FLASH_OB_GetWRP
  2431. /tmp/ccHpGP9I.s:141 .text.FLASH_OB_GetWRP:0000000000000008 $d
  2432. /tmp/ccHpGP9I.s:146 .text.FLASH_OB_GetRDP:0000000000000000 $t
  2433. /tmp/ccHpGP9I.s:152 .text.FLASH_OB_GetRDP:0000000000000000 FLASH_OB_GetRDP
  2434. /tmp/ccHpGP9I.s:189 .text.FLASH_OB_GetRDP:0000000000000020 $d
  2435. /tmp/ccHpGP9I.s:194 .text.FLASH_OB_GetBOR:0000000000000000 $t
  2436. /tmp/ccHpGP9I.s:200 .text.FLASH_OB_GetBOR:0000000000000000 FLASH_OB_GetBOR
  2437. /tmp/ccHpGP9I.s:216 .text.FLASH_OB_GetBOR:000000000000000c $d
  2438. /tmp/ccHpGP9I.s:221 .text.FLASH_OB_EnableWRP:0000000000000000 $t
  2439. /tmp/ccHpGP9I.s:227 .text.FLASH_OB_EnableWRP:0000000000000000 FLASH_OB_EnableWRP
  2440. /tmp/ccHpGP9I.s:264 .text.FLASH_OB_EnableWRP:0000000000000020 $d
  2441. /tmp/ccHpGP9I.s:269 .text.FLASH_OB_DisableWRP:0000000000000000 $t
  2442. /tmp/ccHpGP9I.s:275 .text.FLASH_OB_DisableWRP:0000000000000000 FLASH_OB_DisableWRP
  2443. /tmp/ccHpGP9I.s:313 .text.FLASH_OB_DisableWRP:0000000000000020 $d
  2444. /tmp/ccHpGP9I.s:318 .text.FLASH_OB_RDP_LevelConfig:0000000000000000 $t
  2445. /tmp/ccHpGP9I.s:324 .text.FLASH_OB_RDP_LevelConfig:0000000000000000 FLASH_OB_RDP_LevelConfig
  2446. /tmp/ccHpGP9I.s:357 .text.FLASH_OB_RDP_LevelConfig:0000000000000018 $d
  2447. /tmp/ccHpGP9I.s:362 .text.FLASH_OB_UserConfig:0000000000000000 $t
  2448. /tmp/ccHpGP9I.s:368 .text.FLASH_OB_UserConfig:0000000000000000 FLASH_OB_UserConfig
  2449. /tmp/ccHpGP9I.s:413 .text.FLASH_OB_UserConfig:0000000000000028 $d
  2450. /tmp/ccHpGP9I.s:418 .text.HAL_FLASHEx_OBProgram:0000000000000000 $t
  2451. /tmp/ccHpGP9I.s:425 .text.HAL_FLASHEx_OBProgram:0000000000000000 HAL_FLASHEx_OBProgram
  2452. /tmp/ccHpGP9I.s:537 .text.HAL_FLASHEx_OBProgram:0000000000000080 $d
  2453. /tmp/ccHpGP9I.s:542 .text.HAL_FLASHEx_OBGetConfig:0000000000000000 $t
  2454. /tmp/ccHpGP9I.s:549 .text.HAL_FLASHEx_OBGetConfig:0000000000000000 HAL_FLASHEx_OBGetConfig
  2455. /tmp/ccHpGP9I.s:586 .text.FLASH_Erase_Sector:0000000000000000 $t
  2456. /tmp/ccHpGP9I.s:593 .text.FLASH_Erase_Sector:0000000000000000 FLASH_Erase_Sector
  2457. /tmp/ccHpGP9I.s:658 .text.FLASH_Erase_Sector:000000000000004c $d
  2458. /tmp/ccHpGP9I.s:663 .text.HAL_FLASHEx_Erase_IT:0000000000000000 $t
  2459. /tmp/ccHpGP9I.s:670 .text.HAL_FLASHEx_Erase_IT:0000000000000000 HAL_FLASHEx_Erase_IT
  2460. /tmp/ccHpGP9I.s:757 .text.HAL_FLASHEx_Erase_IT:0000000000000064 $d
  2461. /tmp/ccHpGP9I.s:763 .text.FLASH_FlushCaches:0000000000000000 $t
  2462. /tmp/ccHpGP9I.s:770 .text.FLASH_FlushCaches:0000000000000000 FLASH_FlushCaches
  2463. /tmp/ccHpGP9I.s:825 .text.FLASH_FlushCaches:000000000000005c $d
  2464. /tmp/ccHpGP9I.s:830 .text.HAL_FLASHEx_Erase:0000000000000000 $t
  2465. /tmp/ccHpGP9I.s:837 .text.HAL_FLASHEx_Erase:0000000000000000 HAL_FLASHEx_Erase
  2466. /tmp/ccHpGP9I.s:958 .text.HAL_FLASHEx_Erase:000000000000008c $d
  2467. .debug_frame:0000000000000010 $d
  2468. UNDEFINED SYMBOLS
  2469. FLASH_WaitForLastOperation
  2470. pFlash