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.
调试发现程序一直停留在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;
}
有人知道是什么原因引起的吗?
已经困惑好几天了,找不到解决办法。求高人指点一下。
你用的是哪个版本的patch programmer和host driver. 能否下载最新的程序测试一下。
从下面的链接可以下载: http://processors.wiki.ti.com/index.php/CC3000_Wi-Fi_Downloads