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.

MSP430FR5739+CC3000

调试发现程序一直停留在IRQ管脚判断的位置。

void
wlan_start(unsigned short usPatchesAvailableAtHost)
{
 unsigned long ulSpiIRQState;
 
    //
 // Allocate the memory for the RX/TX data transactions: the maximal length is
 // of the 1700 bytes
 //
 tSLInformation.pucTxCommandBuffer = wlan_tx_buffer;

 //
 // init spi
 //
 SpiOpen(SpiReceiveHandler);

 //
 // Check the IRQ line
 //
 ulSpiIRQState = tSLInformation.ReadWlanInterruptPin();
 
    //
    // ASIC 1273 chip enable: toggle WLAN EN line
    //
    tSLInformation.WriteWlanPin( WLAN_ENABLE );

 if (ulSpiIRQState)
 {
  //
  // wait till the IRQ line goes low
  //
  while(tSLInformation.ReadWlanInterruptPin() != 0)
  {
  }
 }
 else
 {
  //
  // wait till the IRQ line goes high and than low
  //
  while(tSLInformation.ReadWlanInterruptPin() == 0)   //一直停留在这句
  {
  }

  while(tSLInformation.ReadWlanInterruptPin() != 0)
  {
  }
 }

网上搜有的说可能是开关中断写的有问题。

开关中断用的官方提供的例程,未做修改。

void WlanInterruptEnable()
{
    __bis_SR_register(GIE);
    P2IES |= BIT3;
    P2IE |= BIT3;
}
void WlanInterruptDisable()
{
    P2IE &= ~BIT3;
}

有人知道是什么原因引起的吗?

已经困惑好几天了,找不到解决办法。求高人指点一下。
 

x 出现错误。请重试或与管理员联系。