Parameter section

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

cross mob
LuBe_4654241
Level 4
Level 4
50 sign-ins 25 replies posted 25 sign-ins

Hi,

in my project I have reserved the last page to parameters of application, but every load of firmware by PSoc Creator this section is erased, How can I avoid this ?

I am using CY8C4146 MCU.

Best regards

LuBe

0 Likes
1 Solution
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi LuBe, 

The entire application flash will be erased during the programming sequence each time you are programming the device.

Would it be feasible for you to store these parameters in the SFlash region? SFlash will not be automatically erased during programming. These threads should provide further details regarding SFlash - 

CySysFlashWriteRow() vs CySysSFlashWriteUserRow() - PSoC 4 FLASH API difference

Is it possible to clear SFLASH memory while programming in PSoC 4?  

You can use CySysSFlashWriteUserRow() to store the parameters in the SFlash region. Please refer to page 66 of the PSoC 4 System Reference Guide.

Thanks and Regards,
Rakshith M B

View solution in original post

0 Likes
7 Replies
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi LuBe, 

Can you please provide further information regarding your issue? What parameters are you referring to and are you storing these parameters in the flash region?

Thanks and Regards,
Rakshith M B
0 Likes
ARH
Level 3
Level 3
10 replies posted 5 replies posted 5 sign-ins

He is talking about the linker script.

What you need to do is help him fix that.

 

Alan

 

0 Likes

Hi,

store my parametes at the end of internal flash of MCU.

Best regards

LuBe

0 Likes
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi LuBe, 

The entire application flash will be erased during the programming sequence each time you are programming the device.

Would it be feasible for you to store these parameters in the SFlash region? SFlash will not be automatically erased during programming. These threads should provide further details regarding SFlash - 

CySysFlashWriteRow() vs CySysSFlashWriteUserRow() - PSoC 4 FLASH API difference

Is it possible to clear SFLASH memory while programming in PSoC 4?  

You can use CySysSFlashWriteUserRow() to store the parameters in the SFlash region. Please refer to page 66 of the PSoC 4 System Reference Guide.

Thanks and Regards,
Rakshith M B
0 Likes

Hi,

I have understood that I can use this area, but in the manual there is these phrase:

LuBe_4654241_0-1632122692179.png

 This means some rows are used for boot, what is user rows that I can use ?

Best regards

Luca Bernabei

0 Likes
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi Luca, 

Please note that you cannot store any application-specific data in the SROM region which is different from the SFlash region.

In the SFlash region, some rows are reserved for factory settings and these rows cannot be used for storing application data either. You can use the User SFlash region for this purpose. The address of the User SFlash region can be obtained by using the CY_SFLASH_USERBASE macro (refer to Memory Architecture section in page 63 of PSoC 4 System Reference Guide)

Rakshith_0-1632135081671.png

Thanks and Regards,
Rakshith M B
0 Likes

Hi,

it works well ! Thank you !

0 Likes