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 + STM32F4

Other Parts Discussed in Thread: MSP430G2553

Hi,

I am trying to interface CC3000 EM board with STM32F4 series micro.

i am following the "CC3000 Host Programming Guide" for the porting , testing and initial test setup.

The CC3000 initialization setup on host is as follows :

SPI baudrate : 1Mhz

CPOL : 0 CPHA : 1

In the CC3000 initilization process i am able to send the first command to CC3000 : Host ->> CC3000  -   HCI_CMND_SIMPLE_LINK_START

The checked through the scope the MOSI line sends the data what it intends to send to CC3000, but as per the reference TI link  i dont get the data on MISO :02 00 FF 00 00 00 00 00 00 00.

And neither CC3000 sends back command complete responses to host : HCI_CMND_SIMPLE_LINK_START

The IRQ doesnt go low after the command is sent from host to CC3000, so host continously polls for the response amd nevers comes out of the loop.

How could i verify if my CC3000 is working and the command i send is properly received by CC3000...????

Could any one tell me why CC3000 is not sending the response...??

  • Hi,

    Try with SPI in Mode_1

    SPI_CPOL_Low;
    SPI_CPHA_2Edge;

    Best Regards,

  • Hello, 
             could you attach you project here? I 'm working with CC3000 and STM32F4 Discovery, and your project could very help me!

    Thank you!

  • I'm in the same boat. Surely a status LED pin or something could be integrated.

  • Hi,

    1) Are you following the protocol for the first write ? (4bytes - 50us delay - then 6bytes)

    2) As there is no reply from CC3000, there could be a problem with SPI settings. Try with the CPOL , CPHA configs suggested.

    Thanks,

    -VR Shankar.

  • Hello,

    just try a 10 ohm resistor at the line of the SPI clock (due to different line capacities)for my port to AT91SAM9261 it had worked.

    I hope it helps.

  • Hi, I am trying porting the cc3000 EM board to stm32f103rbt6,and i came with the same problem as yours,

    when I send the HCI_CMND_SIMPLE_LINK_START command ,it works well and cc3000 return 02 00 00 00 05 04 00 40 01 00,but when I run to hci_command_send(HCI_CMND_READ_BUFFER_SIZE, tSLInformation.pucTxCommandBuffer, 0), cc3000 return 02 00 FF 00 00 00 00 00 00 00 ,how did you solve this?

  • wei long said:

    Hi, I am trying porting the cc3000 EM board to stm32f103rbt6,and i came with the same problem as yours,

    when I send the HCI_CMND_SIMPLE_LINK_START command ,it works well and cc3000 return 02 00 00 00 05 04 00 40 01 00,but when I run to hci_command_send(HCI_CMND_READ_BUFFER_SIZE, tSLInformation.pucTxCommandBuffer, 0), cc3000 return 02 00 FF 00 00 00 00 00 00 00 ,how did you solve this?

    Hi Wei Long,

    CC3000 return byte stream is correct. After this byte stream response, the MCU will wait for an interrupt from CC3000. CC3000 interrupts the MCU and MCU does a READ operation from the interrupt context. In that READ operation, the buffer size will be sent from CC3000.

    Are you getting an interrupt from CC3000 after sending "HCI_CMND_READ_BUFFER_SIZE" ?

    Please refer to this link : http://processors.wiki.ti.com/index.php/CC3000_Serial_Port_Interface_%28SPI%29#3._Host_-.3E.3E_CC3000_-_HCI_CMND_READ_BUFFER_SIZE

    From your description, Step 3 is complete and should proceed to Step 4.

    Thanks,

    -VR Shankar.

  • Sorry to dig up an old post, but I am having more or less the same problem, and before I start I new topic, I was wondering if you solved this? If so could you provide information on how you fixed it?

    i.e. The first command from the Host (STM32) to the CC3000 appears correct but then I am reading either:

     02 00 FF 00 00 00 00 00 00 00 or C2 00 FF 00 00 00 00 00 00 00

    and looping forever in hci_event_handler...

    I'll probably end up making a new topic about this, but since this was so closely resembled my problem I though I would ask here first.

    Cheers

     

  • Hi Alan,

    If the received byte stream is : 02 00 FF 00 00 00 00 00 00 00, then your SPI configuration is correct.

    Looping forever in hci_event_handler seems like an issue with your interrupt configuration/settings. Please review interrupt pin mapping/enable disable settings and check one more time.

    Thank you.

  • Why is that byte stream correct? The wiki states I should be expecting 02 00 00 00 05 04 00 40 01 00 (HCI_CMND_SIMPLE_LINK_START COMMAND COMPLETE) Which is what I observe if I replace the STM32 with a MSP430G2553 running the Basic WiFi Demo application.

  • Hi Alan,

    Please make sure that the data on MOSI is correct. And also make sure that the interrupt wasn't disabled all this while. And before all, just check if the patch programmer was flashed correctly onto the CC3000 device.

    Thanks & Regards,

    Raghavendra

  • @Raghavendra Shenoy Mathav

    Thanks for your reply. I have created a new post for my problem, http://e2e.ti.com/support/low_power_rf/f/851/t/311744.aspx and I address your suggestions in more detail there ( MOSI seems OK, CC3000 works with MSP430G2553). Sorry for hijacking this thread.