📄 stm32f10x_nvic.lst
字号:
\ 00000016 9143 BICS R1,R1,R2
\ 00000018 0160 STR R1,[R0, #+0]
489 }
490 }
\ 0000001A 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 segment CODE, align 4, keep-with-next
512 void NVIC_SystemHandlerPriorityConfig(u32 SystemHandler, u8 SystemHandlerPreemptionPriority,
513 u8 SystemHandlerSubPriority)
514 {
\ NVIC_SystemHandlerPriorityConfig:
\ 00000000 F0B5 PUSH {R4-R7,LR}
515 u32 tmp1 = 0x00, tmp2 = 0xFF, handlermask = 0x00;
516 u32 tmppriority = 0x00;
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;
\ 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
524 tmp1 = (0x4 - tmppriority);
525 tmp2 = tmp2 >> tmppriority;
526
527 tmppriority = (u32)SystemHandlerPreemptionPriority << tmp1;
528 tmppriority |= SystemHandlerSubPriority & tmp2;
529
530 tmppriority = tmppriority << 0x04;
531 tmp1 = SystemHandler & (u32)0xC0;
532 tmp1 = tmp1 >> 0x06;
\ 00000010 10F0C004 ANDS R4,R0,#0xC0
\ 00000014 2500 MOVS R5,R4
\ 00000016 AD09 LSRS R5,R5,#+6
533 tmp2 = (SystemHandler >> 0x08) & (u32)0x03;
\ 00000018 000A LSRS R0,R0,#+8
\ 0000001A 8007 LSLS R0,R0,#+30
\ 0000001C 800F LSRS R0,R0,#+30
534 tmppriority = tmppriority << (tmp2 * 0x08);
535 handlermask = (u32)0xFF << (tmp2 * 0x08);
536
537 SCB->SHPR[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]
538 SCB->SHPR[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]
539 }
\ 0000004A F0BD POP {R4-R7,PC} ;; 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 segment CODE, align 4, keep-with-next
554 ITStatus NVIC_GetSystemHandlerPendingBitStatus(u32 SystemHandler)
555 {
556 ITStatus bitstatus = RESET;
557 u32 tmp = 0x00, tmppos = 0x00;
558
559 /* Check the parameters */
560 assert_param(IS_GET_PENDING_SYSTEM_HANDLER(SystemHandler));
561
562 tmppos = (SystemHandler >> 0x0A);
563 tmppos &= (u32)0x0F;
564
565 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
566
567 tmp = SCB->SHCSR & tmppos;
\ 0000000A .... LDR.N R0,??DataTable32 ;; 0xffffffffe000ed24
\ 0000000C 0068 LDR R0,[R0, #+0]
\ 0000000E 0840 ANDS R0,R0,R1
568
569 if (tmp == tmppos)
\ 00000010 8842 CMP R0,R1
\ 00000012 01D1 BNE.N ??NVIC_GetSystemHandlerPendingBitStatus_0
570 {
571 bitstatus = SET;
\ 00000014 0120 MOVS R0,#+1
\ 00000016 7047 BX LR
572 }
573 else
574 {
575 bitstatus = RESET;
\ ??NVIC_GetSystemHandlerPendingBitStatus_0:
\ 00000018 0020 MOVS R0,#+0
576 }
577 return bitstatus;
\ 0000001A 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 handler pending bit
584 * to be set.
585 * This parameter can be one of the following values:
586 * - SystemHandler_NMI
587 * - SystemHandler_PSV
588 * - SystemHandler_SysTick
589 * Output : None
590 * Return : None
591 *******************************************************************************/
\ In segment CODE, align 4, keep-with-next
592 void NVIC_SetSystemHandlerPendingBit(u32 SystemHandler)
593 {
594 u32 tmp = 0x00;
595
596 /* Check the parameters */
597 assert_param(IS_SET_PENDING_SYSTEM_HANDLER(SystemHandler));
598
599 /* Get the System Handler pending bit position */
600 tmp = SystemHandler & (u32)0x1F;
601 /* Set the corresponding System Handler pending bit */
602 SCB->ICSR |= ((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]
603 }
\ 00000010 7047 BX LR ;; return
604
605 /*******************************************************************************
606 * Function Name : NVIC_ClearSystemHandlerPendingBit
607 * Description : Clears System Handler pending bit.
608 * Input : - SystemHandler: specifies the system handler pending bit to
609 * be clear.
610 * This parameter can be one of the following values:
611 * - SystemHandler_PSV
612 * - SystemHandler_SysTick
613 * Output : None
614 * Return : None
615 *******************************************************************************/
\ In segment CODE, align 4, keep-with-next
616 void NVIC_ClearSystemHandlerPendingBit(u32 SystemHandler)
617 {
618 u32 tmp = 0x00;
619
620 /* Check the parameters */
621 assert_param(IS_CLEAR_SYSTEM_HANDLER(SystemHandler));
622
623 /* Get the System Handler pending bit position */
624 tmp = SystemHandler & (u32)0x1F;
625 /* Clear the corresponding System Handler pending bit */
626 SCB->ICSR |= ((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,[R
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -