TI中文支持网
TI专业的中文技术问题搜集分享网站

MSP430F5438 EVM的UC/OS-II 嵌入式操作系统的问题

在MSP430F5438 的评估板上,有一个配套的UC/OS-II嵌入式操作系统,文件os_cpu_c.c文件中OSTaskStkInit()函数中这段代码是怎么回事呀?为什么堆栈的指针一会指向0x0015,一会又变成0x1515,下面也都是这种情况,这是怎么回事呀?麻烦解释一下,谢谢了

*top– = (INT16U)((INT32U)task >>    16);
    *top– = (INT16U)((INT32U)task & 0xFFFF);                           /* Interrupt return pointer                          */
    *top– = (INT16U)0x0008;                                            /* Status register                                   */
    *top– = (INT16U)0x0015;
    *top– = (INT16U)0x1515;
    *top– = (INT16U)0x0014;
    *top– = (INT16U)0x1414;
    *top– = (INT16U)0x0013;
    *top– = (INT16U)0x1313;
    *top– = (INT16U)((INT32U)p_arg >>     16);                         /* Pass 'p_arg' through register R12                 */
    *top– = (INT16U)((INT32U)p_arg && 0xFFFF);                         /* Pass 'p_arg' through register R12                 */
    *top– = (INT16U)0x0011;           *top– = (INT16U)0x1111;
    *top– = (INT16U)0x0010;
    *top– = (INT16U)0x1010;
    *top– = (INT16U)0x0009;
    *top– = (INT16U)0x0909;
    *top– = (INT16U)0x0008;
    *top– = (INT16U)0x0808;
    *top– = (INT16U)0x0007;
    *top– = (INT16U)0x0707;
    *top– = (INT16U)0x0006;
    *top– = (INT16U)0x0606;
    *top– = (INT16U)0x0005;
    *top– = (INT16U)0x0505;
    *top– = (INT16U)0x0004;
    *top   = (INT16U)0x0404;

Shi JianHua:

目前没遇到过,无法给您解释!

赞(0)
未经允许不得转载:TI中文支持网 » MSP430F5438 EVM的UC/OS-II 嵌入式操作系统的问题
分享到: 更多 (0)