question on psoc5 flash

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

cross mob
qizh_1205111
Level 1
Level 1

Hi,

only get info that the flash total size is 256KB and the row/block size is 256Byte,

what's the size for array ?

the write unit is in row ?

thanks.

0 Likes
1 Solution

Hi,

How much non-volatile memory do you need?

There are three practical options for you.

  1. The PSoC5 provides up to 2K of EEPROM.  This type is designed for most person's needs of NV memory.
  2. Use the PSoC5 FLASH as emulated EEPROM.  This can provide more NV memory but it has its limitations.
    • Write endurance may be more limited compared to EEPROM.
    • It takes longer to erase/write than EEPROM.  This is usually because the sector size is larger.
    • Care must be taken in segmenting the emulated EEPROM space. It's inadvisable to share the same sectors as Application code or data.
    • Because the sector size is much larger, writing only a few bytes requires writing the whole sector.  This potentially decreases the endurance of the other variables in the sector that don't get changed often.
  3. Use external EEPROM using a SPI or I2C interface.  Cypress just introduced a FRAM non-volatile with infinite endurance cycles.  It can also come in very large sizes (4Mb =  500KB).

Len

Len
"Engineering is an Art. The Art of Compromise."

View solution in original post

4 Replies
LinglingG_46
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 10 questions asked

what is the size for array?

What's the type of your definition of the array? I think you should care more about the SRAM size instead of the flash. Unless you define the array as the "const" type.

the write unit is in row ?

The write unit is byte.

Could you tell us why do you have this question?

0 Likes

i mean flash, to store data even power off.

the array i mentioned is flash array in probuilt library,  so need to figure out the flash structure.

    cystatus CyWriteRowData(uint8 arrayId, uint16 rowAddress, const uint8 * rowData)

0 Likes

You can refer to the code example in creator: Flash Example.

The size of the array should not be larger than 256 bytes.

0 Likes

Hi,

How much non-volatile memory do you need?

There are three practical options for you.

  1. The PSoC5 provides up to 2K of EEPROM.  This type is designed for most person's needs of NV memory.
  2. Use the PSoC5 FLASH as emulated EEPROM.  This can provide more NV memory but it has its limitations.
    • Write endurance may be more limited compared to EEPROM.
    • It takes longer to erase/write than EEPROM.  This is usually because the sector size is larger.
    • Care must be taken in segmenting the emulated EEPROM space. It's inadvisable to share the same sectors as Application code or data.
    • Because the sector size is much larger, writing only a few bytes requires writing the whole sector.  This potentially decreases the endurance of the other variables in the sector that don't get changed often.
  3. Use external EEPROM using a SPI or I2C interface.  Cypress just introduced a FRAM non-volatile with infinite endurance cycles.  It can also come in very large sizes (4Mb =  500KB).

Len

Len
"Engineering is an Art. The Art of Compromise."