⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stm32f10x_flash.lst

📁 stm32+ucos-ii
💻 LST
📖 第 1 页 / 共 5 页
字号:
   \   00000008   0160               STR      R1,[R0, #+0]
    322            FLASH->KEYR = FLASH_KEY2;
   \   0000000A   ........           LDR.W    R0,??DataTable25_1  ;; 0x40022004
   \   0000000E   ........           LDR.W    R1,??DataTable25_3  ;; 0xcdef89ab
   \   00000012   0160               STR      R1,[R0, #+0]
    323          
    324          #ifdef STM32F10X_XL
    325            /* Authorize the FPEC of Bank2 Access */
    326            FLASH->KEYR2 = FLASH_KEY1;
    327            FLASH->KEYR2 = FLASH_KEY2;
    328          #endif /* STM32F10X_XL */
    329          }
   \   00000014   7047               BX       LR               ;; return
    330          /**
    331            * @brief  Unlocks the FLASH Bank1 Program Erase Controller.
    332            * @note   This function can be used for all STM32F10x devices.
    333            *         - For STM32F10X_XL devices this function unlocks Bank1.
    334            *         - For all other devices it unlocks Bank1 and it is 
    335            *           equivalent to FLASH_Unlock function.
    336            * @param  None
    337            * @retval None
    338            */

   \                                 In section .text, align 2, keep-with-next
    339          void FLASH_UnlockBank1(void)
    340          {
    341            /* Authorize the FPEC of Bank1 Access */
    342            FLASH->KEYR = FLASH_KEY1;
   \                     FLASH_UnlockBank1:
   \   00000000   ........           LDR.W    R0,??DataTable25_1  ;; 0x40022004
   \   00000004   ........           LDR.W    R1,??DataTable25_2  ;; 0x45670123
   \   00000008   0160               STR      R1,[R0, #+0]
    343            FLASH->KEYR = FLASH_KEY2;
   \   0000000A   ........           LDR.W    R0,??DataTable25_1  ;; 0x40022004
   \   0000000E   ........           LDR.W    R1,??DataTable25_3  ;; 0xcdef89ab
   \   00000012   0160               STR      R1,[R0, #+0]
    344          }
   \   00000014   7047               BX       LR               ;; return
    345          
    346          #ifdef STM32F10X_XL
    347          /**
    348            * @brief  Unlocks the FLASH Bank2 Program Erase Controller.
    349            * @note   This function can be used only for STM32F10X_XL density devices.
    350            * @param  None
    351            * @retval None
    352            */
    353          void FLASH_UnlockBank2(void)
    354          {
    355            /* Authorize the FPEC of Bank2 Access */
    356            FLASH->KEYR2 = FLASH_KEY1;
    357            FLASH->KEYR2 = FLASH_KEY2;
    358          
    359          }
    360          #endif /* STM32F10X_XL */
    361          
    362          /**
    363            * @brief  Locks the FLASH Program Erase Controller.
    364            * @note   This function can be used for all STM32F10x devices.
    365            *         - For STM32F10X_XL devices this function Locks Bank1 and Bank2.
    366            *         - For all other devices it Locks Bank1 and it is equivalent 
    367            *           to FLASH_LockBank1 function.
    368            * @param  None
    369            * @retval None
    370            */

   \                                 In section .text, align 2, keep-with-next
    371          void FLASH_Lock(void)
    372          {
    373            /* Set the Lock Bit to lock the FPEC and the CR of  Bank1 */
    374            FLASH->CR |= CR_LOCK_Set;
   \                     FLASH_Lock:
   \   00000000   ........           LDR.W    R0,??DataTable25_4  ;; 0x40022010
   \   00000004   0068               LDR      R0,[R0, #+0]
   \   00000006   50F08000           ORRS     R0,R0,#0x80
   \   0000000A   ........           LDR.W    R1,??DataTable25_4  ;; 0x40022010
   \   0000000E   0860               STR      R0,[R1, #+0]
    375          
    376          #ifdef STM32F10X_XL
    377            /* Set the Lock Bit to lock the FPEC and the CR of  Bank2 */
    378            FLASH->CR2 |= CR_LOCK_Set;
    379          #endif /* STM32F10X_XL */
    380          }
   \   00000010   7047               BX       LR               ;; return
    381          
    382          /**
    383            * @brief  Locks the FLASH Bank1 Program Erase Controller.
    384            * @note   this function can be used for all STM32F10x devices.
    385            *         - For STM32F10X_XL devices this function Locks Bank1.
    386            *         - For all other devices it Locks Bank1 and it is equivalent 
    387            *           to FLASH_Lock function.
    388            * @param  None
    389            * @retval None
    390            */

   \                                 In section .text, align 2, keep-with-next
    391          void FLASH_LockBank1(void)
    392          {
    393            /* Set the Lock Bit to lock the FPEC and the CR of  Bank1 */
    394            FLASH->CR |= CR_LOCK_Set;
   \                     FLASH_LockBank1:
   \   00000000   ........           LDR.W    R0,??DataTable25_4  ;; 0x40022010
   \   00000004   0068               LDR      R0,[R0, #+0]
   \   00000006   50F08000           ORRS     R0,R0,#0x80
   \   0000000A   ........           LDR.W    R1,??DataTable25_4  ;; 0x40022010
   \   0000000E   0860               STR      R0,[R1, #+0]
    395          }
   \   00000010   7047               BX       LR               ;; return
    396          
    397          #ifdef STM32F10X_XL
    398          /**
    399            * @brief  Locks the FLASH Bank2 Program Erase Controller.
    400            * @note   This function can be used only for STM32F10X_XL density devices.
    401            * @param  None
    402            * @retval None
    403            */
    404          void FLASH_LockBank2(void)
    405          {
    406            /* Set the Lock Bit to lock the FPEC and the CR of  Bank2 */
    407            FLASH->CR2 |= CR_LOCK_Set;
    408          }
    409          #endif /* STM32F10X_XL */
    410          
    411          /**
    412            * @brief  Erases a specified FLASH page.
    413            * @note   This function can be used for all STM32F10x devices.
    414            * @param  Page_Address: The page address to be erased.
    415            * @retval FLASH Status: The returned value can be: FLASH_BUSY, FLASH_ERROR_PG,
    416            *   FLASH_ERROR_WRP, FLASH_COMPLETE or FLASH_TIMEOUT.
    417            */

   \                                 In section .text, align 2, keep-with-next
    418          FLASH_Status FLASH_ErasePage(uint32_t Page_Address)
    419          {
   \                     FLASH_ErasePage:
   \   00000000   38B5               PUSH     {R3-R5,LR}
   \   00000002   0400               MOVS     R4,R0
    420            FLASH_Status status = FLASH_COMPLETE;
   \   00000004   0425               MOVS     R5,#+4
    421            /* Check the parameters */
    422            assert_param(IS_FLASH_ADDRESS(Page_Address));
    423          
    424          #ifdef STM32F10X_XL
    425            if(Page_Address < FLASH_BANK1_END_ADDRESS)  
    426            {
    427              /* Wait for last operation to be completed */
    428              status = FLASH_WaitForLastBank1Operation(EraseTimeout);
    429              if(status == FLASH_COMPLETE)
    430              { 
    431                /* if the previous operation is completed, proceed to erase the page */
    432                FLASH->CR|= CR_PER_Set;
    433                FLASH->AR = Page_Address; 
    434                FLASH->CR|= CR_STRT_Set;
    435              
    436                /* Wait for last operation to be completed */
    437                status = FLASH_WaitForLastBank1Operation(EraseTimeout);
    438          
    439                /* Disable the PER Bit */
    440                FLASH->CR &= CR_PER_Reset;
    441              }
    442            }
    443            else
    444            {
    445              /* Wait for last operation to be completed */
    446              status = FLASH_WaitForLastBank2Operation(EraseTimeout);
    447              if(status == FLASH_COMPLETE)
    448              { 
    449                /* if the previous operation is completed, proceed to erase the page */
    450                FLASH->CR2|= CR_PER_Set;
    451                FLASH->AR2 = Page_Address; 
    452                FLASH->CR2|= CR_STRT_Set;
    453              
    454                /* Wait for last operation to be completed */
    455                status = FLASH_WaitForLastBank2Operation(EraseTimeout);
    456                
    457                /* Disable the PER Bit */
    458                FLASH->CR2 &= CR_PER_Reset;
    459              }
    460            }
    461          #else
    462            /* Wait for last operation to be completed */
    463            status = FLASH_WaitForLastOperation(EraseTimeout);
   \   00000006   5FF43020           MOVS     R0,#+720896
   \   0000000A   ........           BL       FLASH_WaitForLastOperation
   \   0000000E   0500               MOVS     R5,R0
    464            
    465            if(status == FLASH_COMPLETE)
   \   00000010   EDB2               UXTB     R5,R5            ;; ZeroExt  R5,R5,#+24,#+24
   \   00000012   042D               CMP      R5,#+4
   \   00000014   20D1               BNE.N    ??FLASH_ErasePage_0
    466            { 
    467              /* if the previous operation is completed, proceed to erase the page */
    468              FLASH->CR|= CR_PER_Set;
   \   00000016   ........           LDR.W    R0,??DataTable25_4  ;; 0x40022010
   \   0000001A   0068               LDR      R0,[R0, #+0]
   \   0000001C   50F00200           ORRS     R0,R0,#0x2
   \   00000020   ........           LDR.W    R1,??DataTable25_4  ;; 0x40022010
   \   00000024   0860               STR      R0,[R1, #+0]
    469              FLASH->AR = Page_Address; 
   \   00000026   ........           LDR.W    R0,??DataTable25_5  ;; 0x40022014
   \   0000002A   0460               STR      R4,[R0, #+0]
    470              FLASH->CR|= CR_STRT_Set;
   \   0000002C   ........           LDR.W    R0,??DataTable25_4  ;; 0x40022010
   \   00000030   0068               LDR      R0,[R0, #+0]
   \   00000032   50F04000           ORRS     R0,R0,#0x40
   \   00000036   ........           LDR.W    R1,??DataTable25_4  ;; 0x40022010
   \   0000003A   0860               STR      R0,[R1, #+0]

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -