I was reading up on the flash eeprom and best I can tell for the stm32f chips this is needed. micromouseusa.com/
Has Keil mdk5 not provided a simple function?
So, if you have a chip without it, you're either going to have to add it externally or emulate it in Flash.
Or is battery backup an option for you?
ST have an App Note on emulating EEPROM in STM32 Flash - but note that their supplied linker script is fundamentally flawed (it doesn't tell the linker that some flash is being used for the EEPROM emulation).
Yes, it gets complicated because of wear-levelling and coping with erasing & re-writing the data in Flash.
Other manufacturers have similar App Notes - you might also be able to get ideas from them...
Sorry I was not clear on that.
I have a st32f205 with eeprom on the chip, I simply just want to write and read form it. This "emulating EEPROM" is confusing me. Is there no easy way to write/read to eeprom on the chip. All the info I find talks about this "emulating EEPROM" when searching for how to use the eeprom.
Yes that may have been the section that game us the clue that eeprom was available. In our situation a battery would work. If enabled in code, could eeprom be read and written to in the normal convention )(via a command)?
is this what I need? stackoverflow.com/.../how-to-use-backup-sram-as-eeprom-in-stm32f4
Yes, although I think calling it NVRAM will be more inline with what it is.
Guessing ill have to convert this to 205. I had to fix the implicit declarations with prototypes.
static void RCC_AHB1PeriphClockCmd(char, bool); static void RCC_APB1PeriphClockCmd(char, bool); static void PWR_BackupAccessCmd(bool); static void PWR_BackupRegulatorCmd(bool);
but the following are unknown to the 205 RCC_AHB1Periph_BKPSRAM RCC_APB1Periph_PWR
Guessing the 205 has different naming and possibly different address ranges. The data sheet shows AHB1 with a BKPSRAM perf but these are unknown to the IDE. Do I have to enable this in RTE or add an include.
Surely, ST provide examples of how to do this for the specific chip that you have?
Yes, it is important to know (at least for you to know) what ST libraries you are using, assuming that you are in fact using some. There is the STM32F2xx_StdPeriph_Lib of which the example you posted uses. It fully supports the STM32F205. There is also the STM32F2xx_HAL_Driver?
The linked Stack Overflow thread specifically states that it uses STM32F4xx_DSP_StdPeriph_Lib - which is clearly not the one for STM32F2...
I have STM32F2xx_StdPeriph_Lib_V1.1.0 to hand.
It does, indeed, have a Backup Domain example - in Project\STM32F2xx_StdPeriph_Examples\RTC\BKP_Domain
I don't see the example in C:\Keil_v5\ I normally use the pack installer and I don't see it in there either. Anyone have a link to the example. I can't find it searching the net.
"Get Software", bottom of the page gets you to the software examples Andrew and I have worked with. www.st.com/.../stsw-stm32062.html
Ok thx, one thing before I start this journey. Is this example only going to get me the 80 bytes? I read the RTC only had 80 and the other (more battery drain) had more.
The RTC has 80 bytes of backup registers, as I recall.
The BKPRAM (NVRAM) has 4KB
hmm, same errors as my post on 22-Aug-2017 15:28
Many definitions missing. I tried to included #include "stm322xg_eval.h" but it is not found and also not included in the example download.
Again, what firmware library are you using? CLEARLY (at least to me) you are not using the STM32F2xx_StdPeriph_Lib. Your examples that you have posted are expecting you to be using that firmware library. The reason you are getting errors EVERY TIME you build your example code is because it is making references to the STM32F2xx_StdPeriph_Lib and you are not actually using that library.
The library is stm32f2xx_hal
After destruction with the team and considering nvram/i2c, eeprom, flash. We decided to go with flash. Eeprom emulation or may what "Clive One" suggested. Can anyone suggest a way to see the flash after I do a test write? A visual debug would be essential in troubleshooting.
oops / discussion - but sometimes does feel like destruction.
I found a project of some help.
github.com/.../eepromConfig.h
It compiles all but he flash erase.
flashErase.NbPages=1;//error no member flashErase.Banks = FLASH_BANK_1; flashErase.PageAddress = _EEPROM_FLASH_PAGE_ADDRESS; //error no member flashErase.TypeErase = FLASH_TYPEERASE_PAGES;
and FLASH_TYPEERASE_PAGES does no exist.
flashErase has; voltageRange nbSectors sector
guesssing nbSectors/sectors and nbPages/PageAddress interchangeable? and how can I find the missing define FLASH_TYPEERASE_PAGES what would I use for a voltageRange?
View all questions in Keil forum