Hi everyone,
I want to use CC3000 with Cortex-M3 (A2F200-M3) so I downloaded the drivers related to MP340-FRAM board. I made all parts of these drivers compatible with my CPU.
Now I have a problem. I also change a bit in basic_application_wifi including main function and run them; however, when it goes through wlan_start(0) function it is waiting for IRQ=1 but it dose not become one and it remains there forever. I did not configure at all my CC3000 should I configure it at first
my code is shown as follown
void wlan_start(unsigned short usPatchesAvailableAtHost)
{
long ulSpiIRQState;
tSLInformation.NumberOfSentPackets = 0;
tSLInformation.NumberOfReleasedPackets = 0;
tSLInformation.usRxEventOpcode = 0;
tSLInformation.usNumberOfFreeBuffers = 0;
tSLInformation.usSlBufferLength = 0;
tSLInformation.usBufferSize = 0;
tSLInformation.usRxDataPending = 0;
tSLInformation.slTransmitDataError = 0;
tSLInformation.usEventOrDataReceived = 0;
tSLInformation.pucReceivedData = 0;
//
// Allocate the memory for the RX/TX data transactions
//
unsigned char wlan_tx_buffer [CC3000_TX_BUFFER_SIZE];
tSLInformation.pucTxCommandBuffer = wlan_tx_buffer;
//
// init spi
//
SpiOpen(SpiReceiveHandler);
//
// Check the IRQ line
//
ulSpiIRQState = tSLInformation.ReadWlanInterruptPin();
printf("ulSpiIRQState %lu\r\n", ulSpiIRQState);
//
// ASIC 1273 chip enable: toggle WLAN EN line
//
tSLInformation.WriteWlanPin( WLAN_ENABLE );
if (ulSpiIRQState == 0x04)
{
//
// wait till the IRQ line goes low
//
while(tSLInformation.ReadWlanInterruptPin() != 0) get stuck here without any progreee
{
}
}
else
{
//
// wait till the IRQ line goes high and than low
//
while(tSLInformation.ReadWlanInterruptPin() == 0)
{
}
while(tSLInformation.ReadWlanInterruptPin() != 0)
{
}
}
SimpleLink_Init_Start(usPatchesAvailableAtHost);
// Read Buffer's size and finish
hci_command_send(HCI_CMND_READ_BUFFER_SIZE, tSLInformation.pucTxCommandBuffer, 0);
SimpleLinkWaitEvent(HCI_CMND_READ_BUFFER_SIZE, 0);
}
/**
* \brief wlan stop
*
* Stop WLAN device by putting it into reset state.
*
* \return None
*
* \sa wlan_start
* \note
* \warning
*/
void
please let me know how to solve this problem.