cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

New Contributor II

Hi there,

I save some data in flash, it works fine. I'm storing it in array 2 because I think the firmware isn't using this space, but I'm not sure.
How can I avoid a conflict between data storage and firmware?

I'm using a CY8C5888LTI-LP097.

Thank you very much

0 Likes
Reply
1 Solution
8 Replies
Honored Contributor

xy,

I believe the em_EEPROM takes care of that.  It allocates FLASH space for the emulated EEPROM in pages where the code is not.

If you want more control over where the em_EEPROM is stored there are ways to define where in FLASH to store your data.  It requires knowledge of the device you're using, your compiled code size and linker file manipulation.

Since you are using the PSoC5LP, there is 2K bytes of real EEPROM available.   Smaller row sizes (16 bytes) and longer endurance (> 1,000,000 erase/write cycles @ 25C).

Len

Len
"Engineering is an Art. The Art of Compromise."
0 Likes
Reply
New Contributor II

Maybe thats is an idea, I will look in the em_EEPROM-code and look how they handel that. Thanks

The firmware needs 95000 bytes (36,1%) the bulkdata 50000 bytes of flash.

Can I be sure that firmware is using exclusivly the 95000 bytes from address 0?

I am still open to further suggestions.

0 Likes
Reply
Honored Contributor

xy,

I believe the linker's output of the .map file should indicate where in FLASH the em_EEPROM is placed.  Knowing the sector size of FLASH (16K) you can confirm that the data area is isolated from the code area.

Note:  If your data size was smaller, there is 32K bytes of ECC protected FLASH.  This will allow for a single-bit correction and dual-bit corruption detection.

Len

Len
"Engineering is an Art. The Art of Compromise."
0 Likes
Reply
Moderator
Moderator

How do you get the 95000 bytes, could you attached your test result screenshot?

I think the Em_EEPROM or the EEPROM is a good idea.

Could you  clarify how many bytes you want to store?

0 Likes
Reply
New Contributor II

"...How do you get the 95000 bytes, could y.."

This is the result from a build-message:

Flash used: 96628 of 262144 bytes (36,9 %).

SRAM used: 17829 of 65536 bytes (27,2 %). Stack: 2048 bytes. Heap: 512 bytes.

I have to store up to 50000 bytes.

0 Likes
Reply
New Contributor II

Is this also valid for PSoC5 ?

0 Likes
Reply