How to use CY_SECTION(".cy_sflash_user_data")

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

cross mob
KeCo_3781066
Level 3
Level 3
10 replies posted 5 questions asked 5 sign-ins

Does anyone have an example of how to use CY_SECTION(".cy_sflash_user_data") to prepopulate SFLASH User data?

0 Likes
1 Solution

Not sure if I get what you mean.

You can locate your data into CY_SECTION(".cy_sflash_user_data") in firmware. The target data would be programmed into device with the hex file.

View solution in original post

0 Likes
5 Replies
ShipingW_81
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 replies posted

This section is used to store user data. However, it does not mean you can use this section freely.

The specific allocation for this section is listed in cydevice_trm.h, where only the rows marked with CYREG_SFLASH_USER_FREE_ROWx can be used for user data, especially when BLE functionality is enabled in your application.

Sorry, my question wasn't clear.  I meant is there a way to prepopulate usable sflash rows at programming time?  I'm able to read/write programmatically to it.

0 Likes

Can you tell more details about the meaning of "prepopulate usable sflash rows at programming time"? What kind of data you want to store in sflash?

0 Likes

We use the user rows of SFLASH to store our device's configuration.  I was hoping there was a way to flash our devices 'default config' during programming. 

Thanks for your time.

0 Likes

Not sure if I get what you mean.

You can locate your data into CY_SECTION(".cy_sflash_user_data") in firmware. The target data would be programmed into device with the hex file.

0 Likes