📄 stm32f10x_nvic.lst
字号:
\ ??NVIC_SystemHandlerConfig_0:
\ 00000016 9143 BICS R1,R1,R2
\ 00000018 0160 STR R1,[R0, #+0]
491 }
492 }
\ 0000001A 7047 BX LR ;; return
493
494 /*******************************************************************************
495 * Function Name : NVIC_SystemHandlerPriorityConfig
496 * Description : Configures the specified System Handlers priority.
497 * Input : - SystemHandler: specifies the system handler to be
498 * enabled or disabled.
499 * This parameter can be one of the following values:
500 * - SystemHandler_MemoryManage
501 * - SystemHandler_BusFault
502 * - SystemHandler_UsageFault
503 * - SystemHandler_SVCall
504 * - SystemHandler_DebugMonitor
505 * - SystemHandler_PSV
506 * - SystemHandler_SysTick
507 * - SystemHandlerPreemptionPriority: new priority group of the
508 * specified system handlers.
509 * - SystemHandlerSubPriority: new sub priority of the specified
510 * system handlers.
511 * Output : None
512 * Return : None
513 *******************************************************************************/
\ In segment CODE, align 4, keep-with-next
514 void NVIC_SystemHandlerPriorityConfig(u32 SystemHandler, u8 SystemHandlerPreemptionPriority,
515 u8 SystemHandlerSubPriority)
516 {
\ NVIC_SystemHandlerPriorityConfig:
\ 00000000 F0B5 PUSH {R4-R7,LR}
517 u32 tmp1 = 0x00, tmp2 = 0xFF, handlermask = 0x00;
518 u32 tmppriority = 0x00;
519
520 /* Check the parameters */
521 assert(IS_PRIORITY_SYSTEM_HANDLER(SystemHandler));
522 assert(IS_NVIC_PREEMPTION_PRIORITY(SystemHandlerPreemptionPriority));
523 assert(IS_NVIC_SUB_PRIORITY(SystemHandlerSubPriority));
524
525 tmppriority = (0x700 - (SCB->AIRC & (u32)0x700))>> 0x08;
\ 00000002 .... LDR.N R3,??DataTable27 ;; 0xffffffffe000ed0c
\ 00000004 1B68 LDR R3,[R3, #+0]
\ 00000006 13F4E063 ANDS R3,R3,#0x700
\ 0000000A D3F5E063 RSBS R3,R3,#+1792
\ 0000000E 1B0A LSRS R3,R3,#+8
526 tmp1 = (0x4 - tmppriority);
527 tmp2 = tmp2 >> tmppriority;
528
529 tmppriority = (u32)SystemHandlerPreemptionPriority << tmp1;
530 tmppriority |= SystemHandlerSubPriority & tmp2;
531
532 tmppriority = tmppriority << 0x04;
533 tmp1 = SystemHandler & (u32)0xC0;
534 tmp1 = tmp1 >> 0x06;
\ 00000010 10F0C004 ANDS R4,R0,#0xC0
\ 00000014 2500 MOVS R5,R4
\ 00000016 AD09 LSRS R5,R5,#+6
535 tmp2 = (SystemHandler >> 0x08) & (u32)0x03;
\ 00000018 000A LSRS R0,R0,#+8
\ 0000001A 8007 LSLS R0,R0,#+30
\ 0000001C 800F LSRS R0,R0,#+30
536 tmppriority = tmppriority << (tmp2 * 0x08);
537 handlermask = (u32)0xFF << (tmp2 * 0x08);
538
539 SCB->SystemPriority[tmp1] &= ~handlermask;
\ 0000001E C400 LSLS R4,R0,#+3
\ 00000020 .... LDR.N R0,??DataTable28 ;; 0xffffffffe000ed18
\ 00000022 10EB8505 ADDS R5,R0,R5, LSL #+2
\ 00000026 2868 LDR R0,[R5, #+0]
\ 00000028 FF26 MOVS R6,#+255
\ 0000002A A640 LSLS R6,R6,R4
\ 0000002C B043 BICS R0,R0,R6
\ 0000002E 2860 STR R0,[R5, #+0]
540 SCB->SystemPriority[tmp1] |= tmppriority;
\ 00000030 2868 LDR R0,[R5, #+0]
\ 00000032 0426 MOVS R6,#+4
\ 00000034 1F00 MOVS R7,R3
\ 00000036 F61B SUBS R6,R6,R7
\ 00000038 B140 LSLS R1,R1,R6
\ 0000003A FF26 MOVS R6,#+255
\ 0000003C DE40 LSRS R6,R6,R3
\ 0000003E 1640 ANDS R6,R6,R2
\ 00000040 0E43 ORRS R6,R6,R1
\ 00000042 3101 LSLS R1,R6,#+4
\ 00000044 A140 LSLS R1,R1,R4
\ 00000046 0143 ORRS R1,R1,R0
\ 00000048 2960 STR R1,[R5, #+0]
541 }
\ 0000004A F0BD POP {R4-R7,PC} ;; return
542
543 /*******************************************************************************
544 * Function Name : NVIC_GetSystemHandlerPendingBitStatus
545 * Description : Checks whether the specified System handlers pending bit is
546 * set or not.
547 * Input : - SystemHandler: specifies the system handler pending bit to
548 * check.
549 * This parameter can be one of the following values:
550 * - SystemHandler_MemoryManage
551 * - SystemHandler_BusFault
552 * - SystemHandler_SVCall
553 * Output : None
554 * Return : The new state of System Handler pending bit(SET or RESET).
555 *******************************************************************************/
\ In segment CODE, align 4, keep-with-next
556 ITStatus NVIC_GetSystemHandlerPendingBitStatus(u32 SystemHandler)
557 {
558 ITStatus bitstatus = RESET;
559 u32 tmp = 0x00, tmppos = 0x00;
560
561 /* Check the parameters */
562 assert(IS_GET_PENDING_SYSTEM_HANDLER(SystemHandler));
563
564 tmppos = (SystemHandler >> 0x0A);
565 tmppos &= (u32)0x0F;
566
567 tmppos = (u32)0x01 << tmppos;
\ NVIC_GetSystemHandlerPendingBitStatus:
\ 00000000 0121 MOVS R1,#+1
\ 00000002 800A LSRS R0,R0,#+10
\ 00000004 0007 LSLS R0,R0,#+28
\ 00000006 000F LSRS R0,R0,#+28
\ 00000008 8140 LSLS R1,R1,R0
568
569 tmp = SCB->SysHandlerCtrl & tmppos;
\ 0000000A .... LDR.N R0,??DataTable32 ;; 0xffffffffe000ed24
\ 0000000C 0068 LDR R0,[R0, #+0]
\ 0000000E 0840 ANDS R0,R0,R1
570
571 if (tmp == tmppos)
\ 00000010 8842 CMP R0,R1
\ 00000012 01D1 BNE.N ??NVIC_GetSystemHandlerPendingBitStatus_0
572 {
573 bitstatus = SET;
\ 00000014 0120 MOVS R0,#+1
\ 00000016 7047 BX LR
574 }
575 else
576 {
577 bitstatus = RESET;
\ ??NVIC_GetSystemHandlerPendingBitStatus_0:
\ 00000018 0020 MOVS R0,#+0
578 }
579 return bitstatus;
\ 0000001A 7047 BX LR ;; return
580 }
581
582 /*******************************************************************************
583 * Function Name : NVIC_SetSystemHandlerPendingBit
584 * Description : Sets System Handler pending bit.
585 * Input : - SystemHandler: specifies the system handler pending bit
586 * to be set.
587 * This parameter can be one of the following values:
588 * - SystemHandler_NMI
589 * - SystemHandler_PSV
590 * - SystemHandler_SysTick
591 * Output : None
592 * Return : None
593 *******************************************************************************/
\ In segment CODE, align 4, keep-with-next
594 void NVIC_SetSystemHandlerPendingBit(u32 SystemHandler)
595 {
596 u32 tmp = 0x00;
597
598 /* Check the parameters */
599 assert(IS_SET_PENDING_SYSTEM_HANDLER(SystemHandler));
600
601 /* Get the System Handler pending bit position */
602 tmp = SystemHandler & (u32)0x1F;
603 /* Set the corresponding System Handler pending bit */
604 SCB->IRQControlState |= ((u32)0x01 << tmp);
\ NVIC_SetSystemHandlerPendingBit:
\ 00000000 .... LDR.N R1,??DataTable31 ;; 0xffffffffe000ed04
\ 00000002 0A68 LDR R2,[R1, #+0]
\ 00000004 0123 MOVS R3,#+1
\ 00000006 C006 LSLS R0,R0,#+27
\ 00000008 C00E LSRS R0,R0,#+27
\ 0000000A 8340 LSLS R3,R3,R0
\ 0000000C 1343 ORRS R3,R3,R2
\ 0000000E 0B60 STR R3,[R1, #+0]
605 }
\ 00000010 7047 BX LR ;; return
606
607 /*******************************************************************************
608 * Function Name : NVIC_ClearSystemHandlerPendingBit
609 * Description : Clears System Handler pending bit.
610 * Input : - SystemHandler: specifies the system handler pending bit to
611 * be clear.
612 * This parameter can be one of the following values:
613 * - SystemHandler_PSV
614 * - SystemHandler_SysTick
615 * Output : None
616 * Return : None
617 *******************************************************************************/
\ In segment CODE, align 4, keep-with-next
618 void NVIC_ClearSystemHandlerPendingBit(u32 SystemHandler)
619 {
620 u32 tmp = 0x00;
621
622 /* Check the parameters */
623 assert(IS_CLEAR_SYSTEM_HANDLER(SystemHandler));
624
625 /* Get the System Handler pending bit position */
626 tmp = SystemHandler & (u32)0x1F;
627 /* Clear the corresponding System Handler pending bit */
628 SCB->IRQControlState |= ((u32)0x01 << (tmp - 0x01));
\ NVIC_ClearSystemHandlerPendingBit:
\ 00000000 .... LDR.N R1,??DataTable31 ;; 0xffffffffe000ed04
\ 00000002 0A68 LDR R2,[R1, #+0]
\ 00000004 0123 MOVS R3,#+1
\ 00000006 C006 LSLS R0,R0,#+27
\ 00000008 C00E LSRS R0,R0,#+27
\ 0000000A 401E SUBS R0,R0,#+1
\ 0000000C 8340 LSLS R3,R3,R0
\ 0000000E 1343 ORRS R3,R3,R2
\ 00000010 0B60 STR R3,[R1, #+0]
629
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -