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

📄 artx_config.txt

📁 射频芯片nRF905例程
💻 TXT
📖 第 1 页 / 共 3 页
字号:
; generated by ARM/Thumb C/C++ Compiler, RVCT2.2 [Build 442] for uVision
; commandline ArmCC [--thumb --debug -c --asm --interleave -o.\Obj\artx_config.o --device=DARMP -O0 --apcs=interwork -ID:\Keil\ARM\INC\Philips ARTX_Config.c]

                          THUMB

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

                  os_idle_demon PROC
;;;216    
;;;217    void os_idle_demon (void) __task {
000000  46c0              MOV      r8,r8
;;;218       /* The idle demon is a system task. It is running when no other task is   */
;;;219       /* ready to run (idle situation). It must not terminate. Therefore it     */
;;;220       /* should contain at least an endless loop.                               */
;;;221    
;;;222       for (;;) {//定义空闲任务的代码
                  |L1.2|
000002  e7fe              B        |L1.2|
;;;223       /* HERE: include here optional user code to be executed when no task runs.*/
;;;224       }
;;;225    } /* end of os_idle_demon */
                          ENDP

                  os_tmr_call PROC
;;;229    
;;;230    void os_tmr_call (U16 info) {
000004  46c0              MOV      r8,r8
;;;231       /* This function is called when the user timer has expired.               */
;;;232       /* Parameter "info" is the parameter defined when the timer was created.  */
;;;233       /* HERE: include here optional user code to be executed on timeout.       */
;;;234       info = info;
;;;235       switch (info) {
000006  2801              CMP      r0,#1
000008  d002              BEQ      |L1.16|
00000a  2802              CMP      r0,#2
00000c  d102              BNE      |L1.20|
00000e  e000              B        |L1.18|
;;;236          case 1:                 /* Signal that first timer has expired.        */
;;;237                                  /* Supervised task is locked, do some actions. */
;;;238                   break;
                  |L1.16|
000010  e000              B        |L1.20|
;;;239          case 2:                 /* Second task is locked. Do some actions.     */
;;;240    
;;;241                   break;
                  |L1.18|
000012  46c0              MOV      r8,r8
;;;242       }   
;;;243    } /* end of os_tmr_call */
                  |L1.20|
000014  4770              BX       lr
                          ENDP

                  os_stk_overflow PROC
