[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: |
Lorne Gutz |
Subject: |
Re: [avr-gcc-list] Is this a Stack problem? |
Date: |
Tue, 20 Jan 2004 09:41:41 -0500 |
User-agent: |
KMail/1.5.1 |
If you check you will find that there are 2 interrupts involved
with the UART transmitt.
Basicly you must use one to enable the other when the
UART is ready to except another character.
From what you have stated below I believe that your code
has rammed 11 characters into the UART before anything
ever gets sent. You could easly have a stack overflow if
your code is reenterand, and interrupt gets enabled inside
your ISR.
cheers
Lorne
On Monday 19 January 2004 16:41, Eric Fu wrote:
> 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