ATmega32 write data to flash

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How can i store data to a blank page of flash during program is executing?

 

EDIT: the data which saved in flash, must be remain forever until re-writed by new data, by mcu.

Last Edited: Sun. Dec 21, 2014 - 01:06 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

the first step is to read the datasheet so you understand the operation and constraints when using the flash. Then you read the manual on your compiler toolset to understand the functions for using the flash.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The third step is to realize that this is a bad solution to your problem as writing to flash is slow, can only be written a page at a time, can only be written from the bootloader section, and has a limited number of writes before it wares out.

 

Perhaps if you tell us how much data and how often it will be written, we could give you a better solution.

Regards,
Steve A.

The Board helps those that help themselves.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Use the internal eeprom, an external eeprom, or an sd card?

Imagecraft compiler user

Last Edited: Sun. Dec 21, 2014 - 07:28 PM