- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am running the CYW43907 in sleep mode (not deep sleep).
How can i use a GPIO pin ( WICED_GPIO_6) as a wake source? I have the pin externally pulled high with a 47K resistor and attempting to pull low through a button but no luck.
wiced_gpio_init(WICED_GPIO_6, INPUT_HIGH_IMPEDANCE );
wiced_gpio_input_irq_enable(WICED_GPIO_6, IRQ_TRIGGER_FALLING_EDGE, gpio_callback, NULL); /* Setup interrupt */
Does not work in sleep mode, it works well in normal mode.
If i add
wiced_gpio_deepsleep_wakeup_enable( WICED_GPIO_6, IRQ_TRIGGER_FALLING_EDGE );
It still does not appear to wake up, but this also does not provide any callback mechanism to unblock a task if needed.
WICED SDK 6.2.1
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, thanks Priya.
For others, the following code is correct as a sleep wakeup.
wiced_gpio_init(WICED_GPIO_6, INPUT_HIGH_IMPEDANCE );
wiced_gpio_input_irq_enable(WICED_GPIO_6, IRQ_TRIGGER_FALLING_EDGE, gpio_callback, NULL); /* Setup interrupt */
My problem was that in my app code, i was changing the pin to an output while active for another use. What I did not know, inside of wiced_gpio_init, the ISR is disabled and the callback is cleared to NULL. This is why the input interrupt and wake was not working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Based on the discussion in the mycase system, it appears that you have resolved the issue.
Please let me know if you are still facing problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, thanks Priya.
For others, the following code is correct as a sleep wakeup.
wiced_gpio_init(WICED_GPIO_6, INPUT_HIGH_IMPEDANCE );
wiced_gpio_input_irq_enable(WICED_GPIO_6, IRQ_TRIGGER_FALLING_EDGE, gpio_callback, NULL); /* Setup interrupt */
My problem was that in my app code, i was changing the pin to an output while active for another use. What I did not know, inside of wiced_gpio_init, the ISR is disabled and the callback is cleared to NULL. This is why the input interrupt and wake was not working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
From my observations, if i add a GPIO toggle around sleep activity, if the processor is sleeping while a low signal is received on the gpio then the interrupt is not processed. If at any point the processor is awaken while the signal is low, then the EDGE interrupt is triggered.
Seems that the edge interrupt is really a sampled level interrupt and only happens when the processor is awake.