wiced_rtos_init_queue failed

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

cross mob
harelTur
Level 3
Level 3
25 sign-ins 10 replies posted 10 questions asked

Hi 

I use cypress 4343A1 (Laird EWB )

I use OS - Thredex.

When I try to create/init queue by API wiced_rtos_init_queue

I get return code 04 (WICED_ERROR). 

Please let me know what the problem

HarelT

0 Likes
1 Solution
Murali_R
Moderator
Moderator
Moderator
250 sign-ins 250 replies posted 100 solutions authored

@harelTur The return code 4 indicates a WICED_ERROR which in this case, I think is being caused by the sizeof(RPT_HeartBeat_t) not being a multiple of 4.

Change this size to a multiple of 4 and the issue should get fixed.

Thanks

View solution in original post

0 Likes
3 Replies
Murali_R
Moderator
Moderator
Moderator
250 sign-ins 250 replies posted 100 solutions authored

Can you have a look at the code example here https://github.com/Infineon/CypressAcademy_WICED_WiFi101_Files/tree/master/Projects/ww101key/03 and check if it guides you in resolving your issue.
If not, please attach your code here and i'll take a look at it.

0 Likes
harelTur
Level 3
Level 3
25 sign-ins 10 replies posted 10 questions asked

RPT_LOG_DEBUG_MSG("RPT: wiced_rtos_init_queue(HB_Queue)...\n");
wiced_static_assert(Queue_element_size_must_be_GE_than_int, sizeof(RPT_HeartBeat_t) >= sizeof(int) );
wiced_static_assert(Queue_element_size_must_be_a_multiple_of_int, (sizeof(RPT_HeartBeat_t)%sizeof(int)) == 0);

RPT_LOG_DEBUG_MSG("HB_Queue Queue size %d\n", RPT_HEART_BEAT_QUEUE_SIZE);

res = wiced_rtos_init_queue(&RPT_HeartBeatQueue, "HB_Queue", sizeof(RPT_HeartBeat_t), RPT_HEART_BEAT_QUEUE_SIZE);

 

This is my code/

It can be involve to stack ? why the return code is 4?

Harel

0 Likes
Murali_R
Moderator
Moderator
Moderator
250 sign-ins 250 replies posted 100 solutions authored

@harelTur The return code 4 indicates a WICED_ERROR which in this case, I think is being caused by the sizeof(RPT_HeartBeat_t) not being a multiple of 4.

Change this size to a multiple of 4 and the issue should get fixed.

Thanks

0 Likes