7 years, 11 months ago.

Problems with the CC3000

I have been trying to make a CC3000 (shield, breakout) work with my STM32 nucleo without success. I would very much appreciate if someone can help me.

So far I have isolated the problem with something related to the IRQ.

I have here an arduino uno and a STM32 nucleo connected each to a CC3000. I have put an oscilloscope to both the EN (enable) and INT pins.

The arduino works without problems. The mbed does not work.

1) One thing I noticed is that in both cases when I ask for the value of the INT pins, the result is different if I connect that pin to the oscilloscope or not. Strange isnt it? When I connect it to the oscilloscope it returns 1 , but when connected it returns 0. With no other change what soever..

2) Comparing the output of the arduino and the mbed systems

The arduino enable is 5V, the mbed STM32 is 3.3 V. In both cases they start at 1 and go to 0 at initialization then returning to 1.

in the case of the INT something goes wrong. In the case of the arduino it is 1, then it goes to 0 at initialization and then to 1... (which kinds of contradict the code becuase it is supposed to be 0-1-0)

in the case of the mbed it is 0 then it makes a spike again 0 and then 1 for a little while..

I analyzed where it gets stuck and it is when is waiting for this change of interrupt

  if (spi_irq_state) {
        // wait till the IRQ line goes low
        while(spi_irq_state != 0)
        {
          spi_irq_state=_spi.wlan_irq_read();
          printf("*");  
         }   
        printf("\n one\n");
    }else {
        // wait till the IRQ line goes high and then low
        while(spi_irq_state == 0)
          {
             spi_irq_state=_spi.wlan_irq_read();
            printf("*");
          }
        printf("\n zero one\n");
        while(spi_irq_state != 0)
        {
          spi_irq_state=_spi.wlan_irq_read();   
        printf("*");    //<-------GETS STUCKED HERE!!!
        }
        printf("\n zero zero\n");
    }

The even stranger thing is that at first I though it just gets into an infinite loop (therefore printing infinite "*"s but it does not. It just prints "*" a number of times and then after that the program dies...

I am running of ideas. Any help will be greatly appreciated.

(btw how do you modify the optimization level of the compiler???)

Be the first to answer this question.