This Help article discusses how to effectively execute multiple applications on the CYW943907AEVAL1F evaluation platform. To achieve switching between applications, you put device into deep sleep when current application is running and load another application when device resumes. WICED Application Framework (WAF) supports loading and storing of multiple application binaries in the external sflash. You can set the platform to execute any of the stored binaries.
There are three binaries APP0, APP1 and APP2 where you can store three different applications. By default APP0 application executes whenever we download the program.
There are two requirements for the application to perform switching:
All applications must use the same Application DCT.
All applications must use the same AON (Always ON) RAM defines.
In WICED SDK 5.0 and above, apps\snip contains two applications satisfying above requirements: multi_image_0 and multi_image_1.
multi_image_0 application prints text on console showing that application 0 has started and multi_image_1 application prints text showing that application 1 has started.
To set the APP0 to point to second application, check for following lines in the make file multi_image_0.mk:
To test the application, make following targets and build in the given order:
snip.multi_image_0-CYW943907AEVAL1F download download_apps run
When downloading to the device, the sflash_write application sets the device in an "always on" state. In this state, the device will not go into deep sleep. In order to use this feature you must power cycle the device before you can test. For more details, go through README.txt in multi_image_0 folder.
After downloading the program, you will see following text on UART terminal.
Now power cycle the device.
To see the information about AON RAM variables, use command info.
To switch the application, use command switch.
After putting these commands, you will see second application loaded as follows.