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

📄 stm32f10x_nvic.lst

📁 stm32+ucos-ii
💻 LST
📖 第 1 页 / 共 5 页
字号:
     84          * Input          : - NVIC_PriorityGroup: specifies the priority grouping bits
     85          *                    length. This parameter can be one of the following values:
     86          *                       - NVIC_PriorityGroup_0: 0 bits for pre-emption priority
     87          *                         4 bits for subpriority
     88          *                       - NVIC_PriorityGroup_1: 1 bits for pre-emption priority
     89          *                         3 bits for subpriority
     90          *                       - NVIC_PriorityGroup_2: 2 bits for pre-emption priority
     91          *                         2 bits for subpriority
     92          *                       - NVIC_PriorityGroup_3: 3 bits for pre-emption priority
     93          *                         1 bits for subpriority
     94          *                       - NVIC_PriorityGroup_4: 4 bits for pre-emption priority
     95          *                         0 bits for subpriority
     96          * Output         : None
     97          * Return         : None
     98          *******************************************************************************/

   \                                 In section .text, align 2, keep-with-next
     99          void NVIC_PriorityGroupConfig(u32 NVIC_PriorityGroup)
    100          {
    101            /* Check the parameters */
    102            assert_param(IS_NVIC_PRIORITY_GROUP(NVIC_PriorityGroup));
    103            
    104            /* Set the PRIGROUP[10:8] bits according to NVIC_PriorityGroup value */
    105            SCB->AIRCR = AIRCR_VECTKEY_MASK | NVIC_PriorityGroup;
   \                     NVIC_PriorityGroupConfig:
   \   00000000   ........           LDR.W    R1,??DataTable22_10  ;; 0x5fa0000
   \   00000004   0143               ORRS     R1,R1,R0
   \   00000006   ........           LDR.W    R2,??DataTable22_9  ;; 0xe000ed0c
   \   0000000A   1160               STR      R1,[R2, #+0]
    106          }
   \   0000000C   7047               BX       LR               ;; return
    107          
    108          /*******************************************************************************
    109          * Function Name  : NVIC_Init
    110          * Description    : Initializes the NVIC peripheral according to the specified
    111          *                  parameters in the NVIC_InitStruct.
    112          * Input          : - NVIC_InitStruct: pointer to a NVIC_InitTypeDef structure
    113          *                    that contains the configuration information for the
    114          *                    specified NVIC peripheral.
    115          * Output         : None
    116          * Return         : None
    117          *******************************************************************************/

   \                                 In section .text, align 2, keep-with-next
    118          void NVIC_Init(NVIC_InitTypeDef* NVIC_InitStruct)
    119          {
   \                     NVIC_Init:
   \   00000000   F0B5               PUSH     {R4-R7,LR}
    120            u32 tmppriority = 0x00, tmpreg = 0x00, tmpmask = 0x00;
   \   00000002   0021               MOVS     R1,#+0
   \   00000004   0022               MOVS     R2,#+0
   \   00000006   0023               MOVS     R3,#+0
    121            u32 tmppre = 0, tmpsub = 0x0F;
   \   00000008   0024               MOVS     R4,#+0
   \   0000000A   0F25               MOVS     R5,#+15
    122          
    123            /* Check the parameters */
    124            assert_param(IS_FUNCTIONAL_STATE(NVIC_InitStruct->NVIC_IRQChannelCmd));
    125            assert_param(IS_NVIC_IRQ_CHANNEL(NVIC_InitStruct->NVIC_IRQChannel));
    126            assert_param(IS_NVIC_PREEMPTION_PRIORITY(NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority));  
    127            assert_param(IS_NVIC_SUB_PRIORITY(NVIC_InitStruct->NVIC_IRQChannelSubPriority));
    128              
    129            if (NVIC_InitStruct->NVIC_IRQChannelCmd != DISABLE)
   \   0000000C   C678               LDRB     R6,[R0, #+3]
   \   0000000E   002E               CMP      R6,#+0
   \   00000010   3DD0               BEQ.N    ??NVIC_Init_0
    130            {
    131              /* Compute the Corresponding IRQ Priority --------------------------------*/    
    132              tmppriority = (0x700 - (SCB->AIRCR & (u32)0x700))>> 0x08;
   \   00000012   ........           LDR.W    R6,??DataTable22_9  ;; 0xe000ed0c
   \   00000016   3668               LDR      R6,[R6, #+0]
   \   00000018   16F4E066           ANDS     R6,R6,#0x700
   \   0000001C   D6F5E066           RSBS     R6,R6,#+1792
   \   00000020   360A               LSRS     R6,R6,#+8
   \   00000022   3100               MOVS     R1,R6
    133              tmppre = (0x4 - tmppriority);
   \   00000024   D1F10406           RSBS     R6,R1,#+4
   \   00000028   3400               MOVS     R4,R6
    134              tmpsub = tmpsub >> tmppriority;
   \   0000002A   CD40               LSRS     R5,R5,R1
    135              
    136              tmppriority = (u32)NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority << tmppre;
   \   0000002C   4678               LDRB     R6,[R0, #+1]
   \   0000002E   A640               LSLS     R6,R6,R4
   \   00000030   3100               MOVS     R1,R6
    137              tmppriority |=  NVIC_InitStruct->NVIC_IRQChannelSubPriority & tmpsub;
   \   00000032   8678               LDRB     R6,[R0, #+2]
   \   00000034   2E40               ANDS     R6,R5,R6
   \   00000036   3143               ORRS     R1,R6,R1
    138          
    139              tmppriority = tmppriority << 0x04;
   \   00000038   0901               LSLS     R1,R1,#+4
    140              tmppriority = ((u32)tmppriority) << ((NVIC_InitStruct->NVIC_IRQChannel & (u8)0x03) * 0x08);
   \   0000003A   0678               LDRB     R6,[R0, #+0]
   \   0000003C   16F00306           ANDS     R6,R6,#0x3
   \   00000040   F6B2               UXTB     R6,R6            ;; ZeroExt  R6,R6,#+24,#+24
   \   00000042   F600               LSLS     R6,R6,#+3
   \   00000044   B140               LSLS     R1,R1,R6
    141              
    142              tmpreg = NVIC->IPR[(NVIC_InitStruct->NVIC_IRQChannel >> 0x02)];
   \   00000046   0678               LDRB     R6,[R0, #+0]
   \   00000048   B610               ASRS     R6,R6,#+2
   \   0000004A   ....               LDR.N    R7,??DataTable22_6  ;; 0xe000e400
   \   0000004C   57F82660           LDR      R6,[R7, R6, LSL #+2]
   \   00000050   3200               MOVS     R2,R6
    143              tmpmask = (u32)0xFF << ((NVIC_InitStruct->NVIC_IRQChannel & (u8)0x03) * 0x08);
   \   00000052   FF26               MOVS     R6,#+255
   \   00000054   0778               LDRB     R7,[R0, #+0]
   \   00000056   17F00307           ANDS     R7,R7,#0x3
   \   0000005A   FFB2               UXTB     R7,R7            ;; ZeroExt  R7,R7,#+24,#+24
   \   0000005C   FF00               LSLS     R7,R7,#+3
   \   0000005E   BE40               LSLS     R6,R6,R7
   \   00000060   3300               MOVS     R3,R6
    144              tmpreg &= ~tmpmask;
   \   00000062   9A43               BICS     R2,R2,R3
    145              tmppriority &= tmpmask;  
   \   00000064   1940               ANDS     R1,R3,R1
    146              tmpreg |= tmppriority;
   \   00000066   0A43               ORRS     R2,R1,R2
    147          
    148              NVIC->IPR[(NVIC_InitStruct->NVIC_IRQChannel >> 0x02)] = tmpreg;
   \   00000068   0678               LDRB     R6,[R0, #+0]
   \   0000006A   B610               ASRS     R6,R6,#+2
   \   0000006C   ....               LDR.N    R7,??DataTable22_6  ;; 0xe000e400
   \   0000006E   47F82620           STR      R2,[R7, R6, LSL #+2]
    149              
    150              /* Enable the Selected IRQ Channels --------------------------------------*/
    151              NVIC->ISER[(NVIC_InitStruct->NVIC_IRQChannel >> 0x05)] =
    152                (u32)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (u8)0x1F);
   \   00000072   0678               LDRB     R6,[R0, #+0]
   \   00000074   7611               ASRS     R6,R6,#+5
   \   00000076   ....               LDR.N    R7,??DataTable22_18  ;; 0xe000e100
   \   00000078   5FF0010C           MOVS     R12,#+1
   \   0000007C   90F800E0           LDRB     LR,[R0, #+0]
   \   00000080   1EF01F0E           ANDS     LR,LR,#0x1F
   \   00000084   1CFA0EFC           LSLS     R12,R12,LR
   \   00000088   47F826C0           STR      R12,[R7, R6, LSL #+2]
   \   0000008C   0CE0               B.N      ??NVIC_Init_1
    153            }
    154            else
    155            {
    156              /* Disable the Selected IRQ Channels -------------------------------------*/
    157              NVIC->ICER[(NVIC_InitStruct->NVIC_IRQChannel >> 0x05)] =
    158                (u32)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (u8)0x1F);
   \                     ??NVIC_Init_0:
   \   0000008E   0678               LDRB     R6,[R0, #+0]
   \   00000090   7611               ASRS     R6,R6,#+5
   \   00000092   ....               LDR.N    R7,??DataTable22  ;; 0xe000e180
   \   00000094   5FF0010C           MOVS     R12,#+1
   \   00000098   90F800E0           LDRB     LR,[R0, #+0]
   \   0000009C   1EF01F0E           ANDS     LR,LR,#0x1F
   \   000000A0   1CFA0EFC           LSLS     R12,R12,LR
   \   000000A4   47F826C0           STR      R12,[R7, R6, LSL #+2]
    159            }
    160          }
   \                     ??NVIC_Init_1:
   \   000000A8   F0BD               POP      {R4-R7,PC}       ;; return
    161          
    162          /*******************************************************************************
    163          * Function Name  : NVIC_StructInit
    164          * Description    : Fills each NVIC_InitStruct member with its default value.
    165          * Input          : - NVIC_InitStruct: pointer to a NVIC_InitTypeDef structure which
    166          *                    will be initialized.
    167          * Output         : None
    168          * Return         : None
    169          *******************************************************************************/

   \                                 In section .text, align 2, keep-with-next
    170          void NVIC_StructInit(NVIC_InitTypeDef* NVIC_InitStruct)
    171          {
    172            /* NVIC_InitStruct members default value */
    173            NVIC_InitStruct->NVIC_IRQChannel = 0x00;
   \                     NVIC_StructInit:
   \   00000000   0021               MOVS     R1,#+0
   \   00000002   0170               STRB     R1,[R0, #+0]
    174            NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority = 0x00;
   \   00000004   0021               MOVS     R1,#+0
   \   00000006   4170               STRB     R1,[R0, #+1]
    175            NVIC_InitStruct->NVIC_IRQChannelSubPriority = 0x00;
   \   00000008   0021               MOVS     R1,#+0
   \   0000000A   8170               STRB     R1,[R0, #+2]
    176            NVIC_InitStruct->NVIC_IRQChannelCmd = DISABLE;
   \   0000000C   0021               MOVS     R1,#+0
   \   0000000E   C170               STRB     R1,[R0, #+3]
    177          }
   \   00000010   7047               BX       LR               ;; return
    178          
    179          /*******************************************************************************
    180          * Function Name  : NVIC_SETPRIMASK
    181          * Description    : Enables the PRIMASK priority: Raises the execution priority to 0.
    182          * Input          : None
    183          * Output         : None
    184          * Return         : None
    185          *******************************************************************************/

   \                                 In section .text, align 2, keep-with-next
    186          void NVIC_SETPRIMASK(void)
    187          {
   \                     NVIC_SETPRIMASK:
   \   00000000   80B5               PUSH     {R7,LR}
    188            __SETPRIMASK();
   \   00000002   ........           BL       __SETPRIMASK
    189          }
   \   00000006   01BD               POP      {R0,PC}          ;; return
    190          
    191          /*******************************************************************************
    192          * Function Name  : NVIC_RESETPRIMASK
    193          * Description    : Disables the PRIMASK priority.
    194          * Input          : None
    195          * Output         : None
    196          * Return         : None
    197          *******************************************************************************/

   \                                 In section .text, align 2, keep-with-next
    198          void NVIC_RESETPRIMASK(void)
    199          {
   \                     NVIC_RESETPRIMASK:
   \   00000000   80B5               PUSH     {R7,LR}
    200            __RESETPRIMASK();
   \   00000002   ........           BL       __RESETPRIMASK
    201          }

⌨️ 快捷键说明

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