Questions tagged [flash]

Flash memory is a type of memory available on the Arduino boards. It can be accessed from a program using PROGMEM directive to store data. For questions about using and accessing flash memory, use this tag.

Filter by
Sorted by
Tagged with
6
votes
5answers
2k views

What happens if you write >10000 times to the flash memory of an ATmega?

I realized that I'm uploading code every 5 minutes and doing relatively intensive trial-and-error development, and that this habit could cause problems down the road, especially if I'm working on a ...
2
votes
0answers
260 views

Software flashing attiny167 from RPi with avrdude

I am trying to flash a program onto an attiny167 (already bootloaded with the micronucleus bootloader) with a Raspberry Pi via avrdude and USB. Background I have 50 Raspberry Pi 3B's connected to an ...
5
votes
3answers
2k views

External Flash Memory File System

I'm building a weather data collector and I want to be able to dump that weather data somewhere. I've considered the options, and since I'm going to be storing a fairly small amount of data (in the ...
0
votes
1answer
78 views

Question about configuration EEPROM or Flash

I want to make an external (not related to Arduino) computer application that creates a big 'setup file' (like max. 64 KB). This setup file contains lookup tables (which are configurable and the ...
1
vote
1answer
798 views

Storing data on AT24C02 EEPROM chips with Arduino

I have recently come across some 8-pin 128-byte EEPROM chips. I've seen those USB EEPROM chip programmer units, but I was wondering if there is any way I could manually store data on the chip with my ...
0
votes
1answer
491 views

Avrdude fails to verify after upload

I'm using the most recent Arduino IDE to upload a sketch to an Arduino Uno, and the upload seems to succeed, but the final verification step fails with the error: avrdude: AVR device initialized and ...
4
votes
1answer
1k views

Flash String Helper object as variable

So I have a Bunch of commonly used char arrays to build commands in my library. So to preserve memory, I have them put into flash, via PROGMEM ext, typedef const char PROGMEM ProgChar; ProgChar AT[] =...
0
votes
1answer
438 views

How to save a hex file into Arduino Flash to send it via Serial?

I have a text file with hex values formatted in the following style: A0 3F 55 01 00 C7 55 01 00 C7 AA 29 71 11 00 0B 00 C7 AA 29 71 1F AA 29 71 11 55 01 A0 3F 55 DC ... How can I save this data into ...
0
votes
2answers
545 views

Store data in flash/EEPROM and process it in parallel

I want to store incoming data in flash or EEPROM and then apply FFT or some other method to detect frequency and intensity. I am taking sound through microphone amplifying it with an LM741 and giving ...
0
votes
1answer
320 views

How do I send data to an Arduino via light flashes

I want to send a very small amount of data to an Arduino via visible light ( blinking lights on a screen ). The data is no more than settings and the rate does not have to be fast. Does anyone have a ...
3
votes
2answers
916 views

What programming practices should be adopted while coding sketches for Arduino?

What are some of the best programming practices that can be adopted while coding sketches for Arduino, so that it uses the least memory and performance should not suffer from memory outage, and still ...
1
vote
1answer
145 views

Firmware update for remote situations

We are currently deploying units with the ATMEGA328 chip. Currently, all ICs have been flashed using the Arduino IDE. Upon release, we would like to offer updating of firmware in some cases, but ...
1
vote
0answers
105 views

In-application programming for the Arduino Uno

I would like to know if it is possible to read from and write to the microcontroller's (Arduino Uno's ATmega328P) flash memory using a program or "bootloader" previously stored in the flash memory (or ...
4
votes
3answers
2k views

Set EEPROM from PC before program

I have been working on an arduino program, which has gotten rather large. I am close to hitting the 32k limit on Flash for my ATmega328p. I would like lower my program size by saving some of my many ...
1
vote
1answer
694 views

ESP8266 stuck in flash mode?

I have the setup described here: https://learn.adafruit.com/esp8266-temperature-slash-humidity-webserver/wiring I currently have the reset pin set to float and the GPIO0 pin grounded, which should ...
1
vote
1answer
357 views

Connecting Winbond W49F002U-12B to Arduino Mega

I am trying to connect a CMOS flash memory Winbond W49F002U-12B to an Arduino Mega, but failing. What I did: Read the Winbond W49F002U-12B datasheet. The key points are: CE - chip enabled; OE - ...
0
votes
2answers
427 views

Using Arduino IDE as an API

I have a project where it would make a lot of sense to generate Arduino compatible source code, compile it and flash it based on some settings in the project software. Is there any way to do this ...
-1
votes
1answer
78 views

Files to YUN flash?

Is there a directory where, if I put files there, they will be on the Yun's internal flash instead of the SD card? ex. No SD card error handler file. I'm using openssh-sftp-server for a sftp server, ...
2
votes
0answers
368 views

Flash Arduino Due via UART

I would like to write code in Arduino language, compile it in the Arduino IDE, grab the resulting binary code, and flash it to the Due via the TX/RX UART pins, bypassing both the USB Programming Port ...
0
votes
1answer
215 views

Is there any way to flash sketches using custom firmware?

I am using HIDUINO as my firmware (flashing via dfu-programmer), and to upload sketch I need to re-flash original firmware, upload sketch and then flash HIDUINO again. Is there a way to flash ...
1
vote
1answer
1k views

Any way to use F macro with a passed variable?

I want to know if it's possible to use the F() macro on text that is being passed to a function. This is an example function: void displayMenu(const char * txt, byte &var) { lcd.clear(); lcd....
2
votes
1answer
882 views

Better method for PROGMEM data access with multiple indirection?

-edit- This is a simplified recreation of personal learning project I have ongoing. My issue is in accessing data in flash, the path to which includes multiple layers of indirection. When the data ...
0
votes
1answer
488 views

Unable to upload code to the Arduino Nano

I tried to to upload a hex file I generated for the Arduino Nano using avrdude but I keep getting the error: avrdude: stk500_2_ReceiveMessage(): timeout First the arduino board stops doing whatever ...
3
votes
2answers
8k views

Using PROGMEM to store array of structs

I am hitting the limits of my arduino's SRAM and found that SRAM usage can be reduced by storing static stuff in flash memory instead of SRAM. My project can (optionally) be built with an included ...
3
votes
2answers
5k views

How to read/write variables persistenly on Arduino Due (no EEPROM/shield)?

I am relatively new to Arduino and I am currently writing some code to control a relay board. The on/off times are provided by the user at run-time and should be stored persistently (EEPROM or flash) ...
1
vote
1answer
1k views

Flash a .hex to an ATtiny45 with Arduino

I'm trying to upload a hex file to an ATtiny45 with an Arduino. I uploaded the Arduino ISP sketch to my board. I connected the ATtiny as shown below: Then I go to CMD and type: avrdude -c avrisp -p ...
5
votes
2answers
1k views

Store floats in and reading them from flash

How do I store floats in flash and how do I read them from there? (I need a look-up table for pairs of float values.) The storing part doesn't seem to be so difficult as this compiles: PROGMEM float ...
2
votes
1answer
496 views

What protocols and tools does Arduino Due use for flashing and debugging?

I am interested in writing a simple C program outside of the Arduino IDE and respective libraries, but deploying it directly to an Arduino Due (which uses a SAM3X8E ARM MCU). I am trying to figure out ...
2
votes
2answers
392 views

How do I implement a userspace bootloader on Arduino Due?

Is it possible to use a custom bootloader, that loads and executes a main program stored for example on an SD card? The idea is to make it possible to update the Arduino remotely. I tried this with a ...
0
votes
2answers
174 views

Storing data (strings) if ethernet fails to send it

Flow goes something like: Read sensors Send data If send fails store the data in eeprom/flash/sd If sent check if any previous ones have failed and send those So my question is what's the best ...
2
votes
1answer
737 views

Unable to upload sketch after bootloader has been flashed on Arduino Micro

I have created my own custom Arduino Micro, but I am experiencing problems when I attempt to upload an sketch via USB in Arduino IDE. Here is how I program the Arduino Micro: avrdude -c ...
0
votes
2answers
1k views

Cheap 2-5mb memory to use with arduino

I'm looking for a storage solution for small files that would be moved into a small sensor running arduino-like processor. Ideally the single memory unit would be cheap (in 1-10 cents range), but the ...
8
votes
3answers
8k views

PROGMEM: do I have to copy data from flash to RAM for reading?

I have got some difficulties understanding the memory management. Arduino documentation says, it is possible to keep constants like strings or whatever I don't want to change during runtime in ...
1
vote
1answer
704 views

What is the capability of AVRISP and USBASP on ATMega48, 328, 2560?

For use with ATMega 48 (old Arduino?), 328 (UNO, Pro Mini) and 2560 (Mega2560) chips, what is the capability for the AVRISP and USBASP programmers on: Can it read, write fuse? Can it read, write ...
5
votes
2answers
4k views

Is it possible to run a binary from EEPROM?

Say I wrote a compiled sketch to EEPROM then read it. Could I run the program from EEPROM? I guess the question is: Can an Arduino run software not in flash memory in the middle of executing the ...
0
votes
1answer
201 views

question about progmem

I have a problem understanding the following code: PROGMEM prog_uint16_t x={1232,3232,43343}; rawlen = pgm_read_word_near(x); memcpy_P(uSendBuff, pfSendBuff+1, rawlen * sizeof(uint16_t)); Why do we ...
2
votes
3answers
2k views

Wrong data from DS18B20 temperature sensor after long power off

I have my Arduino Uno connected to the PC via USB when prototyping. I am developing a thermometer with memory, using DS18B20 sensors. When PC is shut down, there is no power on the USB and the ...
1
vote
1answer
286 views

Error building Arduino WiShield Flash example: 'dflash' was not declared in this scope

I'm using WiShield library from: https://github.com/jcmuller/WiShield What is wrong with this library? The code: /* * Web Server using Flash * * A simple web server example using the WiShield 2....
7
votes
4answers
4k views

Where can I find out how to make a hex file for arduino firmware?

I have followed this tutorial on flashing my Arduino R3 to turn it into a "USB keyboard", but the article doesn't explain how the hex works, it's just for granted. Where can I learn about how to make ...
5
votes
2answers
881 views

What are the FLASH_ARRAY/FLASH_TABLE macros in this code?

In this code for heating monitor, there appears to be macros called FLASH_ARRAY and FLASH_TABLE. I can't find any reference to them either in this code, Arduino, or on the Internet. What do they do? ...
15
votes
6answers
50k views

How do I erase the memory of the Arduino Uno?

I'm just a tinkerer learning Arduino with my son and I was surprised that when I plugged the USB cord back in to the Arduino the program was still running and I thought to myself, "it's a good thing I ...
28
votes
4answers
72k views

What can I do if I run out of Flash memory or SRAM?

According to the Arduino documentation, the ATmega328 has 32KB of Flash memory for the bootloader + uploaded sketch, and only 2KB SRAM for runtime data. The ATmega2560 has quite a bit more, totalling ...