AVR-EEPROM gets erased during programming

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
Niro
Posts: 77
Joined: Mon Jan 03, 2011 8:58 pm
Has thanked: 29 times
Been thanked: 10 times
Contact:

AVR-EEPROM gets erased during programming

Post by Niro »

Dear all,

first of all: I used the forum search, and I already read the same topic concerning PIC...;-))

I have the same problem with an ATMega328P using FC4, but couldn't find a solution....
Could you please help?

Many Thanks,
Niro

Spanish_dude
Posts: 594
Joined: Thu Sep 17, 2009 7:52 am
Location: Belgium
Has thanked: 63 times
Been thanked: 102 times
Contact:

Re: AVR-EEPROM gets erased during programming

Post by Spanish_dude »

I think this an option you need to add or remove when flashing, but I don't know more about it. :?

Sean
Valued Contributor
Valued Contributor
Posts: 548
Joined: Tue Jun 26, 2007 11:23 am
Has thanked: 6 times
Been thanked: 44 times
Contact:

Re: AVR-EEPROM gets erased during programming

Post by Sean »

The option to save EEPROM data during a program download is controlled by the EESAVE fuse.

The default fuse settings recommended in the Flowcode documentation (Chip -> Configure menu) select the external crystal oscillator and cause all additional features to be disabled.:

0x0, 0xdf
0x1, 0xff


It is possible to use alternative settings (with reference to the manufacturer's device data sheets) to configure the device differently.
Note: Selecting a clock source that is not available to the device will stop chip operation and prevent it from being re-programmed in ISP mode.

There are several websites that provide AVR fuse value calculators

In the Flowcode configuration window, the first value in each pair is the fuse byte identifier, the second value is the fuse setting:

0x0 = Fuse High Byte
0x1 = Fuse Low Byte
0x2 = Fuse Extended Byte (if required)

Enabling EEPROM saving for the ATmega328P (with all other options set to recommended settings) requires the fuse settings:

0x0, 0xd7
0x1, 0xff

Niro
Posts: 77
Joined: Mon Jan 03, 2011 8:58 pm
Has thanked: 29 times
Been thanked: 10 times
Contact:

Re: AVR-EEPROM gets erased during programming

Post by Niro »

Thanks to all!

I actually found the most simple solution for me:

Start AVR Studio 4, conntect to the ATmega, then go to the Fuse Dialog and first READ the fuses, then set the EESAVE option and programm the fuse-settings.
Now Flowcode does the Flash-programming without erasing the EEprom.

Best Regards,
Niro

Post Reply