Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
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?
you can share the ported example, so we/users can run it on their boards..
posted by Martin Kojtal 24 Jun 2014http://mbed.org/users/erezi/code/cc3000_ping_demo_try_2/
http://mbed.org/users/erezi/code/NVIC_set_all_priorities/
posted by erez i 25 Jun 2014