This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430F149中SPI问题,不能正常工作,求大神解释!!!!!!!

Other Parts Discussed in Thread: MSP430F149

最近使用MSP430F149中遇到在SPI1中无法得到RXBUF1中的值,但是在IAR仿真中可以看到其值

这是我用SPI1的寄存器配置

  P5SEL |= 0x0e;

  U1CTL   = CHAR + SYNC + MM + SWRST;   // 8-bit, SPI, Master
  U1TCTL  = CKPL + SSEL0 + STC;         // Polarity, SMCLK, 3-wire
  U1BR0   = 0x02;                       // *** = SMCLK/2
  U1BR1   = 0x00;
  U1MCTL  = 0x00;
  ME2     |= USPIE1;                    // Module enable
  U1CTL   &= ~SWRST;                    // SPI enable
//  IE2     |= URXIE1;                    // RX and TX interrupt enable

不能得到U1RXBUF中的值,总是不一样,好像不同步一样
如果SPI中的配置为主时钟8MHz的时候,单片机总是复位,现在一头雾水,不知道如何解决
求解释,不知道这是什么原因,求大神帮忙解决一下~~~~