avr-gcc-list
[Top][All Lists]
Advanced

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

RE: [avr-gcc-list] Problem with atmega162 timer interrupt


From: Eric Weddington
Subject: RE: [avr-gcc-list] Problem with atmega162 timer interrupt
Date: Mon, 13 Aug 2007 15:21:06 -0600


> -----Original Message-----
> From:
> address@hidden
> [mailto:address@hidden
> org] On Behalf Of Henko Gouws
> Sent: Monday, August 13, 2007 3:07 PM
> To: address@hidden
> Subject: [avr-gcc-list] Problem with atmega162 timer interrupt
>
> Hi
>
> I have used the 90s8515 for a home alarm system and it worked
> fine.  I used
> a timer0 overflow to emulate a simple scheduler etc.  The
> 90s8515 ran out of
> code space (8k) and I had to switch to the atmega162 to
> handle more sensors
> and conditions.
>
> After encountering some porting problems I just wrote a small
> program that
> toggles an LED.  This program worked on the 90s8515.  It does
> not work on
> the atmega162.  If I use timing loops (not timer 0) then the
> LED toggles
> nicely.  As soon as I call sei() then nothing seems to happen
> - even if the
> timing loops are present - I assume that the interrupt prolog
> and epilog
> might be incorrect and might cause the processor to hang or
> reset.  I do not
> have an ICE.
>
> Has anyone had similar problems with the atmega162 before?  I
> am using the
> portable winavr (last updated in April 2006 I think) and this
> compiler has
> worked well with the at90s8515.
>
> I have verified that the mcu = atmega162 works because the
> old register
> names of the 90s8515 are not accepted.
>
> If I understand correctly: There seems to be a difference in
> the interrupt
> vectors of the atmega162 and the 90s8515 - the 90s8515
> interrupt vectors are
> short vectors of 8bit each and the atmega162 vectors are 16
> bit vectors.
> Could this be the reason?

Are you correctly setting the -mmcu=<device> flag to the correct device on
both your compile and link command lines?

Eric






reply via email to

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