How CYW20706 download application from serial Flash to RAM ?

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

cross mob
Anonymous
Not applicable

As we know,CYW20706 will download application from serial Flash to RAM when boot.

Is the whole or part  data in serial Flash downloaded to RAM?

If it is the whole data downloaded to RAM,Does that mean a larger capacity serial Flash is meaningless because of the limited 352KB RAM of CYW20706?

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

There are two ways to access flash beyond what is allocated for the app executable:

1. Using the APIs in 20706-A2_Bluetooth/include/wiced_hal_nvram.h, you can access the volatile section of the flash. This is a space allocated for the use of the embedded app to store small pieces of persistent data. Size of this section is about 13.5KB.

2. To use the raw flash storage beyond what is allocated by the WICED platform, you can access it using the APIs in 20706-A2_Bluetooth/include/wiced_hal_sflash.h. Note that the sections allocated for use by the WICED platform will be off limits to overwrite using these APIs, but can still be read. Also, there are some limitations on the max size of the flash you can use due to the address width (max 24 bit address).

Jacob

View solution in original post

4 Replies
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

The amount of RAM available for the application depends on what features the app expects to have enabled.

I spoke to the developers and roughly 100K is a good starting point, and then based on features (multiple LE connections, A2DP audio offload etc), it could be 100K +/-20K.

0 Likes
Anonymous
Not applicable

Yes, the entire application code gets copied from flash to RAM. Having a larger capacity serial Flash enables you to store additional user data, bonding data, data specific to OTA and so on. If you do not need to store any of these, then yes, a larger capacity serial flash is not beneficial.

JeLi_2512051
Level 1
Level 1
Distributor - Weikeng(GC)
First like received First like given Welcome!

As you said the entire application code gets copied from flash to RAM,but the RAM of CYW20706 is 352KB,if I use an 2MB external Flash,how to use other capacity beyond 352KB?

0 Likes
JacobT_81
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

There are two ways to access flash beyond what is allocated for the app executable:

1. Using the APIs in 20706-A2_Bluetooth/include/wiced_hal_nvram.h, you can access the volatile section of the flash. This is a space allocated for the use of the embedded app to store small pieces of persistent data. Size of this section is about 13.5KB.

2. To use the raw flash storage beyond what is allocated by the WICED platform, you can access it using the APIs in 20706-A2_Bluetooth/include/wiced_hal_sflash.h. Note that the sections allocated for use by the WICED platform will be off limits to overwrite using these APIs, but can still be read. Also, there are some limitations on the max size of the flash you can use due to the address width (max 24 bit address).

Jacob