cancel
Showing results for 
Search instead for 
Did you mean: 

Eeprom emulation

aayala.db9
Associate II
Posted on July 08, 2015 at 14:03

I am working ok with eeprom emulation in my firmware, but I need increase the numers of variables and I can�t store all because with 16 bits to address size ''only'' store (2^16 -1) variables and I want store more variables. Is possible change address size from 16bits to 24 bits and data size from 16 bits to 8 bits?

Thans.

#eeprom-emulation
4 REPLIES 4
Posted on July 08, 2015 at 14:39

If you're writing a lot of data you should probably consider a more efficient/effective way of doing that, like using a structure, because the available flash memory is rather finite.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
aayala.db9
Associate II
Posted on July 08, 2015 at 15:02

Yes, you are right but I need do it in the flash memory at moment, I will add a external memory in the future. But it isn`t a problem of the size flash memory, it is a problem of possible address.

Posted on July 08, 2015 at 19:35

Yes, but the scheme you're using eats at least 4-5 bytes PER entry (24-bit addr, 16-bit data)

How MUCH linear data space are you trying to actually emulate and fill?

What STM32 part are you using? They make dozens, so it would help to understand which.

Your choices really are to review the EEPROM emulation code, understand how it works, and how to modify it to your own ends, if it's really capable of what you expect. Or understand how the FLASH works, and directly map your data there until you have your external device, what ever part# that is. Again knowing a part# would help to determine if it is practical for it to be emulated.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
aayala.db9
Associate II
Posted on July 08, 2015 at 22:58

No, I want to use the same bytes (8bits data + 24 bits ADDR). I am try store 96 KB, so, with sectors 5,6,7 and 8 of flash it`s enough. But the problem is that I want store 98304 variables and with the 16 bits of addr only I can store 65535 variables.

Ok, I try to change the code the eeprom emulation algorithm using the ''FLASH_ProgramByte'' function for store data and ''FLASH_ProgramByte'' for store Virtual addr, is this true?

Thank you very much for help.