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.

help:CC3000在wlan_start(0)函数中出不来



出不来的原因是hci_event_handler(pRetParams, 0, 0);这个函数死循环,也就是tSLInformation.usEventOrDataReceived = 0;推到前面也就是IRQ中断除了第一次中断进去后面就没中断,在推到前面就是SpiFirstWrite(pUserBuffer, usLength);函数写数据有问题。于是我就用示波器去测波形(让stm32一直给CC3000写,这样可以测SPI的波形)while(1)   {SpiFirstWrite(pUserBuffer, usLength);},如果屏蔽这个函数   tSLInformation.WriteWlanPin( WLAN_ENABLE );也就是不使能wlan时,测出波形是正常的(从图形中可以看出数据和时钟对应的数据是:前四个为01、00、05、00;后六个为00、01、64、01、00);

如果不屏蔽 这个函数 tSLInformation.WriteWlanPin( WLAN_ENABLE );         测出来的波形是不正常(从图形可以看出输出口的波形最高才2V(MCUstm32和CC3000为3.3V),有些波形脉冲是1.8V,数据线和时钟对应的数据很乱)。


SPI:采用stm32的SPI3,频率为9MHz,输出口为复用推挽输出。