;;;247    #if (OS_STKCHECK == 1)
;;;248    static void os_stk_overflow (void) {
000016  b510              PUSH     {r4,lr}
;;;249       /* This function is called when a stack overflow is detected.             */
;;;250       /*  'os_runtask' points to a TCB of a task which has a stack overflow     */
;;;251       /*  'task_id'    holds a task id for this task                            */
;;;252       /* HERE: include here optional code to be executed on stack overflow.     */
;;;253       static volatile OS_TID task_id;
;;;254    
;;;255       /* Get a task identification for a task with stack problem to 'task_id'.*/
;;;256       task_id = os_get_TID (os_runtask);
000018  48b0              LDR      r0,|L1.732|
00001a  6800              LDR      r0,[r0,#0]  ; os_runtask
00001c  f7ff fffe         BL       os_get_TID
000020  49af              LDR      r1,|L1.736|
000022  6008              STR      r0,[r1,#0]  ; task_id@os_stk_overflow_0
;;;257       /* Use a uVision 'Advanced RTX' debug dialog page 'Active Tasks' to    */
;;;258       /* check which task has got a stack overflow and needs a bigger stack. */
;;;259       for (;;);
000024  46c0              MOV      r8,r8
                  |L1.38|
000026  e7fe              B        |L1.38|
;;;260    }
                          ENDP

                  tsk_lock PROC
;;;326    
;;;327    void tsk_lock (void) {
000028  2020              MOVS     r0,#0x20
;;;328       /* Lock out tasks: prevents task switching by locking out scheduler       */
;;;329       /* activation on interrupt.                                            .  */
;;;330       OS_LOCK();
00002a  49ae              LDR      r1,|L1.740|
00002c  6148              STR      r0,[r1,#0x14]
;;;331    } /* end of tsk_lock */
00002e  4770              BX       lr
                          ENDP

                  os_clock_interrupt0 PROC
;;;264    
;;;265    U32 os_clock_interrupt0 (U32 stack) {
000030  b510              PUSH     {r4,lr}
000032  0004              MOVS     r4,r0
;;;266       /* Do task switch to clock demon: entered upon a clock interrupt. Saving */
;;;267       /* and restoring context is written in assembly (module: Irq_ARTX.s)     */
;;;268       OS_TIACK();
000034  2001              MOVS     r0,#1
000036  49ac              LDR      r1,|L1.744|
000038  6008              STR      r0,[r1,#0]
00003a  2020              MOVS     r0,#0x20
00003c  1449              ASRS     r1,r1,#17
00003e  61c8              STR      r0,[r1,#0x1c]
000040  2000              MOVS     r0,#0
000042  6308              STR      r0,[r1,#0x30]
;;;269       tsk_lock ();
000044  f7ff fffe         BL       tsk_lock
;;;270       os_runtask->tsk_stack = stack;
000048  48a4              LDR      r0,|L1.732|
00004a  6800              LDR      r0,[r0,#0]  ; os_runtask
00004c  6244              STR      r4,[r0,#0x24]
;;;271       os_runtask->full_ctx = __TRUE;
00004e  2101              MOVS     r1,#1
000050  48a2              LDR      r0,|L1.732|
000052  6800              LDR      r0,[r0,#0]  ; os_runtask
000054  3020              ADDS     r0,r0,#0x20
000056  7041              STRB     r1,[r0,#1]
;;;272       os_runtask->state  = READY;
000058  2001              MOVS     r0,#1
00005a  49a0              LDR      r1,|L1.732|
00005c  6809              LDR      r1,[r1,#0]  ; os_runtask
00005e  7048              STRB     r0,[r1,#1]
;;;273       os_put_rdy_first (os_runtask);
000060  489e              LDR      r0,|L1.732|
000062  6800              LDR      r0,[r0,#0]  ; os_runtask
000064  f7ff fffe         BL       os_put_rdy_first
;;;274       os_runtask = &os_clock_TCB;
000068  48a0              LDR      r0,|L1.748|
00006a  499c              LDR      r1,|L1.732|
00006c  6008              STR      r0,[r1,#0]  ; os_runtask
;;;275       os_clock_TCB.state = RUNNING;
00006e  2002              MOVS     r0,#2
000070  499e              LDR      r1,|L1.748|
000072  7048              STRB     r0,[r1,#1]  ; os_clock_TCB
;;;276       return (os_runtask->tsk_stack);
000074  4899              LDR      r0,|L1.732|
000076  6800              LDR      r0,[r0,#0]  ; os_runtask
000078  6a40              LDR      r0,[r0,#0x24]
00007a  bc10              POP      {r4}
00007c  bc08              POP      {r3}
;;;277    } /* end of os_clock_interrupt0 */
00007e  4718              BX       r3
                          ENDP

                  os_tmr_init PROC
;;;287    
;;;288    void os_tmr_init (void) {
000080  489b              LDR      r0,|L1.752|
;;;289       /* Initialize hardware timer as system tick timer. This function is     */
;;;290       /* called at the system startup.                                        */
;;;291       OS_TINIT();
000082  4999              LDR      r1,|L1.744|
000084  6188              STR      r0,[r1,#0x18]
000086  2003              MOVS     r0,#3
000088  6148              STR      r0,[r1,#0x14]
00008a  2001              MOVS     r0,#1
00008c  6048              STR      r0,[r1,#4]
00008e  4899              LDR      r0,|L1.756|
000090  1449              ASRS     r1,r1,#17
000092  6348              STR      r0,[r1,#0x34]
000094  4898              LDR      r0,|L1.760|
000096  4999              LDR      r1,|L1.764|
000098  63c8              STR      r0,[r1,#0x3c]
00009a  2025              MOVS     r0,#0x25
00009c  4998              LDR      r1,|L1.768|
00009e  63c8              STR      r0,[r1,#0x3c]
;;;292    #if (OS_ROBIN == 1)
;;;293       os_robin_time = OS_ROBINTOUT;
0000a0  2005              MOVS     r0,#5
0000a2  498f              LDR      r1,|L1.736|
0000a4  1d09              ADDS     r1,r1,#4
0000a6  8008              STRH     r0,[r1,#0]  ; os_robin_time
;;;294    #endif
;;;295    } /* end of os_tmr_init */
0000a8  4770              BX       lr
                          ENDP

                  os_tmr_reload PROC
;;;298    
;;;299    void os_tmr_reload (void) {
0000aa  4770              BX       lr
;;;300       /* Reload system timer for next period if a timer requires reload.        */
;;;301       OS_TREL();
;;;302    } /* end of os_tmr_reload */
                          ENDP

                  os_tmr_force_irq PROC
;;;305    
;;;306    void os_tmr_force_irq (void) {
0000ac  488d              LDR      r0,|L1.740|
;;;307       /* Force a timer interrupt.                                               */
;;;308       OS_TFIRQ();
0000ae  6980              LDR      r0,[r0,#0x18]
0000b0  2120              MOVS     r1,#0x20
0000b2  4308              ORRS     r0,r0,r1
0000b4  498b              LDR      r1,|L1.740|
0000b6  6188              STR      r0,[r1,#0x18]
;;;309    } /* end of os_tmr_force_irq */
0000b8  4770              BX       lr
                          ENDP

                  os_tmr_inspect_cnt PROC
;;;312    
;;;313    U32 os_tmr_inspect_cnt (void) {
0000ba  488b              LDR      r0,|L1.744|
;;;314       /* Inspect current value of rtx timer.                                    */
;;;315       return (OS_TVAL);
0000bc  6880              LDR      r0,[r0,#8]
;;;316    } /* end of os_tmr_inspect_cnt */
0000be  4770              BX       lr
                          ENDP

                  os_tmr_inspect_ovf PROC
;;;319    
;;;320    BOOL os_tmr_inspect_ovf (void) {
0000c0  4889              LDR      r0,|L1.744|
;;;321       /* Inspect current state of timer overflow flag.                          */
;;;322       return (OS_TOVF);
0000c2  6800              LDR      r0,[r0,#0]
0000c4  07c0              LSLS     r0,r0,#31
0000c6  0fc0              LSRS     r0,r0,#31
;;;323    } /* end of os_tmr_inspect_ovf */
0000c8  4770              BX       lr
                          ENDP

                  tsk_unlock PROC
;;;334    
;;;335    void tsk_unlock (void) {
0000ca  4886              LDR      r0,|L1.740|
;;;336       /* Enable AR System Tick Timer Interrupts.                                */
;;;337       OS_UNLOCK();
0000cc  6900              LDR      r0,[r0,#0x10]
0000ce  2120              MOVS     r1,#0x20
0000d0  4308              ORRS     r0,r0,r1
0000d2  4984              LDR      r1,|L1.740|
0000d4  6108              STR      r0,[r1,#0x10]
;;;338    } /* end of tsk_unlock */
0000d6  4770              BX       lr
                          ENDP

                  os_init_mem PROC
;;;341    
;;;342    void os_init_mem (void) {
0000d8  b510              PUSH     {r4,lr}
;;;343       U32 i;
;;;344    
;;;345       for (i = 0; i < OS_TASKCNT; i++) {
0000da  2400              MOVS     r4,#0
0000dc  e004              B        |L1.232|
;;;346          os_active_TCB[i] = NULL;
                  |L1.222|
0000de  2000              MOVS     r0,#0
0000e0  00a1              LSLS     r1,r4,#2
0000e2  4a88              LDR      r2,|L1.772|
0000e4  5050              STR      r0,[r2,r1]
0000e6  1c64              ADDS     r4,r4,#1              ;345
                  |L1.232|
0000e8  2c06              CMP      r4,#6                 ;345
0000ea  d3f8              BCC      |L1.222|              ;345
;;;347       }
;;;348       _init_box (&m_tcb, sizeof(m_tcb), sizeof(struct OS_TCB));
0000ec  2230              MOVS     r2,#0x30
0000ee  21ff              MOVS     r1,#0xff
0000f0  3131              ADDS     r1,r1,#0x31
0000f2  4885              LDR      r0,|L1.776|
0000f4  f7ff fffe         BL       _init_box
;;;349       _init_box (&m_stk, sizeof(m_stk), OS_STKSIZE*4);
0000f8  22c8              MOVS     r2,#0xc8
0000fa  2165              MOVS     r1,#0x65
0000fc  0109              LSLS     r1,r1,#4
0000fe  4883              LDR      r0,|L1.780|
000100  f7ff fffe         BL       _init_box
;;;350    #if (OS_TIMERCNT != 0)
;;;351       _init_box (&m_tmr, sizeof(m_tmr), sizeof(struct OS_TMR));

⌨️ 快捷键说明

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