📄 stm32f10x_nvic.lst
字号:
640 * Output : None
641 * Return : The new state of System Handler active bit(SET or RESET).
642 *******************************************************************************/
643 ITStatus NVIC_GetSystemHandlerActiveBitStatus(u32 SystemHandler)
644 {
645 ITStatus bitstatus = RESET;
646
647 u32 tmp = 0x00, tmppos = 0x00;
648
649 /* Check the parameters */
650 assert_param(IS_GET_ACTIVE_SYSTEM_HANDLER(SystemHandler));
651
652 tmppos = (SystemHandler >> 0x0E) & (u32)0x0F;
653
654 tmppos = (u32)0x01 << tmppos;
655
656 tmp = SCB->SHCSR & tmppos;
657
658 if (tmp == tmppos)
659 {
660 bitstatus = SET;
661 }
662 else
663 {
664 bitstatus = RESET;
665 }
666 return bitstatus;
667 }
668
669 /*******************************************************************************
670 * Function Name : NVIC_GetFaultHandlerSources
671 * Description : Returns the system fault handlers sources.
672 * Input : - SystemHandler: specifies the system handler to get its fault
673 * sources.
674 * This parameter can be one of the following values:
675 * - SystemHandler_HardFault
676 * - SystemHandler_MemoryManage
677 * - SystemHandler_BusFault
678 * - SystemHandler_UsageFault
679 * - SystemHandler_DebugMonitor
680 * Output : None
681 * Return : Source of the fault handler.
682 *******************************************************************************/
683 u32 NVIC_GetFaultHandlerSources(u32 SystemHandler)
684 {
685 u32 faultsources = 0x00;
686 u32 tmpreg = 0x00, tmppos = 0x00;
687
688 /* Check the parameters */
689 assert_param(IS_FAULT_SOURCE_SYSTEM_HANDLER(SystemHandler));
690
691 tmpreg = (SystemHandler >> 0x12) & (u32)0x03;
692 tmppos = (SystemHandler >> 0x14) & (u32)0x03;
693
694 if (tmpreg == 0x00)
695 {
696 faultsources = SCB->HFSR;
697 }
698 else if (tmpreg == 0x01)
699 {
700 faultsources = SCB->CFSR >> (tmppos * 0x08);
701 if (tmppos != 0x02)
702 {
703 faultsources &= (u32)0x0F;
704 }
705 else
706 {
707 faultsources &= (u32)0xFF;
708 }
709 }
710 else
711 {
712 faultsources = SCB->DFSR;
713 }
714 return faultsources;
715 }
716
717 /*******************************************************************************
718 * Function Name : NVIC_GetFaultAddress
719 * Description : Returns the address of the location that generated a fault
720 * handler.
721 * Input : - SystemHandler: specifies the system handler to get its
722 * fault address.
723 * This parameter can be one of the following values:
724 * - SystemHandler_MemoryManage
725 * - SystemHandler_BusFault
726 * Output : None
727 * Return : Fault address.
728 *******************************************************************************/
729 u32 NVIC_GetFaultAddress(u32 SystemHandler)
730 {
731 u32 faultaddress = 0x00;
732 u32 tmp = 0x00;
733
734 /* Check the parameters */
735 assert_param(IS_FAULT_ADDRESS_SYSTEM_HANDLER(SystemHandler));
736
737 tmp = (SystemHandler >> 0x16) & (u32)0x01;
738
739 if (tmp == 0x00)
740 {
741 faultaddress = SCB->MMFAR;
742 }
743 else
744 {
745 faultaddress = SCB->BFAR;
746 }
747 return faultaddress;
748 }
749
750 /******************* (C) COPYRIGHT 2007 STMicroelectronics *****END OF FILE****/
Maximum stack usage in bytes:
Function .cstack
-------- -------
NVIC_BASEPRICONFIG 8
NVIC_ClearIRQChannelPendingBit 8
NVIC_ClearSystemHandlerPendingBit
8
NVIC_DeInit 0
NVIC_GenerateCoreReset 0
NVIC_GenerateSystemReset 0
NVIC_GetBASEPRI 8
NVIC_GetCPUID 0
NVIC_GetCurrentActiveHandler 0
NVIC_GetCurrentPendingIRQChannel
0
NVIC_GetFaultAddress 8
NVIC_GetFaultHandlerSources 16
NVIC_GetIRQChannelActiveBitStatus
8
NVIC_GetIRQChannelPendingBitStatus
8
NVIC_GetSystemHandlerActiveBitStatus
8
NVIC_GetSystemHandlerPendingBitStatus
8
NVIC_Init 24
NVIC_PriorityGroupConfig 0
NVIC_RESETFAULTMASK 8
NVIC_RESETPRIMASK 8
NVIC_SCBDeInit 0
NVIC_SETFAULTMASK 8
NVIC_SETPRIMASK 8
NVIC_SetIRQChannelPendingBit 0
NVIC_SetSystemHandlerPendingBit
0
NVIC_SetVectorTable 0
NVIC_StructInit 0
NVIC_SystemHandlerConfig 8
NVIC_SystemHandlerPriorityConfig
24
NVIC_SystemLPConfig 0
Section sizes:
Function/Label Bytes
-------------- -----
NVIC_DeInit 68
NVIC_SCBDeInit 96
NVIC_PriorityGroupConfig 10
NVIC_Init 196
NVIC_StructInit 18
NVIC_SETPRIMASK 10
NVIC_RESETPRIMASK 10
NVIC_SETFAULTMASK 10
NVIC_RESETFAULTMASK 10
NVIC_BASEPRICONFIG 12
NVIC_GetBASEPRI 10
NVIC_GetCurrentPendingIRQChannel
20
NVIC_GetIRQChannelPendingBitStatus
64
NVIC_SetIRQChannelPendingBit 12
NVIC_ClearIRQChannelPendingBit 28
NVIC_GetCurrentActiveHandler 10
NVIC_GetIRQChannelActiveBitStatus
64
NVIC_GetCPUID 12
NVIC_SetVectorTable 16
NVIC_GenerateSystemReset 12
NVIC_GenerateCoreReset 12
NVIC_SystemLPConfig 34
NVIC_SystemHandlerConfig 52
NVIC_SystemHandlerPriorityConfig
152
NVIC_GetSystemHandlerPendingBitStatus
64
NVIC_SetSystemHandlerPendingBit
32
NVIC_ClearSystemHandlerPendingBit
40
NVIC_GetSystemHandlerActiveBitStatus
64
NVIC_GetFaultHandlerSources 100
NVIC_GetFaultAddress 52
??DataTable8 4
??DataTable10 4
??DataTable11 4
??DataTable12 4
??DataTable13 4
??DataTable17 4
??DataTable18 4
??DataTable20 4
??DataTable21 4
??DataTable22 4
??DataTable24 4
??DataTable28 4
??DataTable32 4
1 342 bytes in section .text
1 342 bytes of CODE memory
Errors: none
Warnings: none
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -