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

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

[avr-gcc-list] atmega128 funny problem


From: Hallvard Kvedalen
Subject: [avr-gcc-list] atmega128 funny problem
Date: Sat, 5 Oct 2002 19:42:18 +0200 (CEST)

Hi,

I have just started with some small code on the mega128. Unfortunately I
run into some funny problem.
The main function looks like this:

int main(void)
{
  init_HW();
  UART_print("Init ready \n");  
  sei();
  for(;;);
}

The result from this code is repeated transmissions of the "Init ..."
text. 

If I modify the code to this:

int main(void)
{
  init_HW();
  UART_print("Init ready \n");  
  sei();
  for(;;) {
     UART_print("test"); 
  }
}

It keeps sending the test string forever, which is expected, and not the
"Init..." text.
 

If I remove the sei() call in the first function it does not behave funny,
but stops at the for() as expected.

Is there anyone who know why the first code continues to send data on
the serial port when it shold stop at the for loop? 
I use the avrfreaks win 3.2 release.



avr-gcc-list at http://avr1.org



reply via email to

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