📄 stm32f10x_nvic.s79
字号:
RSEG CODE:CODE:NOROOT(2)
CFI Block cfiBlock20 Using cfiCommon0
CFI Function NVIC_GenerateCoreReset
THUMB
// 421 void NVIC_GenerateCoreReset(void)
// 422 {
// 423 SCB->AIRCR = AIRCR_VECTKEY_MASK | (u32)0x01;
NVIC_GenerateCoreReset:
LDR.N R0,??DataTable26 ;; 0xffffffffe000ed0c
LDR.N R1,??NVIC_GenerateCoreReset_0 ;; 0x5fa0001
STR R1,[R0, #+0]
// 424 }
BX LR ;; return
DATA
??NVIC_GenerateCoreReset_0:
DC32 0x5fa0001
CFI EndBlock cfiBlock20
// 425
// 426 /*******************************************************************************
// 427 * Function Name : NVIC_SystemLPConfig
// 428 * Description : Selects the condition for the system to enter low power mode.
// 429 * Input : - LowPowerMode: Specifies the new mode for the system to enter
// 430 * low power mode.
// 431 * This parameter can be one of the following values:
// 432 * - NVIC_LP_SEVONPEND
// 433 * - NVIC_LP_SLEEPDEEP
// 434 * - NVIC_LP_SLEEPONEXIT
// 435 * - NewState: new state of LP condition.
// 436 * This parameter can be: ENABLE or DISABLE.
// 437 * Output : None
// 438 * Return : None
// 439 *******************************************************************************/
RSEG CODE:CODE:NOROOT(2)
CFI Block cfiBlock21 Using cfiCommon0
CFI Function NVIC_SystemLPConfig
THUMB
// 440 void NVIC_SystemLPConfig(u8 LowPowerMode, FunctionalState NewState)
// 441 {
// 442 /* Check the parameters */
// 443 assert_param(IS_NVIC_LP(LowPowerMode));
// 444 assert_param(IS_FUNCTIONAL_STATE(NewState));
// 445
// 446 if (NewState != DISABLE)
NVIC_SystemLPConfig:
LDR.N R2,??DataTable24 ;; 0xffffffffe000ed10
CMP R1,#+0
LDR R1,[R2, #+0]
ITTT NE
// 447 {
// 448 SCB->SCR |= LowPowerMode;
ORRNE R0,R0,R1
STRNE R0,[R2, #+0]
BXNE LR
// 449 }
// 450 else
// 451 {
// 452 SCB->SCR &= (u32)(~(u32)LowPowerMode);
BICS R1,R1,R0
STR R1,[R2, #+0]
// 453 }
// 454 }
BX LR ;; return
CFI EndBlock cfiBlock21
RSEG CODE:CODE:NOROOT(2)
DATA
??DataTable24:
DC32 0xffffffffe000ed10
// 455
// 456 /*******************************************************************************
// 457 * Function Name : NVIC_SystemHandlerConfig
// 458 * Description : Enables or disables the specified System Handlers.
// 459 * Input : - SystemHandler: specifies the system handler to be enabled
// 460 * or disabled.
// 461 * This parameter can be one of the following values:
// 462 * - SystemHandler_MemoryManage
// 463 * - SystemHandler_BusFault
// 464 * - SystemHandler_UsageFault
// 465 * - NewState: new state of specified System Handlers.
// 466 * This parameter can be: ENABLE or DISABLE.
// 467 * Output : None
// 468 * Return : None
// 469 *******************************************************************************/
RSEG CODE:CODE:NOROOT(2)
CFI Block cfiBlock22 Using cfiCommon0
CFI Function NVIC_SystemHandlerConfig
THUMB
// 470 void NVIC_SystemHandlerConfig(u32 SystemHandler, FunctionalState NewState)
// 471 {
// 472 u32 tmpreg = 0x00;
// 473
// 474 /* Check the parameters */
// 475 assert_param(IS_CONFIG_SYSTEM_HANDLER(SystemHandler));
// 476 assert_param(IS_FUNCTIONAL_STATE(NewState));
// 477
// 478 tmpreg = (u32)0x01 << (SystemHandler & (u32)0x1F);
NVIC_SystemHandlerConfig:
MOVS R2,#+1
LSLS R0,R0,#+27
LSRS R0,R0,#+27
LSLS R2,R2,R0
// 479
// 480 if (NewState != DISABLE)
LDR.N R0,??DataTable31 ;; 0xffffffffe000ed24
CMP R1,#+0
LDR R1,[R0, #+0]
ITTT NE
// 481 {
// 482 SCB->SHCSR |= tmpreg;
ORRNE R2,R2,R1
STRNE R2,[R0, #+0]
BXNE LR
// 483 }
// 484 else
// 485 {
// 486 SCB->SHCSR &= ~tmpreg;
BICS R1,R1,R2
STR R1,[R0, #+0]
// 487 }
// 488 }
BX LR ;; return
CFI EndBlock cfiBlock22
// 489
// 490 /*******************************************************************************
// 491 * Function Name : NVIC_SystemHandlerPriorityConfig
// 492 * Description : Configures the specified System Handlers priority.
// 493 * Input : - SystemHandler: specifies the system handler to be
// 494 * enabled or disabled.
// 495 * This parameter can be one of the following values:
// 496 * - SystemHandler_MemoryManage
// 497 * - SystemHandler_BusFault
// 498 * - SystemHandler_UsageFault
// 499 * - SystemHandler_SVCall
// 500 * - SystemHandler_DebugMonitor
// 501 * - SystemHandler_PSV
// 502 * - SystemHandler_SysTick
// 503 * - SystemHandlerPreemptionPriority: new priority group of the
// 504 * specified system handlers.
// 505 * - SystemHandlerSubPriority: new sub priority of the specified
// 506 * system handlers.
// 507 * Output : None
// 508 * Return : None
// 509 *******************************************************************************/
RSEG CODE:CODE:NOROOT(2)
CFI Block cfiBlock23 Using cfiCommon0
CFI Function NVIC_SystemHandlerPriorityConfig
THUMB
// 510 void NVIC_SystemHandlerPriorityConfig(u32 SystemHandler, u8 SystemHandlerPreemptionPriority,
// 511 u8 SystemHandlerSubPriority)
// 512 {
// 513 u32 tmp1 = 0x00, tmp2 = 0xFF, handlermask = 0x00;
// 514 u32 tmppriority = 0x00;
// 515
// 516 /* Check the parameters */
// 517 assert_param(IS_PRIORITY_SYSTEM_HANDLER(SystemHandler));
// 518 assert_param(IS_NVIC_PREEMPTION_PRIORITY(SystemHandlerPreemptionPriority));
// 519 assert_param(IS_NVIC_SUB_PRIORITY(SystemHandlerSubPriority));
// 520
// 521 tmppriority = (0x700 - (SCB->AIRCR & (u32)0x700))>> 0x08;
NVIC_SystemHandlerPriorityConfig:
LDR.N R3,??DataTable26 ;; 0xffffffffe000ed0c
PUSH {R4-R6,LR}
CFI ?RET Frame(CFA, -4)
CFI R6 Frame(CFA, -8)
CFI R5 Frame(CFA, -12)
CFI R4 Frame(CFA, -16)
CFI CFA R13+16
// 522 tmp1 = (0x4 - tmppriority);
// 523 tmp2 = tmp2 >> tmppriority;
// 524
// 525 tmppriority = (u32)SystemHandlerPreemptionPriority << tmp1;
// 526 tmppriority |= SystemHandlerSubPriority & tmp2;
// 527
// 528 tmppriority = tmppriority << 0x04;
// 529 tmp1 = SystemHandler & (u32)0xC0;
// 530 tmp1 = tmp1 >> 0x06;
ANDS R4,R0,#0xC0
LDR R3,[R3, #+0]
LSRS R5,R4,#+6
// 531 tmp2 = (SystemHandler >> 0x08) & (u32)0x03;
LSLS R0,R0,#+22
LSRS R0,R0,#+30
// 532 tmppriority = tmppriority << (tmp2 * 0x08);
// 533 handlermask = (u32)0xFF << (tmp2 * 0x08);
// 534
// 535 SCB->SHPR[tmp1] &= ~handlermask;
LSLS R4,R0,#+3
LDR.N R0,??DataTable27 ;; 0xffffffffe000ed18
MOVS R6,#+255
LSLS R6,R6,R4
ADDS R5,R0,R5, LSL #+2
LDR R0,[R5, #+0]
ANDS R3,R3,#0x700
RSBS R3,R3,#+1792
BICS R0,R0,R6
STR R0,[R5, #+0]
// 536 SCB->SHPR[tmp1] |= tmppriority;
LDR R0,[R5, #+0]
LSRS R3,R3,#+8
MOVS R6,#+4
SUBS R6,R6,R3
LSLS R1,R1,R6
MOVS R6,#+255
LSRS R6,R6,R3
ANDS R6,R6,R2
ORRS R6,R6,R1
LSLS R1,R6,#+4
LSLS R1,R1,R4
ORRS R1,R1,R0
STR R1,[R5, #+0]
// 537 }
POP {R4-R6,PC}
CFI EndBlock cfiBlock23
RSEG CODE:CODE:NOROOT(2)
DATA
??DataTable26:
DC32 0xffffffffe000ed0c
RSEG CODE:CODE:NOROOT(2)
DATA
??DataTable27:
DC32 0xffffffffe000ed18
// 538
// 539 /*******************************************************************************
// 540 * Function Name : NVIC_GetSystemHandlerPendingBitStatus
// 541 * Description : Checks whether the specified System handlers pending bit is
// 542 * set or not.
// 543 * Input : - SystemHandler: specifies the system handler pending bit to
// 544 * check.
// 545 * This parameter can be one of the following values:
// 546 * - SystemHandler_MemoryManage
// 547 * - SystemHandler_BusFault
// 548 * - SystemHandler_SVCall
// 549 * Output : None
// 550 * Return : The new state of System Handler pending bit(SET or RESET).
// 551 *******************************************************************************/
RSEG CODE:CODE:NOROOT(2)
CFI Block cfiBlock24 Using cfiCommon0
CFI Function NVIC_GetSystemHandlerPendingBitStatus
THUMB
// 552 ITStatus NVIC_GetSystemHandlerPendingBitStatus(u32 SystemHandler)
// 553 {
// 554 ITStatus bitstatus = RESET;
// 555 u32 tmp = 0x00, tmppos = 0x00;
// 556
// 557 /* Check the parameters */
// 558 assert_param(IS_GET_PENDING_SYSTEM_HANDLER(SystemHandler));
// 559
// 560 tmppos = (SystemHandler >> 0x0A);
// 561 tmppos &= (u32)0x0F;
// 562
// 563 tmppos = (u32)0x01 << tmppos;
NVIC_GetSystemHandlerPendingBitStatus:
MOVS R1,#+1
LSLS R0,R0,#+18
LSRS R0,R0,#+28
LSLS R1,R1,R0
// 564
// 565 tmp = SCB->SHCSR & tmppos;
LDR.N R0,??DataTable31 ;; 0xffffffffe000ed24
LDR R0,[R0, #+0]
ANDS R0,R0,R1
// 566
// 567 if (tmp == tmppos)
CMP R0,R1
ITT EQ
// 568 {
// 569 bitstatus = SET;
MOVEQ R0,#+1
BXEQ LR
// 570 }
// 571 else
// 572 {
// 573 bitstatus = RESET;
MOVS R0,#+0
// 574 }
// 575 return bitstatus;
BX LR ;; return
CFI EndBlock cfiBlock24
// 576 }
// 577
// 578 /*******************************************************************************
// 579 * Function Name : NVIC_SetSystemHandlerPendingBit
// 580 * Description : Sets System Handler pending bit.
// 581 * Input : - SystemHandler: specifies the system handler pending bit
// 582 * to be set.
// 583 * This parameter can be one of the following values:
// 584 * - SystemHandler_NMI
// 585 * - SystemHandler_PSV
// 586 * - SystemHandler_SysTick
// 587 * Output : None
// 588 * Return : None
// 589 *******************************************************************************/
RSEG CODE:CODE:NOROOT(2)
CFI Block cfiBlock25 Using cfiCommon0
CFI Function NVIC_SetSystemHandlerPendingBit
THUMB
// 590 void NVIC_SetSystemHandlerPendingBit(u32 SystemHandler)
// 591 {
// 592 u32 tmp = 0x00;
// 593
// 594 /* Check the parameters */
// 595 assert_param(IS_SET_PENDING_SYSTEM_HANDLER(SystemHandler));
// 596
// 597 /* Get the System Handler pending bit position */
// 598 tmp = SystemHandler & (u32)0x1F;
// 599 /* Set the corresponding System Handler pending bit */
// 600 SCB->ICSR |= ((u32)0x01 << tmp);
NVIC_SetSystemHandlerPendingBit:
LDR.N R1,??DataTable30 ;; 0xffffffffe000ed04
MOVS R3,#+1
LSLS R0,R0,#+27
LDR R2,[R1, #+0]
LSRS R0,R0,#+27
B.N ?Subroutine0
CFI EndBlock cfiBlock25
// 601 }
// 602
// 603 /*******************************************************************************
// 604 * Function Name : NVIC_ClearSystemHandlerPendingBit
// 605 * Description : Clears System Handler pending bit.
// 606 * Input : - SystemHandler: specifies the system handler pending bit to
// 607 * be clear.
// 608 * This parameter can be one of the following values:
// 609 * - SystemHandler_PSV
// 610 * - SystemHandler_SysTick
// 611 * Output : None
// 612 * Return : None
// 613 *******************************************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -