- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I've bought CYW943907AEVAL1F board.
I develop a firmware that manipulate a mutex (wiced_rtos_lock_mutex) and manipulate a queue (wiced_rtos_push_to_queue) in a ISR (interrupt service routine) but each API calls get me errors:
wiced_rtos_lock_mutex returns 4 (WICED_ERROR)
wiced_rtos_push_to_queue returns 1032 (WICED_QUEUE_ERROR)
I suspect that I can't manipulate mutex or queue in a ISR (interrupt service routine) ...
can you confirm this ?
Thankyou.
Solved! Go to Solution.
- Labels:
-
WICED Studio Wi-Fi Combo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Locking a mutex is usually not allowed from and ISR, because it can block. If your ISR blocks, then your system would effectively lock up, and never be able to return to the threads.
As far as pushing to a a queue from an ISR, you can do it, BUT, it depends on how the wiced_rtos_push_to_queue call is implemented. If the call to the RTOS queue function is made with a timeout value set to anything other than 'no timeout' then, you cannot use wiced_rtos_push_to_queue in an ISR, because allowing a timeout could possibly block.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Locking a mutex is usually not allowed from and ISR, because it can block. If your ISR blocks, then your system would effectively lock up, and never be able to return to the threads.
As far as pushing to a a queue from an ISR, you can do it, BUT, it depends on how the wiced_rtos_push_to_queue call is implemented. If the call to the RTOS queue function is made with a timeout value set to anything other than 'no timeout' then, you cannot use wiced_rtos_push_to_queue in an ISR, because allowing a timeout could possibly block.