WICED 3.1.X bug -- queues fail to work when in '-debug' mode

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

cross mob
cogoc_1937206
Level 4
Level 4
First like received

Hello,

I've encountered what appears to be a bug in the WICED framework:  Calls to wiced_rtos_init_queue() always fail (return WICED_WWD_QUEUE_ERROR) when the application has been built with the '-debug' option, and when using ThreadX.  I've confirmed that this is the case even for the snip.scan application running on the BCM943362WCD4 dev kit with the following minor code modifications:

static void createQueueTest()

{

    wiced_result_t res;

    wiced_queue_t dummyQueue;

    res = wiced_rtos_init_queue(&dummyQueue, NULL, 700, 2);

    printf("DummyQueue init %s! (%d)\r\n", (res == WICED_SUCCESS ? "succeeded" : "failed"), (int)res);

    res = wiced_rtos_deinit_queue(&dummyQueue);

    printf("DummyQueue de-init %s! (%d)\r\n", (res == WICED_SUCCESS ? "succeeded" : "failed"), (int)res);

}

void application_start( )

{

    wiced_init( );

    createQueueTest();

    while(1)

Note that I'm running WICED 3.1.1.  I have also confirmed that this issue does not exist when using FreeRTOS.

Please confirm whether you are able to reproduce this issue.

Thanks!

0 Likes
1 Solution
SeyhanA_31
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

Hi,

For ThreadX, the max message_size (* @param message_size : size in bytes of objects that will be held in the queue) for the wiced_rtos_init_queue(...) is 64. Basically message_size/4 number of messages are held a the queue.

Make the following change:

res = wiced_rtos_init_queue(&dummyQueue, NULL, 700, 2); ->

res = wiced_rtos_init_queue(&dummyQueue, NULL, 16, 2); or res = wiced_rtos_init_queue(&dummyQueue, NULL, 64, 2);


Thanks,

Seyhan

View solution in original post

0 Likes
4 Replies