📄 stm32f10x_nvic.s79
字号:
LDR.N R1,??DataTable34 ;; 0xffffffffe000ed30
STR R0,[R1, #+0]
// 76 }
BX LR ;; return
DATA
??NVIC_SCBDeInit_0:
DC32 0xffffffffe000ed14
CFI EndBlock cfiBlock1
// 77
// 78 /*******************************************************************************
// 79 * Function Name : NVIC_PriorityGroupConfig
// 80 * Description : Configures the priority grouping: pre-emption priority
// 81 * and subpriority.
// 82 * Input : - NVIC_PriorityGroup: specifies the priority grouping bits
// 83 * length. This parameter can be one of the following values:
// 84 * - NVIC_PriorityGroup_0: 0 bits for pre-emption priority
// 85 * 4 bits for subpriority
// 86 * - NVIC_PriorityGroup_1: 1 bits for pre-emption priority
// 87 * 3 bits for subpriority
// 88 * - NVIC_PriorityGroup_2: 2 bits for pre-emption priority
// 89 * 2 bits for subpriority
// 90 * - NVIC_PriorityGroup_3: 3 bits for pre-emption priority
// 91 * 1 bits for subpriority
// 92 * - NVIC_PriorityGroup_4: 4 bits for pre-emption priority
// 93 * 0 bits for subpriority
// 94 * Output : None
// 95 * Return : None
// 96 *******************************************************************************/
RSEG CODE:CODE:NOROOT(2)
CFI Block cfiBlock2 Using cfiCommon0
CFI Function NVIC_PriorityGroupConfig
THUMB
// 97 void NVIC_PriorityGroupConfig(u32 NVIC_PriorityGroup)
// 98 {
// 99 /* Check the parameters */
// 100 assert_param(IS_NVIC_PRIORITY_GROUP(NVIC_PriorityGroup));
// 101
// 102 /* Set the PRIGROUP[10:8] bits according to NVIC_PriorityGroup value */
// 103 SCB->AIRCR = AIRCR_VECTKEY_MASK | NVIC_PriorityGroup;
NVIC_PriorityGroupConfig:
LDR.N R1,??DataTable26 ;; 0xffffffffe000ed0c
LDR.N R2,??DataTable14 ;; 0x5fa0000
ORRS R2,R2,R0
STR R2,[R1, #+0]
// 104 }
BX LR ;; return
CFI EndBlock cfiBlock2
RSEG CODE:CODE:NOROOT(2)
DATA
??DataTable14:
DC32 0x5fa0000
// 105
// 106 /*******************************************************************************
// 107 * Function Name : NVIC_Init
// 108 * Description : Initializes the NVIC peripheral according to the specified
// 109 * parameters in the NVIC_InitStruct.
// 110 * Input : - NVIC_InitStruct: pointer to a NVIC_InitTypeDef structure
// 111 * that contains the configuration information for the
// 112 * specified NVIC peripheral.
// 113 * Output : None
// 114 * Return : None
// 115 *******************************************************************************/
RSEG CODE:CODE:NOROOT(2)
CFI Block cfiBlock3 Using cfiCommon0
CFI Function NVIC_Init
THUMB
// 116 void NVIC_Init(NVIC_InitTypeDef* NVIC_InitStruct)
// 117 {
NVIC_Init:
MOVS R1,R0
PUSH {R4-R7,LR}
CFI ?RET Frame(CFA, -4)
CFI R7 Frame(CFA, -8)
CFI R6 Frame(CFA, -12)
CFI R5 Frame(CFA, -16)
CFI R4 Frame(CFA, -20)
CFI CFA R13+20
// 118 u32 tmppriority = 0x00, tmpreg = 0x00, tmpmask = 0x00;
// 119 u32 tmppre = 0, tmpsub = 0x0F;
// 120
// 121 /* Check the parameters */
// 122 assert_param(IS_FUNCTIONAL_STATE(NVIC_InitStruct->NVIC_IRQChannelCmd));
// 123 assert_param(IS_NVIC_IRQ_CHANNEL(NVIC_InitStruct->NVIC_IRQChannel));
// 124 assert_param(IS_NVIC_PREEMPTION_PRIORITY(NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority));
// 125 assert_param(IS_NVIC_SUB_PRIORITY(NVIC_InitStruct->NVIC_IRQChannelSubPriority));
// 126
// 127 if (NVIC_InitStruct->NVIC_IRQChannelCmd != DISABLE)
LDRB R2,[R1, #+0]
LDRB R0,[R1, #+3]
CBZ R0,??NVIC_Init_0
// 128 {
// 129 /* Compute the Corresponding IRQ Priority --------------------------------*/
// 130 tmppriority = (0x700 - (SCB->AIRCR & (u32)0x700))>> 0x08;
LDR.N R0,??DataTable26 ;; 0xffffffffe000ed0c
LDR.N R4,??DataTable16 ;; 0xffffffffe000e400
ASRS R3,R2,#+2
LDR R0,[R0, #+0]
ADDS R5,R4,R3, LSL #+2
// 131 tmppre = (0x4 - tmppriority);
// 132 tmpsub = tmpsub >> tmppriority;
// 133
// 134 tmppriority = (u32)NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority << tmppre;
// 135 tmppriority |= NVIC_InitStruct->NVIC_IRQChannelSubPriority & tmpsub;
// 136
// 137 tmppriority = tmppriority << 0x04;
// 138 tmppriority = ((u32)tmppriority) << ((NVIC_InitStruct->NVIC_IRQChannel & (u8)0x03) * 0x08);
// 139
// 140 tmpreg = NVIC->IPR[(NVIC_InitStruct->NVIC_IRQChannel >> 0x02)];
// 141 tmpmask = (u32)0xFF << ((NVIC_InitStruct->NVIC_IRQChannel & (u8)0x03) * 0x08);
// 142 tmpreg &= ~tmpmask;
// 143 tmppriority &= tmpmask;
// 144 tmpreg |= tmppriority;
// 145
// 146 NVIC->IPR[(NVIC_InitStruct->NVIC_IRQChannel >> 0x02)] = tmpreg;
MOV R12,R5
LDR R4,[R5, #+0]
LDRB R7,[R1, #+1]
ANDS R0,R0,#0x700
RSBS R0,R0,#+1792
LSRS R0,R0,#+8
MOVS R6,#+4
SUBS R5,R6,R0
LDRB R6,[R1, #+2]
LSLS R2,R2,#+30
LSRS R2,R2,#+27
MOVS R3,#+255
LSLS R3,R3,R2
LSLS R7,R7,R5
MOVS R5,R7
MOVS R7,#+15
LSRS R7,R7,R0
ANDS R7,R7,R6
ORRS R7,R7,R5
LSLS R0,R7,#+4
LSLS R0,R0,R2
// 147
// 148 /* Enable the Selected IRQ Channels --------------------------------------*/
// 149 NVIC->ISER[(NVIC_InitStruct->NVIC_IRQChannel >> 0x05)] =
// 150 (u32)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (u8)0x1F);
LDR.N R2,??NVIC_Init_1 ;; 0xffffffffe000e100
MOV R5,R12
BICS R4,R4,R3
ANDS R3,R3,R0
ORRS R3,R3,R4
STR R3,[R5, #+0]
LDRB R0,[R1, #+0]
MOVS R3,#+1
ASRS R1,R0,#+5
LSLS R0,R0,#+27
LSRS R0,R0,#+27
LSLS R3,R3,R0
STR R3,[R2, R1, LSL #+2]
POP {R4-R7,PC}
// 151 }
// 152 else
// 153 {
// 154 /* Disable the Selected IRQ Channels -------------------------------------*/
// 155 NVIC->ICER[(NVIC_InitStruct->NVIC_IRQChannel >> 0x05)] =
// 156 (u32)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (u8)0x1F);
??NVIC_Init_0:
LDR.N R1,??DataTable17 ;; 0xffffffffe000e180
ASRS R0,R2,#+5
MOVS R3,#+1
LSLS R2,R2,#+27
LSRS R2,R2,#+27
LSLS R3,R3,R2
STR R3,[R1, R0, LSL #+2]
// 157 }
// 158 }
POP {R4-R7,PC} ;; return
DATA
??NVIC_Init_1:
DC32 0xffffffffe000e100
CFI EndBlock cfiBlock3
RSEG CODE:CODE:NOROOT(2)
DATA
??DataTable16:
DC32 0xffffffffe000e400
RSEG CODE:CODE:NOROOT(2)
DATA
??DataTable17:
DC32 0xffffffffe000e180
// 159
// 160 /*******************************************************************************
// 161 * Function Name : NVIC_StructInit
// 162 * Description : Fills each NVIC_InitStruct member with its default value.
// 163 * Input : - NVIC_InitStruct: pointer to a NVIC_InitTypeDef structure which
// 164 * will be initialized.
// 165 * Output : None
// 166 * Return : None
// 167 *******************************************************************************/
RSEG CODE:CODE:NOROOT(2)
CFI Block cfiBlock4 Using cfiCommon0
CFI Function NVIC_StructInit
THUMB
// 168 void NVIC_StructInit(NVIC_InitTypeDef* NVIC_InitStruct)
// 169 {
// 170 /* NVIC_InitStruct members default value */
// 171 NVIC_InitStruct->NVIC_IRQChannel = 0x00;
NVIC_StructInit:
MOVS R1,#+0
STRB R1,[R0, #+0]
// 172 NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority = 0x00;
STRB R1,[R0, #+1]
// 173 NVIC_InitStruct->NVIC_IRQChannelSubPriority = 0x00;
STRB R1,[R0, #+2]
// 174 NVIC_InitStruct->NVIC_IRQChannelCmd = DISABLE;
STRB R1,[R0, #+3]
// 175 }
BX LR ;; return
CFI EndBlock cfiBlock4
// 176
// 177 /*******************************************************************************
// 178 * Function Name : NVIC_SETPRIMASK
// 179 * Description : Enables the PRIMASK priority: Raises the execution priority to 0.
// 180 * Input : None
// 181 * Output : None
// 182 * Return : None
// 183 *******************************************************************************/
RSEG CODE:CODE:NOROOT(2)
CFI Block cfiBlock5 Using cfiCommon0
CFI Function NVIC_SETPRIMASK
THUMB
// 184 void NVIC_SETPRIMASK(void)
// 185 {
// 186 __SETPRIMASK();
NVIC_SETPRIMASK:
_BF.W __SETPRIMASK,??__SETPRIMASK??rT
CFI EndBlock cfiBlock5
// 187 }
// 188
// 189 /*******************************************************************************
// 190 * Function Name : NVIC_RESETPRIMASK
// 191 * Description : Disables the PRIMASK priority.
// 192 * Input : None
// 193 * Output : None
// 194 * Return : None
// 195 *******************************************************************************/
RSEG CODE:CODE:NOROOT(2)
CFI Block cfiBlock6 Using cfiCommon0
CFI Function NVIC_RESETPRIMASK
THUMB
// 196 void NVIC_RESETPRIMASK(void)
// 197 {
// 198 __RESETPRIMASK();
NVIC_RESETPRIMASK:
_BF.W __RESETPRIMASK,??__RESETPRIMASK??rT
CFI EndBlock cfiBlock6
// 199 }
// 200
// 201 /*******************************************************************************
// 202 * Function Name : NVIC_SETFAULTMASK
// 203 * Description : Enables the FAULTMASK priority: Raises the execution priority to -1.
// 204 * Input : None
// 205 * Output : None
// 206 * Return : None
// 207 *******************************************************************************/
RSEG CODE:CODE:NOROOT(2)
CFI Block cfiBlock7 Using cfiCommon0
CFI Function NVIC_SETFAULTMASK
THUMB
// 208 void NVIC_SETFAULTMASK(void)
// 209 {
// 210 __SETFAULTMASK();
NVIC_SETFAULTMASK:
_BF.W __SETFAULTMASK,??__SETFAULTMASK??rT
CFI EndBlock cfiBlock7
// 211 }
// 212
// 213 /*******************************************************************************
// 214 * Function Name : NVIC_RESETFAULTMASK
// 215 * Description : Disables the FAULTMASK priority.
// 216 * Input : None
// 217 * Output : None
// 218 * Return : None
// 219 *******************************************************************************/
RSEG CODE:CODE:NOROOT(2)
CFI Block cfiBlock8 Using cfiCommon0
CFI Function NVIC_RESETFAULTMASK
THUMB
// 220 void NVIC_RESETFAULTMASK(void)
// 221 {
// 222 __RESETFAULTMASK();
NVIC_RESETFAULTMASK:
_BF.W __RESETFAULTMASK,??__RESETFAULTMASK??rT
CFI EndBlock cfiBlock8
// 223 }
// 224
// 225 /*******************************************************************************
// 226 * Function Name : NVIC_BASEPRICONFIG
// 227 * Description : The execution priority can be changed from 15 (lowest
// 228 configurable priority) to 1. Writing a zero value will disable
// 229 * the mask of execution priority.
// 230 * Input : None
// 231 * Output : None
// 232 * Return : None
// 233 *******************************************************************************/
RSEG CODE:CODE:NOROOT(2)
CFI Block cfiBlock9 Using cfiCommon0
CFI Function NVIC_BASEPRICONFIG
THUMB
// 234 void NVIC_BASEPRICONFIG(u32 NewPriority)
// 235 {
// 236 /* Check the parameters */
// 237 assert_param(IS_NVIC_BASE_PRI(NewPriority));
// 238
// 239 __BASEPRICONFIG(NewPriority << 0x04);
NVIC_BASEPRICONFIG:
LSLS R0,R0,#+4
_BF.W __BASEPRICONFIG,??__BASEPRICONFIG??rT
CFI EndBlock cfiBlock9
// 240 }
// 241
// 242 /*******************************************************************************
// 243 * Function Name : NVIC_GetBASEPRI
// 244 * Description : Returns the BASEPRI mask value.
// 245 * Input : None
// 246 * Output : None
// 247 * Return : BASEPRI register value
// 248 *******************************************************************************/
RSEG CODE:CODE:NOROOT(2)
CFI Block cfiBlock10 Using cfiCommon0
CFI Function NVIC_GetBASEPRI
THUMB
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -