感觉从机中断无法进入,硬件调试主机可以进入,模仿ti的例程不成功,望大侠们指点;
从机接收程序:#include "msp430x14x.h"
unsigned char led=0xfe;
int main( void )
{
// Stop watchdog timer to prevent time out reset
WDTCTL = WDTPW + WDTHOLD;
P2DIR=0XFF; //输出
P2OUT=0xff; //led全灭
P3SEL=0X0F; //P3.0 1 2 3 设置spi模式
UCTL0=SWRST;
UCTL0|=CHAR+SYNC; //spi设置
UTCTL0=CKPL+STC;
U0BR0=0X02; // 波特率
U0BR1=0;
U0MCTL=0;
ME1=USPIE0;
U0CTL &= ~SWRST;
IE1=UTXIE0+URXIE0;
_EINT();
while(1);
}
#pragma vector=USART0RX_VECTOR
__interrupt void Rxd(void)
{
P2OUT=RXBUF0; //感觉进不来,硬件仿真出现reset vector问题
// P2OUT=0XFD;
}
仿真器仿真时还会出现
Wed Jan 16 10:22:34 2013: The stack pointer for stack 'Stack' (currently Memory:0x1AE) is outside the stack range (Memory:0x9B0 to Memory:0xA00)
Wed Jan 16 10:22:34 2013: The stack 'Stack' is filled to 100% (80 bytes used out of 80). The warning threshold is set to 90.%
请大家帮忙看下。谢谢
[
本帖最后由 xiaoliangzz 于 2013-1-16 10:23 编辑 ]
此帖出自
小平头技术问答
一周热门 更多>