[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [avr-gcc-list] Is this a Stack problem?
From: |
Brian Cuthie |
Subject: |
RE: [avr-gcc-list] Is this a Stack problem? |
Date: |
Mon, 19 Jan 2004 17:09:01 -0500 |
Remember that the USART interrupts are _LEVEL_ sensitive, and so the
interrupt remains asserted unless you do something in your handler to clear
it. If you don't clear it, you'll reenter your interrupt handler as soon as
it exits.
-brian
> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden On Behalf Of Eric Fu
> Sent: Monday, January 19, 2004 4:42 PM
> To: address@hidden
> Subject: [avr-gcc-list] Is this a Stack problem?
>
> Hi All,
>
> I'm writing a test code to implement a SW half duplex
> interrupt UART with ATmega16 / STK500.
> The code passes the compiler (modified from a successful HW
> UART code). However, it doesn't work. It couldn't transmit
> anything, nothing happens at the transmit pin. The degugging
> I did shows the following:
> a.. The timer interrupt routine has been entered 22 times
> before it stops. And it is repeatable. Note: the timer period
> is defined same as bit rate. It supposed to transmit 11 ASCII
> code, equivalent to 220 timer interrupt entries.
> b.. If I run the Simulator in AVR Studio 4.08 in step mode,
> it could transmit the all the 11 characters, at least this is
> what I saw in the Simulator, and the transmit pin behaves as
> expected (in the Simulator)
> c.. If I run in continuos mode with a breakpoint set
> immediately after the 11 characters, it took 28 Secs to
> complete, however, it seems it does it connectedly.
> As I don't have a emulator at the moment, it is hard for me
> to find the fault.
>
> Could it be Stack problem? If it is, how to fix it?
> The compile message for code size is
>
> Size after:
> RF001.elf :
> section size addr
> .text 1622 0
> .data 12 8388704
> .bss 137 8388716
> .noinit 0 8388853
> .eeprom 0 8454144
> .stab 7212 0
> .stabstr 3158 0
> Total 12141
>
> I'm not sure what stab and stabstr are. Are they supposed to
> be like that?
>
> Thanks
>
> Eric Fu
>
> _______________________________________________
> avr-gcc-list mailing list
> address@hidden
> http://www.avr1.org/mailman/listinfo/avr-gcc-list
>