⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bsp_int.txt

📁 stm32 ucos 精简移殖版本 不需作任何修改直接便可运行。包含串口 定时器
💻 TXT
📖 第 1 页 / 共 2 页
字号:
; generated by ARM/Thumb C/C++ Compiler with , RVCT3.1 [Build 919] for uVision
; commandline ArmCC [--debug -c --asm --interleave -o.\output\bsp_int.o --depend=.\output\bsp_int.d --device=DARMSTM --apcs=interwork -O1 -I. -I..\BSP -I..\..\..\..\..\uCOS-II\Ports\arm-cortex-m3\Generic\RealView -I..\..\..\..\..\uCOS-II\Source -I..\..\..\..\..\CPU\ST\STM32\inc -I..\..\..\..\..\uC-CPU -I..\..\..\..\..\uC-CPU\Arm-Cortex-M3\RealView -I..\..\..\..\..\uC-LIB -IC:\Keil\ARM\INC\ST\STM32F10x --omf_browse=.\output\bsp_int.crf ..\BSP\bsp_int.c]
                          THUMB

                          AREA ||.text||, CODE, READONLY, ALIGN=2

                  BSP_IntClr PROC
;;;114    
;;;115    }
000000  4770              BX       lr
;;;116    
                          ENDP

                  BSP_IntDis PROC
;;;135    {
;;;136        if (int_id < BSP_INT_SRC_NBR) {
000002  282a              CMP      r0,#0x2a
000004  d203              BCS      |L1.14|
;;;137            CPU_IntSrcDis(int_id + 16);
000006  3010              ADDS     r0,r0,#0x10
000008  b2c0              UXTB     r0,r0
00000a  f7fff7ff          B.W      CPU_IntSrcDis
                  |L1.14|
;;;138        }
;;;139    }
00000e  4770              BX       lr
;;;140    
                          ENDP

                  BSP_IntDisAll PROC
;;;159    {
;;;160        CPU_IntDis();
000010  f7fff7ff          B.W      CPU_IntDis
;;;161    }
;;;162    
                          ENDP

                  BSP_IntEn PROC
;;;181    {
;;;182        if (int_id < BSP_INT_SRC_NBR) {
000014  282a              CMP      r0,#0x2a
000016  d203              BCS      |L1.32|
;;;183            CPU_IntSrcEn(int_id + 16);
000018  3010              ADDS     r0,r0,#0x10
00001a  b2c0              UXTB     r0,r0
00001c  f7fff7ff          B.W      CPU_IntSrcEn
                  |L1.32|
;;;184        }
;;;185    }
000020  4770              BX       lr
;;;186    
                          ENDP

                  BSP_IntVectSet PROC
;;;207                          CPU_FNCT_VOID  isr)
;;;208    {
000022  b570              PUSH     {r4-r6,lr}
000024  4604              MOV      r4,r0
000026  460d              MOV      r5,r1
;;;209    #if (CPU_CFG_CRITICAL_METHOD == CPU_CRITICAL_METHOD_STATUS_LOCAL)
;;;210        CPU_SR   cpu_sr;
;;;211    #endif
;;;212    
;;;213    
;;;214        if (int_id < BSP_INT_SRC_NBR) {
000028  2c2a              CMP      r4,#0x2a
00002a  d208              BCS      |L1.62|
;;;215            CPU_CRITICAL_ENTER();
00002c  f7fff7ff          BL       CPU_SR_Save
;;;216            BSP_IntVectTbl[int_id] = isr;
000030  4953              LDR      r1,|L1.384|
000032  f841f841          STR      r5,[r1,r4,LSL #2]
;;;217            CPU_CRITICAL_EXIT();
000036  e8bde8bd          POP      {r4-r6,lr}
00003a  f7fff7ff          B.W      CPU_SR_Restore
                  |L1.62|
;;;218        }
;;;219    }
00003e  bd70              POP      {r4-r6,pc}
;;;220    
                          ENDP

                  BSP_IntPrioSet PROC
;;;241                          CPU_INT08U  prio)
;;;242    {
000040  b570              PUSH     {r4-r6,lr}
000042  4604              MOV      r4,r0
000044  460e              MOV      r6,r1
;;;243    #if (CPU_CFG_CRITICAL_METHOD == CPU_CRITICAL_METHOD_STATUS_LOCAL)
;;;244        CPU_SR    cpu_sr;
;;;245    #endif
;;;246    
;;;247    
;;;248        if (int_id < BSP_INT_SRC_NBR) {
000046  2c2a              CMP      r4,#0x2a
000048  d20c              BCS      |L1.100|
;;;249            CPU_CRITICAL_ENTER();
00004a  f7fff7ff          BL       CPU_SR_Save
00004e  4605              MOV      r5,r0
;;;250            CPU_IntSrcPrioSet(int_id + 16, prio);
000050  3410              ADDS     r4,r4,#0x10
000052  4631              MOV      r1,r6
000054  b2e0              UXTB     r0,r4
000056  f7fff7ff          BL       CPU_IntSrcPrioSet
;;;251            CPU_CRITICAL_EXIT();
00005a  4628              MOV      r0,r5
00005c  e8bde8bd          POP      {r4-r6,lr}
000060  f7fff7ff          B.W      CPU_SR_Restore
                  |L1.100|
;;;252        }
;;;253    }
000064  bd70              POP      {r4-r6,pc}
;;;254    
                          ENDP

                  UART2_ISR PROC
