Problem with wiced_queue_t

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

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));

0 Likes
1 Solution
Anonymous
Not applicable

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;

}

View solution in original post

4 Replies
Anonymous
Not applicable

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;

}

Anonymous
Not applicable

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.

0 Likes
Anonymous
Not applicable

When I tried 64 bytes message, I could see "1 items" after pushing.

Is it possible to upload reproducible code?

0 Likes
Anonymous
Not applicable

You appear to be correct.  I am not sure what was going wrong previously.

Thanks for the assistance.

0 Likes