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.

CC3000 Porting with PIC-32 (IRQ Problem)



hello,

          I've to use CC3000 with PIC32MX460F512L. I'm successfully ported CC3000 library. But I'm facing a problem like my application getting HANG in recv() function. Basically IRQ line stay at HIGH in idel state , and  signals (High to Low) for HCI command processing. After sending data to server socket, when i'm trying to read, just after FD set, IRQ line stays "LOW" always and my application hangs.

This IRQ line stays low, not only in recv(), but sometimes while doing "DHCP, Reading Firmware Version, Connecting to Access Point". I got struct in recv() function and still not moved further to complete CC3000 with PIC32MX successfully.

 

Regard's

Amit 

 

 

  • Hello Amit,

    Please make sure you understand the SPI read and write sequences as shown here: http://processors.wiki.ti.com/index.php/CC3000_Host_Programming_Guide

    paying particular attention to using the nCS line. If you continue to have problems, if would be appreciated if you could show a trace of these signals.

    Regards,

    Aaron

  • Hi,

    Did anybody get to the bottom of this? I seem to be having the same / similar problem. The module connects, I am running it as a server, I can connect a client, and get a stream of data back, but this stream will soon or later hang. Sending data from the client seems to make the connection even more likely to hang. Sometimes I can send data for several minutes at a time, sometimes it will hang within seconds. In fact any rapid i/o to the module seems to trigger the fault. If I keep trying accept in a loop with no, or too short a delay it will hang the comms after some time.

    At this point (once the driver has hung - stuck in the event handler waiting for an event) the CS line is high/de-asserted but the IRQ has remained low. It is my understanding that the CC3000 should return the IRQ line high after the CS line is de-asserted.

    My mcu is pretty fast (168MHz) and I cannot seem to find any spec for how long the CS line must be high before going low again, maybe waiting for IRQ to be high again is sufficient, but I assume the driver would make provisions for this if it were necessary. 

    my module reports patch version 1.10, and I am using the driver version from the zip file named swrc263a.zip.

    Incidentally, it also seems that the select function does not respond to client connection requests. when I use select to check for readable events on the bound socket, I never get any in response to client connection attempts. I am currently managing to accept connections by calling accept regardless of the result from select. 

    Best Regards

    Dan

  • An update,

    I am using two other SPI ports for real time data acquisition, the interrupts from these seemed to be causing some trouble with the CC3000 driver, They have higher priority. I have made them execute faster,  and also now accumulating more data before sending over the socket, so am sending more data less frequently. This seems to have eliminated the hangs whilst it is only sending data to the client.

    However when the client tries to send data - even if I never do a recv, the driver still hangs and no data is sent.

    I will later hook up a logic analyser later and get back with a trace and some debug if I cannot get any further.

    Thanks

    Dan