OTA2 boot procedure

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

cross mob
Anonymous
Not applicable

Hi there,

I am using WICED-Studio-4.0 and trying to port OTA2 to STM32F4xx platform. After digging the source code and reading the WICED-OTA2.pdf, I get lost at the boot procedure.

1. The PDF says that we must define "CURRENT_APPLICATION_USES_INTERNAL_FLASH" in the application make file, which will not download the APP0 to the external serial flash and the APP0 is extracted from OTA2 image to the internal application area directly if needed. That means the APP0 area of the external serial flash will never has a valid APP0.

2. According to the "ota2_bootloader.c", it sets the APP0 as the load program every time it starts up. We assume that there is no OTA2 image available for extracting, nor factory reset button pressed after power on, then the bootloader will  load the APP0 from the external serial flash.

How could the bootloader load the APP0 from the  external serial flash while the APP0 is empty?

Did I miss something? Any tips and explanation would be appreciated!

Best regards,

Guohui

0 Likes
1 Solution
Anonymous
Not applicable

WICED-Studio-4.0.1 has changed the boot procedure and the procedure on the new SDK does make sense.

View solution in original post

0 Likes
19 Replies
AxLi_1746341
Level 7
Level 7
10 comments on KBA 5 comments on KBA First comment on KBA

kausik

A simple question: Does cypress team ever successfully test OTA2 on STM324xx platforms?

If yes, can you share the experience.

If no, do you have plan to support OTA2 on STM324xx platforms?

0 Likes

Since this is a source of confusion across multiple customers, one of the goals we have in the upcoming quarter is to work closely with the core engineering team to document exactly what is and is not supported within OTA2. As part of the exercise, we will also determine when the standard OTA is preferred.

sdefriscokausikgangirashjamd

0 Likes

I'm asking a very simple question, but your repry is so confusing?

Do you know anyone successfully run OTA2 on STM32F4xx platforms?

0 Likes

Yes.  I believe there was one tier 1 customer that we walked through this process.

0 Likes

mwf_mmfae wrote:

Yes.  I believe there was one tier 1 customer that we walked through this process.

Then it should be easy to provide a note in a few days so others can test with similar steps.

Waiting for the upcoming quarter for the documentation does not make sense at all.

0 Likes

It was a very custom high touch solution. We will do our best to determine if the same solutions can be applied to the broad market.

0 Likes

My understanding is that in addition to greatly increased RAM requirements for OTA2, most IoT designs also do not contain enough internal FLASH to accommodate the needs of OTA2, and will require external FLASH to store the code and data needed.

Withing the latest version of WICED Studio, take a look at the following: WICED-SDK/doc/WICED-OTA2.pdf

Notice in the revisions noted at the beginning of the document the following line item:

WICED-OTA2-R 1.06 October 17, 2016 Added FLASH and RAM requirements.

Then scroll down to these sections and note the memory requirements added int he form of tables:

4.1 Memory Requirements

4.1.1 OTA2 Flash Requirements

4.1.2 OTA2 RAM Requirements

It seems that many of these exceed the memory resources typically available in most STM32 processors which are integrated in the modules we offer through our module partners.

In speaking with the core SW team, it seems that this is the main issue for OTA2 on STM32 platforms supported within the broad market.

0 Likes

Your statement is totally different from what the wiced team replied on Mar:

In this thread:

https://community.cypress.com/message/26115#26115

nsankar mentioned: (Mar 3, 2016 5:38 PM)

OTA is deprecated and should NOT be used for any new development/design

OTA2 will be the preferred way and the only way supported going forward

nsankar mentioned: (May 18, 2016 7:01 PM)

OTA2 will apply to all platforms with external serial flash in the initial release. Future releases will address the need to have support for platforms with only internal flash.

So the combination you requested it would work.

Also the initial release would be focused on ThreadX from a qualification standpoitn but we would appreciate folks in the community testing our the FreeRTOS builds as well

That is why the OTA2 status is so confusing.

0 Likes
Anonymous
Not applicable

Actually, if working through the makefiles and the source code of the WICED framework, you will find that the OTA2 is applicable on STM32 platforms which equipped with external serial flash. So as long as the capacity of the external serial flash is large enough, the only thing to do is create the rules to deploy the OTA2 images and other resources for STM32 platforms.

Thanks for the feedback ielec

