2016-02-26 06:19 AM
Is anyone aware of a method or even the feasibility to transfer captured data from the ADC module, transferred to SRAM, then stored to non volatile memory (flash) section of the Cortex M0 Arm core without having to externally store the data to another device?
Example: An application requires to count people walking through a doorway. This data can be easily acquired and stored in Cortex M0 SRAM. However if the system lost power or reset, the data is lost. The application would required to update the data every time a count occurred. The data captured in SRAM would then need to be transferred to a non volatile (flash) area of the internal memory of the device. #memory #cortex-m02016-02-26 07:48 AM
Think about battery buffering the RTC and using the RTC general purpose registers for non-volatile storag. Or think about using an L0 with EEPROM. Otherwise writing to flash will stall flash based code during write and erase and will easily wear out the flash.
2016-02-26 08:12 AM
+1 for BKPRAM
The L0 is designed to run from a battery, shouldn't be hard to construct an external supply + battery arrangement that would do this quite effectively.2016-02-27 01:23 AM
Perhaps a MCU system with FRAM memory would serve you better.
FRAM has a practically unlimited number of R/W cycles, much faster access times, and simple byte/half-word/word access. Well, but not yet from ST ...2017-05-31 06:12 PM
Hi, Mark!
1. For writing data to eeprom or flash, you may check hal libraries api functions in stm32f0xx_hal_flash.h or stm32f0xx_hal_flash_ex.h. Examples are in STM32Cube_FW_F0_Vx.x.x\Projects\STM32F070RB-Nucleo\Examples\FLASH. (if you are using F070)
2. For backup power design, I found this application note quite helpful for me.
(How to design a VBAT system based on STM32L0/L1 series (with external components)
Good luck!