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

📄 stm32f10x_nvic.lst

📁 stm32+ucos-ii
💻 LST
📖 第 1 页 / 共 5 页
字号:
   \                                 In section .text, align 2, keep-with-next
    472          void NVIC_SystemHandlerConfig(u32 SystemHandler, FunctionalState NewState)
    473          {
   \                     NVIC_SystemHandlerConfig:
   \   00000000   10B4               PUSH     {R4}
    474            u32 tmpreg = 0x00;
   \   00000002   0022               MOVS     R2,#+0
    475          
    476            /* Check the parameters */
    477            assert_param(IS_CONFIG_SYSTEM_HANDLER(SystemHandler));
    478            assert_param(IS_FUNCTIONAL_STATE(NewState)); 
    479            
    480            tmpreg =  (u32)0x01 << (SystemHandler & (u32)0x1F);
   \   00000004   0123               MOVS     R3,#+1
   \   00000006   10F01F04           ANDS     R4,R0,#0x1F
   \   0000000A   A340               LSLS     R3,R3,R4
   \   0000000C   1A00               MOVS     R2,R3
    481          
    482            if (NewState != DISABLE)
   \   0000000E   C9B2               UXTB     R1,R1            ;; ZeroExt  R1,R1,#+24,#+24
   \   00000010   0029               CMP      R1,#+0
   \   00000012   05D0               BEQ.N    ??NVIC_SystemHandlerConfig_0
    483            {
    484              SCB->SHCSR |= tmpreg;
   \   00000014   ....               LDR.N    R3,??DataTable22_14  ;; 0xe000ed24
   \   00000016   1B68               LDR      R3,[R3, #+0]
   \   00000018   1343               ORRS     R3,R2,R3
   \   0000001A   ....               LDR.N    R4,??DataTable22_14  ;; 0xe000ed24
   \   0000001C   2360               STR      R3,[R4, #+0]
   \   0000001E   04E0               B.N      ??NVIC_SystemHandlerConfig_1
    485            }
    486            else
    487            {
    488              SCB->SHCSR &= ~tmpreg;
   \                     ??NVIC_SystemHandlerConfig_0:
   \   00000020   ....               LDR.N    R3,??DataTable22_14  ;; 0xe000ed24
   \   00000022   1B68               LDR      R3,[R3, #+0]
   \   00000024   9343               BICS     R3,R3,R2
   \   00000026   ....               LDR.N    R4,??DataTable22_14  ;; 0xe000ed24
   \   00000028   2360               STR      R3,[R4, #+0]
    489            }
    490          }
   \                     ??NVIC_SystemHandlerConfig_1:
   \   0000002A   10BC               POP      {R4}
   \   0000002C   7047               BX       LR               ;; return
    491          
    492          /*******************************************************************************
    493          * Function Name  : NVIC_SystemHandlerPriorityConfig
    494          * Description    : Configures the specified System Handlers priority.
    495          * Input          : - SystemHandler: specifies the system handler to be
    496          *                    enabled or disabled.
    497          *                    This parameter can be one of the following values:
    498          *                       - SystemHandler_MemoryManage
    499          *                       - SystemHandler_BusFault
    500          *                       - SystemHandler_UsageFault
    501          *                       - SystemHandler_SVCall
    502          *                       - SystemHandler_DebugMonitor
    503          *                       - SystemHandler_PSV
    504          *                       - SystemHandler_SysTick
    505          *                  - SystemHandlerPreemptionPriority: new priority group of the
    506          *                    specified system handlers.
    507          *                  - SystemHandlerSubPriority: new sub priority of the specified
    508          *                    system handlers.
    509          * Output         : None
    510          * Return         : None
    511          *******************************************************************************/

   \                                 In section .text, align 2, keep-with-next
    512          void NVIC_SystemHandlerPriorityConfig(u32 SystemHandler, u8 SystemHandlerPreemptionPriority,
    513                                                u8 SystemHandlerSubPriority)
    514          {
   \                     NVIC_SystemHandlerPriorityConfig:
   \   00000000   F0B4               PUSH     {R4-R7}
    515            u32 tmp1 = 0x00, tmp2 = 0xFF, handlermask = 0x00;
   \   00000002   0023               MOVS     R3,#+0
   \   00000004   FF25               MOVS     R5,#+255
   \   00000006   0024               MOVS     R4,#+0
    516            u32 tmppriority = 0x00;
   \   00000008   0026               MOVS     R6,#+0
    517          
    518            /* Check the parameters */
    519            assert_param(IS_PRIORITY_SYSTEM_HANDLER(SystemHandler));
    520            assert_param(IS_NVIC_PREEMPTION_PRIORITY(SystemHandlerPreemptionPriority));  
    521            assert_param(IS_NVIC_SUB_PRIORITY(SystemHandlerSubPriority));
    522              
    523            tmppriority = (0x700 - (SCB->AIRCR & (u32)0x700))>> 0x08;
   \   0000000A   ....               LDR.N    R7,??DataTable22_9  ;; 0xe000ed0c
   \   0000000C   3F68               LDR      R7,[R7, #+0]
   \   0000000E   17F4E067           ANDS     R7,R7,#0x700
   \   00000012   D7F5E067           RSBS     R7,R7,#+1792
   \   00000016   3F0A               LSRS     R7,R7,#+8
   \   00000018   3E00               MOVS     R6,R7
    524            tmp1 = (0x4 - tmppriority);
   \   0000001A   D6F10407           RSBS     R7,R6,#+4
   \   0000001E   3B00               MOVS     R3,R7
    525            tmp2 = tmp2 >> tmppriority;
   \   00000020   F540               LSRS     R5,R5,R6
    526              
    527            tmppriority = (u32)SystemHandlerPreemptionPriority << tmp1;
   \   00000022   C9B2               UXTB     R1,R1            ;; ZeroExt  R1,R1,#+24,#+24
   \   00000024   11FA03F7           LSLS     R7,R1,R3
   \   00000028   3E00               MOVS     R6,R7
    528            tmppriority |=  SystemHandlerSubPriority & tmp2;
   \   0000002A   D2B2               UXTB     R2,R2            ;; ZeroExt  R2,R2,#+24,#+24
   \   0000002C   15EA0207           ANDS     R7,R5,R2
   \   00000030   3E43               ORRS     R6,R7,R6
    529          
    530            tmppriority = tmppriority << 0x04;
   \   00000032   3601               LSLS     R6,R6,#+4
    531            tmp1 = SystemHandler & (u32)0xC0;
   \   00000034   10F0C007           ANDS     R7,R0,#0xC0
   \   00000038   3B00               MOVS     R3,R7
    532            tmp1 = tmp1 >> 0x06; 
   \   0000003A   9B09               LSRS     R3,R3,#+6
    533            tmp2 = (SystemHandler >> 0x08) & (u32)0x03;
   \   0000003C   C0F30127           UBFX     R7,R0,#+8,#+2
   \   00000040   3D00               MOVS     R5,R7
    534            tmppriority = tmppriority << (tmp2 * 0x08);
   \   00000042   2F00               MOVS     R7,R5
   \   00000044   FFB2               UXTB     R7,R7            ;; ZeroExt  R7,R7,#+24,#+24
   \   00000046   FF00               LSLS     R7,R7,#+3
   \   00000048   BE40               LSLS     R6,R6,R7
    535            handlermask = (u32)0xFF << (tmp2 * 0x08);
   \   0000004A   FF27               MOVS     R7,#+255
   \   0000004C   AC46               MOV      R12,R5
   \   0000004E   5FFA8CFC           UXTB     R12,R12          ;; ZeroExt  R12,R12,#+24,#+24
   \   00000052   5FEACC0C           LSLS     R12,R12,#+3
   \   00000056   17FA0CF7           LSLS     R7,R7,R12
   \   0000005A   3C00               MOVS     R4,R7
    536            
    537            SCB->SHPR[tmp1] &= ~handlermask;
   \   0000005C   ....               LDR.N    R7,??DataTable22_13  ;; 0xe000ed18
   \   0000005E   57F82370           LDR      R7,[R7, R3, LSL #+2]
   \   00000062   A743               BICS     R7,R7,R4
   \   00000064   ........           LDR.W    R12,??DataTable22_13  ;; 0xe000ed18
   \   00000068   4CF82370           STR      R7,[R12, R3, LSL #+2]
    538            SCB->SHPR[tmp1] |= tmppriority;
   \   0000006C   ....               LDR.N    R7,??DataTable22_13  ;; 0xe000ed18
   \   0000006E   57F82370           LDR      R7,[R7, R3, LSL #+2]
   \   00000072   3743               ORRS     R7,R6,R7
   \   00000074   ........           LDR.W    R12,??DataTable22_13  ;; 0xe000ed18
   \   00000078   4CF82370           STR      R7,[R12, R3, LSL #+2]
    539          }
   \   0000007C   F0BC               POP      {R4-R7}
   \   0000007E   7047               BX       LR               ;; return
    540          
    541          /*******************************************************************************
    542          * Function Name  : NVIC_GetSystemHandlerPendingBitStatus
    543          * Description    : Checks whether the specified System handlers pending bit is
    544          *                  set or not.
    545          * Input          : - SystemHandler: specifies the system handler pending bit to
    546          *                    check.
    547          *                    This parameter can be one of the following values:
    548          *                       - SystemHandler_MemoryManage
    549          *                       - SystemHandler_BusFault
    550          *                       - SystemHandler_SVCall
    551          * Output         : None
    552          * Return         : The new state of System Handler pending bit(SET or RESET).
    553          *******************************************************************************/

   \                                 In section .text, align 2, keep-with-next
    554          ITStatus NVIC_GetSystemHandlerPendingBitStatus(u32 SystemHandler)
    555          {
   \                     NVIC_GetSystemHandlerPendingBitStatus:
   \   00000000   10B4               PUSH     {R4}
   \   00000002   0100               MOVS     R1,R0
    556            ITStatus bitstatus  = RESET;
   \   00000004   0020               MOVS     R0,#+0
    557            u32 tmp = 0x00, tmppos = 0x00;
   \   00000006   0022               MOVS     R2,#+0
   \   00000008   0023               MOVS     R3,#+0
    558          
    559            /* Check the parameters */
    560            assert_param(IS_GET_PENDING_SYSTEM_HANDLER(SystemHandler));
    561            
    562            tmppos = (SystemHandler >> 0x0A);
   \   0000000A   8C0A               LSRS     R4,R1,#+10
   \   0000000C   2300               MOVS     R3,R4
    563            tmppos &= (u32)0x0F;
   \   0000000E   13F00F03           ANDS     R3,R3,#0xF
    564          
    565            tmppos = (u32)0x01 << tmppos;
   \   00000012   0124               MOVS     R4,#+1
   \   00000014   14FA03F3           LSLS     R3,R4,R3
    566          
    567            tmp = SCB->SHCSR & tmppos;
   \   00000018   ....               LDR.N    R4,??DataTable22_14  ;; 0xe000ed24
   \   0000001A   2468               LDR      R4,[R4, #+0]
   \   0000001C   1C40               ANDS     R4,R3,R4
   \   0000001E   2200               MOVS     R2,R4
    568          
    569            if (tmp == tmppos)
   \   00000020   9A42               CMP      R2,R3
   \   00000022   02D1               BNE.N    ??NVIC_GetSystemHandlerPendingBitStatus_0
    570            {
    571              bitstatus = SET;
   \   00000024   0124               MOVS     R4,#+1
   \   00000026   2000               MOVS     R0,R4
   \   00000028   01E0               B.N      ??NVIC_GetSystemHandlerPendingBitStatus_1
    572            }
    573            else
    574            {
    575              bitstatus = RESET;
   \                     ??NVIC_GetSystemHandlerPendingBitStatus_0:
   \   0000002A   0024               MOVS     R4,#+0
   \   0000002C   2000               MOVS     R0,R4
    576            }
    577            return bitstatus;
   \                     ??NVIC_GetSystemHandlerPendingBitStatus_1:
   \   0000002E   C0B2               UXTB     R0,R0            ;; ZeroExt  R0,R0,#+24,#+24
   \   00000030   10BC               POP      {R4}
   \   00000032   7047               BX       LR               ;; return
    578          }
    579          
    580          /*******************************************************************************
    581          * Function Name  : NVIC_SetSystemHandlerPendingBit
    582          * Description    : Sets System Handler pending bit.
    583          * Input          : - SystemHandler: specifies the system handle

⌨️ 快捷键说明

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