- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Whenever I do a push or pop operation to a queue in SDK 3.0.1, the platform locks up. Any idea why this might be? My code is below:
static wiced_queue_t slave_queue;
wiced_rtos_init_queue (&slave_queue,NULL,10,10);
WPRINT_APP_INFO(("%d items\n",slave_queue.handle.tx_queue_enqueued));
WPRINT_APP_INFO(("Pushing\n"));
wiced_rtos_push_to_queue (&slave_queue, "oh hai ",200);
WPRINT_APP_INFO(("%d items\n",slave_queue.handle.tx_queue_enqueued));
Solved! Go to Solution.
- Labels:
-
SPI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you checked the return of wiced_rtos_init_queue()?
The ThreadX implementation has this logic inside:
if ( ( message_size % 4 ) > 0 )
{
return WICED_ERROR;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you checked the return of wiced_rtos_init_queue()?
The ThreadX implementation has this logic inside:
if ( ( message_size % 4 ) > 0 )
{
return WICED_ERROR;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My message size was set to 64 bytes, so that wasn't the problem. I believe the problem is size, as it worked when I dropped my message size to 32 bytes. This is strange, since ThreadX claims to accept sizes of 1,2,4,8,or 16 x 32bits.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I tried 64 bytes message, I could see "1 items" after pushing.
Is it possible to upload reproducible code?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You appear to be correct. I am not sure what was going wrong previously.
Thanks for the assistance.