In talking to the team internally, quite a bit of RAM is also needed, which puts you at the high end of the STM32 portfolio with an external MCU and a WICED Radio Only Solution.  As noted in my other post, only a handful of these radio only solutions supporting WICED exist.

mwf_mmfae wrote:

Thanks for the feedback ielec

In talking to the team internally, quite a bit of RAM is also needed, which puts you at the high end of the STM32 portfolio with an external MCU and a WICED Radio Only Solution.  As noted in my other post, only a handful of these radio only solutions supporting WICED exist.

mwf_mmfae

Actually, if you already found that the RAM size is not enough for most STM324xx platforms, you should realize that the implementation in your OTA2 needs *fix*.

It's software, so you should consider change your design and implementation rather than stop supporting STM324xx platforms.

(You even does not tell how much memory is required and which part of the OTA procedure takes the largest part of the memory.)

0 Likes
Anonymous
Not applicable

Zentri Provides "out-of-the-box" OTA Support, if development is done using Zentri OS of-course.

The document shows the application size cannot exceed 28K. So Cypress OTA2 should have *similar* requirments.

ZentriOS-WZ-3.3 SDK Developing with ZentriOS - Zentri Documentation

OTA is a very important piece, almost a necessity. Having clear documentation and application examples of OTA (where firmware/application is auto updated from server, not manually in SoftAP mode which documentation seems to be focused on) will really go a long way for us non-Tier1 companies.

@mwf_mmfae please ask top management to provide more resources and $$ for this !!

0 Likes

nsankar is no longer with us. In addition, while very technical, he was not a member of the core engineering team.

I am not aware of any plans to deprecate OTA. My broad market team would also oppose this change as we would be left with no OTA for the broad market modules we support though partners.

Agree that OTA2 is confusing, which is why I am trying to create a decoder ring internally to define what boundaries we need to apply for OTA2. By design, it requires alot more memory (Flash and RAM) than almost all of the STM32F411/12 based partner modules we support supply on their internal MCUs.

Partners like LSR/Laird (Sterling LWB for WICED) and Inventek ("Virtual WICED") offer options for using your own MCU with one of their radio only solutions, which means that you could then select an STM32 with the most amount of RAM available (one that also supports external flash), then leverage OTA2, but this is not going to be the optimal approach for most.

0 Likes

mwf_mmfae wrote:

nsankar is no longer with us. In addition, while very technical, he was not a member of the core engineering team.

Sigh, that is not a good excuse.

From my point of view, it's a confirm from WICED team that OTA2 will support all platforms and even with FreeRTOS build.

Looking at the timing in that thread, you will understand why I have wrong expectation with the OTA2 feature for a very long time. I give up now.

0 Likes
Anonymous
Not applicable

WICED-Studio-4.0.1 has changed the boot procedure and the procedure on the new SDK does make sense.

0 Likes

ielec wrote:

WICED-Studio-4.0.1 has changed the boot procedure and the procedure on the new SDK does make sense.

I don't get it. Does it work for you on your STM32F4xx platform?

In additional, can you point out which part is wrong in older SDKs?

0 Likes
Anonymous
Not applicable

That does not mean that the OTA2 works on STM32F4xx platform and the question is only about the WICED application boot procedure when applying OTA2.

What I described on the first post is the wrong thing in the older SDK.

As far as I know, the OTA2 in the new SDK is still under developing, since I can't find required rules to build and deploy the new added failsafe app, though the failsafe app is a really awesome and important functionality for OTA2.

Honestly, I feel the wiced team simply cannot clearly describe the status of OTA2.

If you read the CHANGELOG.txt, you will find:

Changes for WICED-SDK 3.5.2

* Added secondary OTA and Factory Reset Support (OTA2)

   * enhanced functionality for updating more system components

Some people might consider OTA2 is well supported by above statement.

However, if you read the post on the forum, it's clearly OTA2 is only tested on BCM43907.

But the replied from wiced team is "OTA2 is not supported for all platforms". So confusing reply.

There are some questions about "OTA2 on stm32f4xx platforms" since 9 months ago.

Turn out the replied from  mwf_mmfae means OTA2 is not supported for STM32F4xx at this moment.

0 Likes
Anonymous
Not applicable

What we can do now is just be patient. I have faith in the WICED team and they will provide a full implemented and reliable OTA2 mechanism.