Possible 3.5.2 bug in wiced_framework_set_boot()

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

cross mob
Anonymous
Not applicable

I wonder if it's possible that there was a bug introduced in 3.5.2 that caused wiced_framework_set_boot() to fail.

We have developed our own OTA system, and in 3.5.2 the following returns WICED_ERROR:

   result = wiced_framework_set_boot( DCT_APP0_INDEX, WICED_FRAMEWORK_LOAD_ONCE );

I traced this down finally to some code in wiced_waf_common.c that I believe is now erroneous considering the changes to the way wiced_dct_write() has been modified under 3.5.2.   The existing code looks like this:

wiced_result_t wiced_waf_app_set_boot(uint8_t app_id, char load_once) 
{
     boot_detail_t boot;
     boot.entry_point                 = 0;
     boot.load_details.load_once      = load_once;
     boot.load_details.valid          = 1;
     boot.load_details.destination.id = INTERNAL;

     if ( wiced_dct_get_app_header_location( app_id, &boot.load_details.source ) != WICED_SUCCESS )
     {
         return WICED_ERROR;
     }
     if ( wiced_dct_write( &boot, DCT_INTERNAL_SECTION, OFFSETOF( platform_dct_header_t, boot_detail ), sizeof(boot_detail_t) ) != WICED_SUCCESS )
     {
         return WICED_ERROR;
     }
     return WICED_SUCCESS;
}

I noted that a new function was introduced in 3.5.2 to do the job of setting boot parameters.  I modified the above code to look like the following:

wiced_result_t wiced_waf_app_set_boot(uint8_t app_id, char load_once)
{
     boot_detail_t boot;
     boot.entry_point                 = 0;
     boot.load_details.load_once      = load_once;
     boot.load_details.valid          = 1;
     boot.load_details.destination.id = INTERNAL;

     if ( wiced_dct_get_app_header_location( app_id, &boot.load_details.source ) != WICED_SUCCESS )
     {
         return WICED_ERROR;
     }
     return wiced_dct_write_boot_details ( &boot );
}

I'd just like to confirm that what I've done is correct, and that there is indeed a bug.  Or, if I am missing something, please let me know.

1 Solution
Anonymous
Not applicable

Yes, skrawat, the code I provided above compiles under 3.5.2, and is now working for us.

View solution in original post

6 Replies
Anonymous
Not applicable

We have exactly same issue and I think garywiz made a point.

( wiced_dct_write() will return WICED_ERROR for writing boot_detail )

Can SDK team confirm on this ?

0 Likes

Though I reported on a separate thread not knowing already one thread opened for this issue. i am also getting same issue.

garywiz does your workaround change in code compile and work ?

0 Likes
Anonymous
Not applicable

Yes, skrawat, the code I provided above compiles under 3.5.2, and is now working for us.

Thanks a lot gary, Your change worked for me. It would be good to know if broadcom approves it across the platforms as finally I have to use it over murata module.

0 Likes
Anonymous
Not applicable

Thanks Gary, I also ran into this and your solution is working for me as well. Thanks!

0 Likes
Anonymous
Not applicable

Hello Friends,

thanks for your valuable answer,

the issue of the restart solved but wifi module stuck at 

"Writing chuck 1 of size 1024 from offset 0"  and it do nothing.

have you any idea about it , so please help us...

0 Likes