# Forum: µC & Digital Electronics ATMEGA 644 on Pollin NETIO: sei leads to reset/restart

Rate this post
 0 ▲ useful ▼ not useful
Hello all,

first of all: I hope that this is the correct forum, if not, please give
me a hint.
2nd: I searched a couple of days, but did not find anything, so now, I
need someone who likes to help me.

I run an Atmel ATMEGA 644 on a Pollin Net-I/O board and try "from
scratch" to setup a simple timer 0 interrupt.

The code looks like this:
 #include #include #include #include ISR(BADISR_vect) { // catch up all interrupts for which no ISR is defined } ISR (TIMER0_OVF_vect) { PORTC |= (1<< PC1); // LED on _delay_us(200); PORTC &= ~(1<< PC1); // LED off } // ********************** main function ************************** int main(void) { // main function begins here DDRC |= (1<

The strange thing is that the code after sei() is never reached, means
the LED 0 is never blinking. If I comment out the sei() OR the TCCR0B =
(LED 1 stays dark in both cases)

If I try to use "external clock source on T0 Pin" (CS02 | CS01) the code
"LED 0" is also reached, but obviously the ISR is not executed.

I also tried to configure Timer 1 with the same effect.

IMHO, the problem must be very trivial, but I don't have any clue
anymore.

I really appreciate some ideas / hints from you, TIA!

Rate this post
 0 ▲ useful ▼ not useful
I set this myself to "Solved" (is there a formal way?).

As I found out today, I was a little bit confused, when I took over my
makefile from another project (Bootloader), so this code was flashed
possible, but need another interrupt tale. But, as I was using the
"appl-interrupt table", the code could not work.

Removing the option LDFLAGS += -Ttext=E000 from the makefile did the
trick, the code above is completely correct.

This, just that no one else uses his/her time to analyze my (phantom)
problems!`

• $formula (LaTeX syntax)$