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.

CC430利用UCBO驱动的硬件SPI时钟为什么无法持续传输。



我的代码如下:


 P1OUT &= ~0x80;
   __delay_cycles(400);
  while (!(UCB0IFG&UCTXIFG));           // USCI_B0 TX buffer ready?
  UCB0TXBUF =cmd;                 // Send first value
  while (!(UCB0IFG&UCTXIFG));           // USCI_B0 TX buffer ready?
  UCB0TXBUF =reg;                 // Send first value
  while (!(UCB0IFG&UCTXIFG));           // USCI_B0 TX buffer ready?
  UCB0TXBUF =addr;                 // Send first value
  while (!(UCB0IFG&UCTXIFG));           // USCI_B0 TX buffer ready?
  UCB0TXBUF =addr;                 // Send first value
  //__no_operation();
  // __delay_cycles(400);
  P1OUT |=0x80;

}

然后示波器的时钟图像如下

为什么我的代码是连续4次触发UCBOTX但是时钟确实分成部分,不是连续的求解!!谢谢!