10 years, 5 months ago.

waiting for IRQ in WLAN init

i'm trying to import wifi ping demo to a nucleo board with CC3000 adafruit shield. after reset when reaching: void cc3000_wlan::start(uint16_t patches_available_host) {

i noticed my IRQ (D3) doesn't toggle.

    if (spi_irq_state) {
        // wait till the IRQ line goes low
        printf("CC3000 wlan start 15 before wait to irq. \r\n");
        while(_spi.wlan_irq_read() != 0){
            printf("CC3000 wlan start 15 in while. input_irq = %d\r\n",input_irq.read());
            wait(0.2);
            }
        printf("CC3000 wlan start 15. \r\n");
    } else {
        // wait till the IRQ line goes high and then low
        printf("CC3000 wlan start 16 before wait to irq. input_irq = %d\r\n",input_irq.read());
        while(_spi.wlan_irq_read() == 0){
            printf("CC3000 wlan start 16 in while. input_irq = %d\r\n",input_irq.read());
            wait(0.2);
            }
        printf("CC3000 wlan start 16. \r\n");
        while(_spi.wlan_irq_read() != 0);
        printf("CC3000 wlan start 17. \r\n");
    }

my output:

CC3000 wlan start 13. input_irq = 0 CC3000 wlan start 14. input_irq = 0 CC3000 wlan start 16 before wait to irq. input_irq = 0 CC3000 wlan start 16 in while. input_irq = 0 CC3000 wlan start 16 in while. input_irq = 0 CC3000 wlan start 16 in while. input_irq = 0 CC3000 wlan start 16 in while. input_irq = 0

(input_irq is D3)

sometimes we are getting D3 stuck at '1' and sometimes we are getting D3 stuck at '0' (like shown above)

we never see the input IRQ toggles and therefore the SW is stuck

who should toggle the interrupt? why do we get different results?

Question relating to:

Connect to SSID, get ip by dhcp, ping google.com, display statistics CC3000, wifi

you can share the ported example, so we/users can run it on their boards..

posted by Martin Kojtal 24 Jun 2014
Be the first to answer this question.