Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 Nov. 15, 2005 19:13:08

gilles b.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] interrupt_tiny2313


hi,
i'm having problem with jumps associated with interrupt vectors.
here's the beginning of the assembly code (which is copied from avr studio):

+00000000: C012 RJMP PC+0x0013
+00000001: C016 RJMP PC+0x0017
....
+00000018: CFE7 RJMP PC-0x0018

so, when an interrupt occurs, int0 for example, the first rjump leadsto another one that makes a reset (same behavior with others interruptslike int1, usart receive).it works like an global "catch-all" interrupt handler, but in thefollowing code i have defined:.global SIG_INTERRUPT0
SIG_INTERRUPT0: // isr code here // reti;

does anyone see what iswrong ?i' hadn't this pb before i'd fitted the code from an mega8515 to atiny2313. To make things simple, this is the first time i use tiny2313 !(avr-gcc -c -mmcu=attiny2313 -I. -x assembler-with-cpp -Wa, avr-gcc (GCC)3.4.3)Thanks, gb






_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

#2 Nov. 15, 2005 19:36:54

Dave H.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] interrupt_tiny2313


Hi Gilles,

> .global SIG_INTERRUPT0
> SIG_INTERRUPT0: // isr code here // reti;
>
> does anyone see what iswrong ?

Well, if you look in the iotn2313.h file, there are no interrupts with
the name SIG_INTERRUPT0. There is one called SIG_INT0

I think that this is done so that the interrupt names match the datasheets.

--
Dave Hylands
Vancouver, BC, Canadahttp://www.DaveHylands.com/_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

#3 Nov. 16, 2005 06:52:50

Joerg W.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] interrupt_tiny2313


Dave Hylands <> wrote:

> I think that this is done so that the interrupt names match the
> datasheets.

It was rather a mistake that has recently been fixed (by now having
both names).

--
cheers, J"org .-.-. --... ...-- -.. . DL8DTLhttp://www.sax.de/~joerg/NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

Board footer

Moderator control

Enjoy the 18th of November
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support