[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] interrupt problem with eeprom api, running on atmega1

From: Bernard Fouché
Subject: Re: [avr-gcc-list] interrupt problem with eeprom api, running on atmega128
Date: Mon, 18 Aug 2008 10:34:07 +0200
User-agent: Thunderbird (Windows/20080708)

Hi Michael.

I think that you hit this bug: http://savannah.nongnu.org/bugs/?23969

Compile with -Os until the problem is fixed (or with any optimization level different from 0 or 1)



Michael wrote:

Hi, I am finding that I have to disable interrupts when reading the eeprom using eeprom_read_byte().

If I don’t, then the code executes the EE_READY_vect, even though this interrupt is disabled.

I have attached the smallest program I can to demonstrate this.

I am running it on an atmega128, loaded into a stk500 using the stk501 addon.

I have PORTC connected to the leds, I am using the led on PC0.

My fuse values are 0xFF, 0xDF, 0x21 (Internal RC 1MHz osc)

If you run the code as attached, it will:

Turn on the led on PC0

Read the eeprom

Blink the led on PC0

However if you remove the cli(); before the eeprom read, the code will execute the EE_READY isr, and hang with the led off.

I have examined the listing output, and I cannot see why this is happening. I know that it did not happen in earlier versions of the compiler, yet I can’t remember which version’s specifically.

I currently have WinAVR-20080512

I’d like to get to the bottom of this somehow, as I am having some eeprom reliability problems which may or may not be related.

Regards, Michael.


AVR-GCC-list mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]