avr-libc-dev
[Top][All Lists]
Advanced

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

[avr-libc-dev] [bug #23969] eeprom_read_byte() throws interrupt EE_READY


From: Lars Schreiber
Subject: [avr-libc-dev] [bug #23969] eeprom_read_byte() throws interrupt EE_READY although EERIE is cleared, controller resets
Date: Wed, 30 Jul 2008 22:19:32 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.14) Gecko/20080404 Iceweasel/2.0.0.14 (Debian-2.0.0.14-2)

URL:
  <http://savannah.nongnu.org/bugs/?23969>

                 Summary: eeprom_read_byte() throws interrupt EE_READY
although EERIE is cleared, controller resets
                 Project: AVR C Runtime Library
            Submitted by: l_s_rockfan
            Submitted on: Wednesday 07/30/2008 at 22:19
                Category: Library
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: libc code
                  Status: None
        Percent Complete: 0%
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 1.6.2
           Fixed Release: None

    _______________________________________________________

Details:

Hello,

in a project previously built with avr-libc before 1.6 eeprom access through
avr-libc worked fine.

After switching to avr-libc 1.6.x the controller resets when accessing the
eeprom through avr-libc methods.

This is caused by a thrown EE_READY interrupt from inside eeprom_read_byte()
function when EECR|(1<<EERE) value is stored to EECR, although eeprom ready
interrupt enable bit (EERIE) isn't set at all. *confusing*

The corresponding isr body is not defined. Thus the mcu resets
(__bad_interrupt).

This problem only occurs after building with optimization level 0 or 1.
Testing platforms were ATmega64 and ATmega16.

Disabling interrupts globally before calling eeprom functions worked around
the problem, as well as defining empty ISR for EE_READY interrupt or compiling
with optimization level 2/3/s.

problem was noticed before under sourceforge.net > winavr > bugtracker:
http://sourceforge.net/tracker/index.php?func=detail&aid=2009732&group_id=68108&atid=520074




    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?23969>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

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