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/
_______________________________________________
AVR-libc-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-libc-dev