flash protection

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

cross mob
Anonymous
Not applicable

I am about to complete a Creator project for PSoC3 (my first major project) and would like to add some flash protection before I release it for use.  I read in a TRM or somewhere that the flash protection can't be used for bytes that hold SPC data such as EEPROM memory.  My question is:  how do I find which addresses are being used for my EEPROM memory so I can exclude flash protection on those bytes? 

0 Likes
1 Solution
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

From the datasheet -

   

 

   

There is no need of APIs to read from the EEPROM. The entire content of the EEPROM is
mapped into memory space and can be read directly. EEPROM allows read access at the byte
level. The following defines are used for reading EEPROM:

   


 CYDEV_EE_BASE                                  The base pointer of the EEPROM memory
 CYDEV_EE_SIZE                                    The size of the EEPROM memory space in bytes
 CYDEV_EEPROM_ROW_SIZE             The size of a row of the EEPROM in bytes

   


Using the base pointer, individual bytes of the EEPROM memory can be read.

   

 

   

There is a project available on start page of Creator so you can look at how R/W to EEPROM

   

is done.

   

 

   

Basically you have a set of data that you want stored in EEPROM. As the definer of the data

   

typically you write a rows worth at a time to the EE. And as definer you know its size and how

   

its packed into the row format. That in turn gives you the # rows you will be writing, 16 bytes at

   

a time. In Creator, double clicking *.cydwr will lead you to a group of tabs, and one of them

   

is flash protection. So you would un protect those rows that you intend to write.

   

 

   

Note .map file will show you whats mapped into all memory regions.

   

 

   

www.cypress.com/

   

 

   

Regards, Dana.

View solution in original post

0 Likes
6 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

The eeprom is not flash (as emulated eeprom) so no need to exclude it from protection, it lies outside of the normal address space.

   

 

   

Bob

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

From the datasheet -

   

 

   

There is no need of APIs to read from the EEPROM. The entire content of the EEPROM is
mapped into memory space and can be read directly. EEPROM allows read access at the byte
level. The following defines are used for reading EEPROM:

   


 CYDEV_EE_BASE                                  The base pointer of the EEPROM memory
 CYDEV_EE_SIZE                                    The size of the EEPROM memory space in bytes
 CYDEV_EEPROM_ROW_SIZE             The size of a row of the EEPROM in bytes

   


Using the base pointer, individual bytes of the EEPROM memory can be read.

   

 

   

There is a project available on start page of Creator so you can look at how R/W to EEPROM

   

is done.

   

 

   

Basically you have a set of data that you want stored in EEPROM. As the definer of the data

   

typically you write a rows worth at a time to the EE. And as definer you know its size and how

   

its packed into the row format. That in turn gives you the # rows you will be writing, 16 bytes at

   

a time. In Creator, double clicking *.cydwr will lead you to a group of tabs, and one of them

   

is flash protection. So you would un protect those rows that you intend to write.

   

 

   

Note .map file will show you whats mapped into all memory regions.

   

 

   

www.cypress.com/

   

 

   

Regards, Dana.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Memory map for PSOC 3

   

 

   

0 Likes
lock attach
Attachments are accessible only for community members.
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Attached.

0 Likes
lock attach
Attachments are accessible only for community members.
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Attached.

0 Likes
Anonymous
Not applicable

Thanks.  I think the memory map was exactly what I was looking for.  Between that and CYDEV_EE_BASE, the addressing makes sense now.

0 Likes