;;;421    static  void  UART2_ISR(void)
;;;422    {
000066  b510              PUSH     {r4,lr}
;;;423      u16 i = 0;
;;;424      USART_ClearITPendingBit(USART2,USART_IT_RXNE); 
000068  4c46              LDR      r4,|L1.388|
00006a  f240f240          MOV      r1,#0x525
00006e  4620              MOV      r0,r4
000070  f7fff7ff          BL       USART_ClearITPendingBit
;;;425      i = USART_ReceiveData(USART2);	
000074  4620              MOV      r0,r4
000076  f7fff7ff          BL       USART_ReceiveData
;;;426      USART_SendData(USART2,i);
00007a  4601              MOV      r1,r0
00007c  4620              MOV      r0,r4
00007e  e8bde8bd          POP      {r4,lr}
000082  f7fff7ff          B.W      USART_SendData
;;;427    }
;;;428    
                          ENDP

                  BSP_IntHandlerDummy PROC
;;;418    //BSP_IntHandler(USART2);
;;;419    }
000086  4770              BX       lr
;;;420    
                          ENDP

                  BSP_IntInit PROC
;;;280    void  BSP_IntInit (void)
;;;281    {
000088  b510              PUSH     {r4,lr}
;;;282        CPU_DATA  int_id;
;;;283    
;;;284    
;;;285        for (int_id = 0; int_id < BSP_INT_SRC_NBR; int_id++) {
00008a  2400              MOVS     r4,#0
                  |L1.140|
;;;286            BSP_IntVectSet(int_id, BSP_IntHandlerDummy);
00008c  f2aff2af          ADR      r1,BSP_IntHandlerDummy + 1
000090  4620              MOV      r0,r4
000092  f7fff7ff          BL       BSP_IntVectSet
000096  1c64              ADDS     r4,r4,#1              ;285
000098  2c2a              CMP      r4,#0x2a              ;285
00009a  d3f7              BCC      |L1.140|
;;;287        }
;;;288        BSP_IntVectSet(BSP_INT_ID_USART2,UART2_ISR);
00009c  f2aff2af          ADR      r1,UART2_ISR + 1
0000a0  e8bde8bd          POP      {r4,lr}
0000a4  2026              MOVS     r0,#0x26
0000a6  e7fe              B        BSP_IntVectSet
;;;289    }
;;;290    
                          ENDP

                  BSP_IntHandler PROC
;;;377    static  void  BSP_IntHandler (CPU_DATA  int_id)
;;;378    {
0000a8  b510              PUSH     {r4,lr}
0000aa  4604              MOV      r4,r0
;;;379    #if (CPU_CFG_CRITICAL_METHOD == CPU_CRITICAL_METHOD_STATUS_LOCAL)
;;;380        CPU_SR         cpu_sr;
;;;381    #endif
;;;382        CPU_FNCT_VOID  isr;
;;;383    
;;;384    
;;;385        CPU_CRITICAL_ENTER();                                       /* Tell uC/OS-II that we are starting an ISR            */
0000ac  f7fff7ff          BL       CPU_SR_Save
;;;386        OSIntNesting++;
0000b0  4a35              LDR      r2,|L1.392|
0000b2  7811              LDRB     r1,[r2,#0]  ; OSIntNesting
0000b4  1c49              ADDS     r1,r1,#1
0000b6  7011              STRB     r1,[r2,#0]  ; OSIntNesting
;;;387        CPU_CRITICAL_EXIT();
0000b8  f7fff7ff          BL       CPU_SR_Restore
;;;388    
;;;389        if (int_id < BSP_INT_SRC_NBR) {
0000bc  2c2a              CMP      r4,#0x2a
0000be  d204              BCS      |L1.202|
;;;390            isr = BSP_IntVectTbl[int_id];
0000c0  482f              LDR      r0,|L1.384|
0000c2  f850f850          LDR      r0,[r0,r4,LSL #2]
;;;391            if (isr != (CPU_FNCT_VOID)0) {
0000c6  b100              CBZ      r0,|L1.202|
;;;392                isr();
0000c8  4780              BLX      r0
                  |L1.202|
;;;393            }
;;;394        }
;;;395    
;;;396        OSIntExit();                                                /* Tell uC/OS-II that we are leaving the ISR            */
0000ca  e8bde8bd          POP      {r4,lr}
0000ce  f7fff7ff          B.W      OSIntExit
;;;397    }
;;;398    
                          ENDP

                  BSP_IntHandlerWWDG PROC
;;;307    
;;;308    void  BSP_IntHandlerWWDG          (void)  { BSP_IntHandler(BSP_INT_ID_WWDG);            }
0000d2  2000              MOVS     r0,#0
0000d4  e7fe              B        BSP_IntHandler
;;;309    void  BSP_IntHandlerPVD           (void)  { BSP_IntHandler(BSP_INT_ID_PVD);             }
                          ENDP

                  BSP_IntHandlerPVD PROC
0000d6  2001              MOVS     r0,#1
0000d8  e7fe              B        BSP_IntHandler
;;;310    void  BSP_IntHandlerTAMPER        (void)  { BSP_IntHandler(BSP_INT_ID_TAMPER);          }
                          ENDP

                  BSP_IntHandlerTAMPER PROC
0000da  2002              MOVS     r0,#2
0000dc  e7fe              B        BSP_IntHandler
;;;311    void  BSP_IntHandlerRTC           (void)  { BSP_IntHandler(BSP_INT_ID_RTC);             }
                          ENDP

                  BSP_IntHandlerRTC PROC
0000de  2003              MOVS     r0,#3
0000e0  e7fe              B        BSP_IntHandler
;;;312    void  BSP_IntHandlerFLASH         (void)  { BSP_IntHandler(BSP_INT_ID_FLASH);           }
                          ENDP

                  BSP_IntHandlerFLASH PROC
0000e2  2004              MOVS     r0,#4
0000e4  e7fe              B        BSP_IntHandler
;;;313    void  BSP_IntHandlerRCC           (void)  { BSP_IntHandler(BSP_INT_ID_RCC);             }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -