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.

SPI Not respsonding

I am comparing the SPI traffic between the Sensor demo using the MSP-EXP430 board and my board.

 

This is a trace of the MSP board…

 

Yellow is CS (It’s low, transitioning before this time frame)

Purple is Master in, Slave out

Pink is Clock

Green is Master out, Slave in

 

This is the very first message sent to the device.

The master sends a value of 1.

Clearly, the Slave (the LSResearch board) responds after getting 6 Zero bits clocked by the master. You can see the purple transition from zero to 1.

 

                       

 

 

 This trace is of my board. Same signals.

Clearly the master sends a value of 1.

I would expect the slave to respond as it does above. But I get nothing.

Basically, the software then gets stuck waiting to receive something that never arrives.

 

Any ideas? I’ve monitored the PWE_EN pin (it’s high), and also the IRQ pin (It seems to transition the same in both scenarios)

 Thanks,

Tim

 

 

 

  • Tim,

    At the beginning of the initialization the transport layer (SPI) detection action should take place.

    Please monitor the following lines and compare behavior between the two boards from the beginning while Power enable is the trigger.

    1. Power enable
    2. IRQ
    3. CS
    4. SPI CLK

    In your MSP430 , make sure to insert delay on the IRQ line that you assigned to a GPIO since the IRQ is active low. While the CC3000 initialize the IRQ is starting at LOW state due to level shifters inside that block the IRQ signal to present as high state. The level shifters inside the module have two power rails:

    1. VBAT= VIO host
    2. 1.8V VIO that is generated by a LDO in the module after the boot up sequence occur.  Only after VIO is available, the IRQ is getting high.

    Therefore, please be aware the low state of the IRQ at the beginning is ‘dead time’. The first IRQ transaction that the MSP430 should detect is the first high to low transaction of the IRQ.

    After the IRQ is getting low the CS should get low as well. Next step the CS is getting up and IRQ should get up as well.

    BTW, could you please specify if you are using CC3000 LSR EM board on both cases?

    Regards,

    Moshe

  • Thanks Moshe,

    I basically did that yesterday and noticed my CS was starting at zero, instead of one.

    I now see a response from the LS Research board.

    The IRQ and CS both go back to 'high' after the first SPI transaction. But now the software gets stuck in hci_event_handler

    It seems like hci_event_handler is waiting for Data or an event. This seems like it is waiting for another interrupt.

    Should SPI_IRQ interrupt on both edges, or just the falling edge?

     

    I am using the CC3000 LSR EM in both cases.

     

    Thanks,

    Tim

     

  • On to my next problem.

     

    The first SPI transaction on the 430 Board sends the following....

    01 00 05 00 00 01 00 40 01 00

    The first SPI transaction on my Freescale board sends the following....

    01 00 09 00 00 00 00 40 02 00 00 00 00 00 00

     

    The 3rd byte is a size byte. Notice the difference.

    The reason for the difference is the following struct

    typedef struct _hci_cmnd_hdr_t

    {    

         unsigned char  ucType;

         unsigned short usOpcode;

         unsigned char  ucLength;

    } hci_cmnd_hdr_t;

    The sizeof(hci_cmnd_hdr_t) for the 430 board is different than on my freescale board.

    Now what?

    Tim

     

     

  • Hi Tim,

    Looks like the issue relates to your other thread on "Struct Packing": http://e2e.ti.com/support/low_power_rf/f/851/t/196664.aspx.

    I suggest that we will continue to follow up on this issue in that thread.

    Thanks,
    Alon.S