void setup()
{
pinMode(13, OUTPUT);
Serial.begin(9600);
}
void loop ()
{
digitalWrite(13, LOW); //just to see when the program/board freezes
sei(); //Enables interrupts
delay (300);
cli(); //Disable interrupts
digitalWrite(13, HIGH); //just to see when the program/board freezes
Serial.println ("pretty looooooooooooooooooooooooong woooooooooooooooooooooords");
}
I know the code has no meaning this way, but I reduced it to its simplest expression to better understand why the board freezes.
Here is the issue :
The way the code is written will freeze a UNO board (tried it on two different boards, same problem). If i take away just one character from the Serial.println sentence, it doesn't freeze! I came to realize that the issue is related to sei(); and cli(); but I have no idea how to fix this. BTW, even when nothing is connected to the board, I get this problem...
I'm using the IDE version 1.0.6.
Any ideas?