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.

Is there a simple CC3000 interface test?

Hello,

   We're evaluating the CC3000 on one of our custom boards. I'm in the process of bringing up the board and before starting on the software development effort I'd like to just verify that the CC3000 is connected correctly to our MCU. Is there a super-simple SPI echo test or something that I could do to verify that all the CC3000 signals have been connected correctly? Ideally I could send a few bytes over SPI and expect to receive a reply from the CC3000.

Thanks,

Derek

  • I used the following to try and ascertain if my SPI driver was working correctly:

        uint8_t patchVer[2];
    
        wlan_start(0);
    
        /* Read version info */
        nvmem_read_sp_version(patchVer);
        print("--Start of nvmem_read_sp_version--", NULL);
        print("Package ID: %d", patchVer[0]);
        print("Build Version: %d", patchVer[1]);
        print("--End of nvmem_read_sp_version--", NULL);

    patchVer should contain the appropriate version of your firmware.

    Typically, if there is something wrong one of the SPI commands sent in wlan_start() will cause you to become stuck in the infinite event handler loop.

  • Hello,

       I'm looking for something that doesn't require porting the CC3000 library yet. We'll do that eventually but right now I just want to verify that the CM installed the module correctly. Ideally something like sending 4 bytes over SPI and then we should receive back a certain message or so.

    Thanks,

    Derek

  • You could manually reproduce wlan_start(). The steps that occur are documented here:

    http://processors.wiki.ti.com/index.php/CC3000_Serial_Port_Interface_(SPI)#CC3000_Init_Operation

  • Hi Derek,
    a remark about CC3000: the CC3000 is not SPI standard confirm about the MISO line - it does not release it, if nCS line is inactive (high). Thus if you have other SPI slaves on the bus as well, additional circuitry is required to release the MISO line from bus (CC3000 keeps actively pulling it low or high, and cannot do tri-state, as required by SPI peripherals). See for example the Adafruit CC3000 shield schematic on how to e.g. use 74AHC1G125 to do this.

    If this has been taken care of or the CC3000 is the only SPI slave on the bus, here's an easy communication test that can be done without having to resort to CC3000 host driver code from TI's SDK:

    1. Pull VBAT_SW_EN low, wait 1 second (this effectively resets CC3000 internal MCU).
    2. Configure SPI with Mode 1, max SPI CLK 16 MHz, pull nCS line high (inactive).
    3. Pull VBAT_SW_EN line high
    4. Wait for CC3000 to pull IRQ line low (this signals SPI master that CC3000 is ready to communicate). It usually takes CC3000 approx. 64ms to pull IRQ low after the VBAT_SW_EN was enabled.
    5. Pull nCS low.
    6. Wait for minimum of 50 us (as required by datasheet).
    7. Clock over SPI out (MOSI) bytes 0x01 0x00 0x05 0x00 (first 4 bytes of HCI_CMND_START_SIMPLE_LINK as required by datasheet as initial part of first transaction) while reading each time what CC3000 replies on the MISO line. CC3000 should reply with 0x02 0x00 0xFF 0x00.

    If you got the correct reply, then the communication with all lines is OK. This procedure should work with any Service Pack level and independent of user configurable values in CC3000 NVRAM/EEPROM.

    Cheers,
    Risto

  • Thanks for the recommendation. I found this Wiki page which explains the same thing. I've gotten the Tx to work and will work on the response tomorrow. That's good to know about the SPI bus. I had enough SPI interfaces on my MCU (TM4C1294) so I gave the CC3000 its own bus. After reading what you said, I'm very glad. The CC3000 interface is not great; it's much more difficult than it needs to be. 

    Thanks,

    Derek