Hi
I am interfacing a CC3000 EM module via SPI from a RL78G13 5F100GL. I am working on IAR Workbench 1.10
My compiler memory settings are : stack 10k heap 2k
SPI channel running 8 MHz
SPI buffer setup :
void SpiOpen(gcSpiHandleRx pfRxHandler)
{
sSpiInformation.ulSpiState = eSPI_STATE_POWERUP;
sSpiInformation.SPIRxHandler = pfRxHandler;
sSpiInformation.pTxPacket = wlan_tx_buffer;
sSpiInformation.pRxPacket = wlan_rx_buffer;
sSpiInformation.usRxPacketLength = sizeof(wlan_rx_buffer); // 4096 bytes
sSpiInformation.usTxPacketLength = sizeof(wlan_tx_buffer); // 4096 bytes
}
Everything is working fine, WLAN init, WLAN Scan, obtain IP with DHCP, get IPCONFIG info.
I also have a simple webserver running with a TINY webpage.
The webpage are served without problems when i keep the page under 300 chars. (My code is inspired from the LED WEB server example project for MSP430)
sendHTTPData(cnum, HTTP_RESP, strlen(HTTP_RESP));
for(i = 0; i < strlen(indexPage); i += 300) // Send the specificied page in chunks of 300 bytes empirically proven to be sendable
{
if(strlen(indexPage) - i < 300)
{
sendHTTPData(cnum, &indexPage[i], strlen(indexPage) - i);
}
else
{
sendHTTPData(cnum, &indexPage[i], 300);
}
delayMilliSeconds(5); // This delay is necessary, or else we run into issues
}
A webpage with a content > 300 bytes is served first time around, but second time around the API blocks ?
Another problem is when using recv bytesRecvd = recv(cnum, requestBuffer, sizeof(requestBuffer), 0); This api function also blocks maybe the 2 problems are related.
It seems that my problems are related to transmission of larger packets to and from the CC3000 module ?
I am facing some other debug problems that has nothing to do with You, that prevents me from debugging deep in the API, so I am a bit stuck right now.
I hope that You can provide me some hints on what to look into....
Kind regards
Thomas Bødker