Questions tagged [flash-memory]

Flash memory is an electronic non-volatile computer storage device that can be reprogrammed and erased electrically.

Flash memory is a non-volatile type of memory used in products such as flash drives and solid-state drives. In addition to being non-volatile, flash memory offers fast read access times, although not as fast as static or .

369 questions
29
votes
2 answers

ESP32: Best way to store data frequently?

I'm developing a C++ application in the ESP32-DevKitC board where I sense acceleration from an accelerometer. The application goal is to store the accelerometer data until storage is full and then send all the data through WiFi and start all again.…
tsarquis88
  • 453
  • 1
  • 6
  • 14
14
votes
1 answer

Allocating memory in Flash for user data (STM32F4 HAL)

I'm trying to use the internal flash of an STM32F405 to store a bunch of user settable bytes that remain after rebooting. I'm using: uint8_t userConfig[64] __attribute__((at(0x0800C000))); to allocate memory for the data I want to store. When the…
HammerFet
  • 841
  • 3
  • 10
  • 16
13
votes
1 answer

Write on a mtd block device

I'm trying to write on a NAND flash memory using MTD block device but I don't understand everything. As I read here mtdblockN is the read only block device N mtdN is the read/write char device N mtdNro is the read only char device N But I'd like…
marmottus
  • 351
  • 1
  • 3
  • 18
12
votes
3 answers

What is a good filesystem for embedded NAND drives?

I am working on an embedded application that uses NAND flash for storage. As it looks now, we won't use Linux or any other RTOS. The application must handle unexpected power downs. We have been looking on different file system solutions, including…
Johan Kotlinski
  • 25,185
  • 9
  • 78
  • 101
11
votes
1 answer

What does flushing the database mean? Also with "flash"

I want to know what "flush" and "flash" means and the difference between them.
user5150273
  • 195
  • 1
  • 2
  • 8
10
votes
5 answers

When do I use xdata?

I am new at embedded system programming. I am working on a device that uses an 8051 chipset. I have noticed in the sample programs that when defining variables, sometimes they use the keyword xdata. like this... static unsigned char xdata…
PICyourBrain
  • 9,976
  • 26
  • 91
  • 136
9
votes
2 answers

How to write/read to FLASH on STM32F4, Cortex M4

I want to write a variable, for example an integer with the number 5 to the FLASH and then after the power goes away and the device is turned on again read it. I already know that in order to write something I first need to erase the page and then…
Alex M.
  • 351
  • 2
  • 5
  • 12
9
votes
2 answers

Erasing Flash NOR: ioctl(MEMUNLOCK) return status?

I'm trying to erase a NOR Flash memory with Linux MTD driver in C... I'm confused about the return status from the ioctl(MEMUNLOCK) call which returns an error even if ioctl(MEMERASE) is successful after it. The following code displays the warning…
Mousstix
  • 303
  • 1
  • 3
  • 8
8
votes
1 answer

EEPROM emulation on stm32 using HAL drivers

I am trying to emulate EEPROM on stm32f0. There is an application note provided by STM. In the sample main.c, int main(void) { /*!< At this stage the microcontroller clock setting is already configured, this is done through SystemInit()…
user6064424
8
votes
5 answers

Circular Buffer in Flash

I need to store items of varying length in a circular queue in a flash chip. Each item will have its encapsulation so I can figure out how big it is and where the next item begins. When there are enough items in the buffer, it will wrap to the…
Robert Deml
  • 12,390
  • 20
  • 65
  • 92
7
votes
2 answers

Can't write to flash memory after erase

So I can't write to internal flash memory directly after erasing it. If there's no erase operation before write operation, then I can. Any ideas as to why? Programming function returns 'successful write' value, but when looking at memory, no data is…
andrey
  • 1,515
  • 5
  • 23
  • 39
7
votes
1 answer

Can't back up SD card with dd, complains "Input/Output Error"

I have successfully backed up my SD card twice by issuing the following command sudo dd if=/dev/sdb of=/home/user/Documents/raspi/images/raspi1.v2.iso bs=1M However, now it is giving me the following error: dd: reading `/dev/sdb': Input/output…
puk
  • 16,318
  • 29
  • 119
  • 199
7
votes
2 answers

Should I be concerned with flash memory write cycles resource limits?

I am writing an Android application which writes data to a file several times a second, the overall file size is around 1MB, after that file gets erased and new file started. Should I be concerned about wearing out the phone's flash memory, causing…
Ma99uS
  • 10,605
  • 8
  • 32
  • 42
6
votes
1 answer

How to write to STM32 Flash

I want to write to flash Sector 11 of STM32F407VGT from my user code to store some data. I have used the stm32f4xx_hal_flash.c library. I first erase the sector using this code: void Flash_Init(void) { FLASH_EraseInitTypeDef…
b7031719
  • 120
  • 1
  • 2
  • 8
6
votes
1 answer

ATmega328 + SPI Flash Memory

Preface: This question is about a project I am working on with a professor at my university. It is NOT for a grade, but my reputation with this professor does matter. So while my success on this project is important to me, I do not see it as unfair…
NickHalden
  • 1,469
  • 2
  • 20
  • 31
1
2 3
24 25