?? stm32f10x_flash.lst
字號:
471
472 /* Wait for last operation to be completed */
473 status = FLASH_WaitForLastOperation(EraseTimeout);
\ 0000003C 5FF43020 MOVS R0,#+720896
\ 00000040 ........ BL FLASH_WaitForLastOperation
\ 00000044 0500 MOVS R5,R0
474
475 /* Disable the PER Bit */
476 FLASH->CR &= CR_PER_Reset;
\ 00000046 ........ LDR.W R0,??DataTable25_4 ;; 0x40022010
\ 0000004A 0068 LDR R0,[R0, #+0]
\ 0000004C 41F6FD71 MOVW R1,#+8189
\ 00000050 0840 ANDS R0,R1,R0
\ 00000052 ........ LDR.W R1,??DataTable25_4 ;; 0x40022010
\ 00000056 0860 STR R0,[R1, #+0]
477 }
478 #endif /* STM32F10X_XL */
479
480 /* Return the Erase Status */
481 return status;
\ ??FLASH_ErasePage_0:
\ 00000058 2800 MOVS R0,R5
\ 0000005A C0B2 UXTB R0,R0 ;; ZeroExt R0,R0,#+24,#+24
\ 0000005C 32BD POP {R1,R4,R5,PC} ;; return
482 }
483
484 /**
485 * @brief Erases all FLASH pages.
486 * @note This function can be used for all STM32F10x devices.
487 * @param None
488 * @retval FLASH Status: The returned value can be: FLASH_ERROR_PG,
489 * FLASH_ERROR_WRP, FLASH_COMPLETE or FLASH_TIMEOUT.
490 */
\ In section .text, align 2, keep-with-next
491 FLASH_Status FLASH_EraseAllPages(void)
492 {
\ FLASH_EraseAllPages:
\ 00000000 10B5 PUSH {R4,LR}
493 FLASH_Status status = FLASH_COMPLETE;
\ 00000002 0424 MOVS R4,#+4
494
495 #ifdef STM32F10X_XL
496 /* Wait for last operation to be completed */
497 status = FLASH_WaitForLastBank1Operation(EraseTimeout);
498
499 if(status == FLASH_COMPLETE)
500 {
501 /* if the previous operation is completed, proceed to erase all pages */
502 FLASH->CR |= CR_MER_Set;
503 FLASH->CR |= CR_STRT_Set;
504
505 /* Wait for last operation to be completed */
506 status = FLASH_WaitForLastBank1Operation(EraseTimeout);
507
508 /* Disable the MER Bit */
509 FLASH->CR &= CR_MER_Reset;
510 }
511 if(status == FLASH_COMPLETE)
512 {
513 /* if the previous operation is completed, proceed to erase all pages */
514 FLASH->CR2 |= CR_MER_Set;
515 FLASH->CR2 |= CR_STRT_Set;
516
517 /* Wait for last operation to be completed */
518 status = FLASH_WaitForLastBank2Operation(EraseTimeout);
519
520 /* Disable the MER Bit */
521 FLASH->CR2 &= CR_MER_Reset;
522 }
523 #else
524 /* Wait for last operation to be completed */
525 status = FLASH_WaitForLastOperation(EraseTimeout);
\ 00000004 5FF43020 MOVS R0,#+720896
\ 00000008 ........ BL FLASH_WaitForLastOperation
\ 0000000C 0400 MOVS R4,R0
526 if(status == FLASH_COMPLETE)
\ 0000000E E4B2 UXTB R4,R4 ;; ZeroExt R4,R4,#+24,#+24
\ 00000010 042C CMP R4,#+4
\ 00000012 1DD1 BNE.N ??FLASH_EraseAllPages_0
527 {
528 /* if the previous operation is completed, proceed to erase all pages */
529 FLASH->CR |= CR_MER_Set;
\ 00000014 ........ LDR.W R0,??DataTable25_4 ;; 0x40022010
\ 00000018 0068 LDR R0,[R0, #+0]
\ 0000001A 50F00400 ORRS R0,R0,#0x4
\ 0000001E ........ LDR.W R1,??DataTable25_4 ;; 0x40022010
\ 00000022 0860 STR R0,[R1, #+0]
530 FLASH->CR |= CR_STRT_Set;
\ 00000024 ........ LDR.W R0,??DataTable25_4 ;; 0x40022010
\ 00000028 0068 LDR R0,[R0, #+0]
\ 0000002A 50F04000 ORRS R0,R0,#0x40
\ 0000002E ........ LDR.W R1,??DataTable25_4 ;; 0x40022010
\ 00000032 0860 STR R0,[R1, #+0]
531
532 /* Wait for last operation to be completed */
533 status = FLASH_WaitForLastOperation(EraseTimeout);
\ 00000034 5FF43020 MOVS R0,#+720896
\ 00000038 ........ BL FLASH_WaitForLastOperation
\ 0000003C 0400 MOVS R4,R0
534
535 /* Disable the MER Bit */
536 FLASH->CR &= CR_MER_Reset;
\ 0000003E ........ LDR.W R0,??DataTable25_4 ;; 0x40022010
\ 00000042 0068 LDR R0,[R0, #+0]
\ 00000044 41F6FB71 MOVW R1,#+8187
\ 00000048 0840 ANDS R0,R1,R0
\ 0000004A ........ LDR.W R1,??DataTable25_4 ;; 0x40022010
\ 0000004E 0860 STR R0,[R1, #+0]
537 }
538 #endif /* STM32F10X_XL */
539
540 /* Return the Erase Status */
541 return status;
\ ??FLASH_EraseAllPages_0:
\ 00000050 2000 MOVS R0,R4
\ 00000052 C0B2 UXTB R0,R0 ;; ZeroExt R0,R0,#+24,#+24
\ 00000054 10BD POP {R4,PC} ;; return
542 }
543
544 /**
545 * @brief Erases all Bank1 FLASH pages.
546 * @note This function can be used for all STM32F10x devices.
547 * - For STM32F10X_XL devices this function erases all Bank1 pages.
548 * - For all other devices it erases all Bank1 pages and it is equivalent
549 * to FLASH_EraseAllPages function.
550 * @param None
551 * @retval FLASH Status: The returned value can be: FLASH_ERROR_PG,
552 * FLASH_ERROR_WRP, FLASH_COMPLETE or FLASH_TIMEOUT.
553 */
\ In section .text, align 2, keep-with-next
554 FLASH_Status FLASH_EraseAllBank1Pages(void)
555 {
\ FLASH_EraseAllBank1Pages:
\ 00000000 10B5 PUSH {R4,LR}
556 FLASH_Status status = FLASH_COMPLETE;
\ 00000002 0424 MOVS R4,#+4
557 /* Wait for last operation to be completed */
558 status = FLASH_WaitForLastBank1Operation(EraseTimeout);
\ 00000004 5FF43020 MOVS R0,#+720896
\ 00000008 ........ BL FLASH_WaitForLastBank1Operation
\ 0000000C 0400 MOVS R4,R0
559
560 if(status == FLASH_COMPLETE)
\ 0000000E E4B2 UXTB R4,R4 ;; ZeroExt R4,R4,#+24,#+24
\ 00000010 042C CMP R4,#+4
\ 00000012 1DD1 BNE.N ??FLASH_EraseAllBank1Pages_0
561 {
562 /* if the previous operation is completed, proceed to erase all pages */
563 FLASH->CR |= CR_MER_Set;
\ 00000014 ........ LDR.W R0,??DataTable25_4 ;; 0x40022010
\ 00000018 0068 LDR R0,[R0, #+0]
\ 0000001A 50F00400 ORRS R0,R0,#0x4
\ 0000001E ........ LDR.W R1,??DataTable25_4 ;; 0x40022010
\ 00000022 0860 STR R0,[R1, #+0]
564 FLASH->CR |= CR_STRT_Set;
\ 00000024 ........ LDR.W R0,??DataTable25_4 ;; 0x40022010
\ 00000028 0068 LDR R0,[R0, #+0]
\ 0000002A 50F04000 ORRS R0,R0,#0x40
\ 0000002E ........ LDR.W R1,??DataTable25_4 ;; 0x40022010
\ 00000032 0860 STR R0,[R1, #+0]
565
566 /* Wait for last operation to be completed */
567 status = FLASH_WaitForLastBank1Operation(EraseTimeout);
\ 00000034 5FF43020 MOVS R0,#+720896
\ 00000038 ........ BL FLASH_WaitForLastBank1Operation
\ 0000003C 0400 MOVS R4,R0
568
569 /* Disable the MER Bit */
570 FLASH->CR &= CR_MER_Reset;
\ 0000003E ........ LDR.W R0,??DataTable25_4 ;; 0x40022010
\ 00000042 0068 LDR R0,[R0, #+0]
\ 00000044 41F6FB71 MOVW R1,#+8187
\ 00000048 0840 ANDS R0,R1,R0
\ 0000004A ........ LDR.W R1,??DataTable25_4 ;; 0x40022010
\ 0000004E 0860 STR R0,[R1, #+0]
571 }
572 /* Return the Erase Status */
573 return status;
\ ??FLASH_EraseAllBank1Pages_0:
\ 00000050 2000 MOVS R0,R4
\ 00000052 C0B2 UXTB R0,R0 ;; ZeroExt R0,R0,#+24,#+24
\ 00000054 10BD POP {R4,PC} ;; return
574 }
575
576 #ifdef STM32F10X_XL
577 /**
578 * @brief Erases all Bank2 FLASH pages.
579 * @note This function can be used only for STM32F10x_XL density devices.
580 * @param None
581 * @retval FLASH Status: The returned value can be: FLASH_ERROR_PG,
582 * FLASH_ERROR_WRP, FLASH_COMPLETE or FLASH_TIMEOUT.
583 */
584 FLASH_Status FLASH_EraseAllBank2Pages(void)
585 {
586 FLASH_Status status = FLASH_COMPLETE;
587 /* Wait for last operation to be completed */
588 status = FLASH_WaitForLastBank2Operation(EraseTimeout);
589
590 if(status == FLASH_COMPLETE)
591 {
592 /* if the previous operation is completed, proceed to erase all pages */
593 FLASH->CR2 |= CR_MER_Set;
594 FLASH->CR2 |= CR_STRT_Set;
595
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -