Hello
On 15 October 2010 20:27, Ivca Safranko <[email protected]> wrote:
> Hallo,
>
> Simulavr is a great idea and I'd like to contribute to its development.
Great!
> I think the atmega16_32 interrupt vectors for EEPROM Ready are not
> equal:
>
> atmega16_32.cpp
>
> eeprom = new HWEeprom(this, irqSystem, ee_bytes, 15);
> if(stack11bit)
> stack = new HWStackSram(this, 11);
> else
> stack = new HWStackSram(this, 12);
>
> Perhaps this is better?
>
> if(stack11bit) {
> eeprom = new HWEeprom(this, irqSystem, ee_bytes, 15);
> stack = new HWStackSram(this, 11);
> } else {
> eeprom = new HWEeprom(this, irqSystem, ee_bytes, 17);
> stack = new HWStackSram(this, 12);
> }
You are right, ATmega32's EEPROM Ready interrupt is 17, not 15.
Checked against ATmega32 datasheet revision P. (Note datasheet lists
reset vector as 1, not 0 as we do.)
Your change fixes the problem. The variable 'stack11bit' would become
abused a bit, maybe we should move the initialization of 'eeprom' and
'stack' to descentants' constructors.
I will commit the fix and review your new files tomorrow (in Europe),
unless an other commiter is faster.
--
Petr Hluzin
_______________________________________________
Simulavr-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/simulavr-devel