MSP430F6638的例程代码SPI通信验证

2019-03-24 08:39发布

各位大神!!求问啊,我在使用MSP430F6638的SPI主从机例程时,主机的数据UCA0TXBUF确实在增加,我调试从机时,发现没有进入USCI_A0_ISR中断里面进行数据接收啊,请问这是怎么回事啊?而且从机里面有一个p1.4的中断,主机里面也没有啊,不太明白到底是怎么做的额?下面是例程中主机和从机的功能注释,主机:MSP430F66x Demo - USCI_A0, SPI 3-Wire Master Incremented Data//
//   Description: SPI master talks to SPI slave using 3-wire mode. Incrementing
//   data is sent by the master starting at 0x01. Received data is expected to
//   be same as the previous transmission.  USCI RX ISR is used to handle
//   communication with the CPU, normally in LPM0. If high, P1.0 indicates
//   valid data reception.  Because all execution after LPM0 is in ISRs,
//   initialization waits for DCO to stabilize against ACLK.
//
//   ACLK = ~32.768kHz, MCLK = SMCLK = DCO ~ 1048kHz.  BRCLK = SMCLK/2
//
//   Use with SPI Slave Data Echo code example. The master code example uses
//   a GPIO P1.1 to reset the SPI slave state machine.
从机: MSP430F66x Demo - USCI_A0, SPI 3-Wire Slave Data Echo
//
//   Description: SPI slave talks to SPI master using 3-wire mode. Data received
//   from master is echoed back.  USCI RX ISR is used to handle communication,
//   CPU normally in LPM0.  Prior to initial data exchange, master pulses
//   slaves USCI RST using an interrupt on P1.4.
//
//   ACLK = ~32.768kHz, MCLK = SMCLK = DCO ~ 1048kHz
//
//   Use with SPI Master Incremented Data code example.

我把程序下载进去,连接好两块单片机的引脚,那个指示灯也没有亮啊!有人知道怎么验证这个代码吗?
此帖出自小平头技术问答
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
8条回答
下雨天不洗澡
2019-03-25 04:19
 精彩回答 2  元偷偷看……0人看过

一周热门 更多>

相关问题

    相关文章