[Top][All Lists]

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

[avr-chat] Re: mega644 resetting continuously

From: Steve Franks
Subject: [avr-chat] Re: mega644 resetting continuously
Date: Mon, 29 Jan 2007 09:15:03 -0700

On 1/29/07, Daine Mamacos <address@hidden> wrote:

Hey, I tumbled upon your post, and I have EXACTLY the same problem.

I've disabled watchdog timers, in software and on the fuses. I also ram

Stuff out on the UART, and it resets in the middle of pushing a string out

On UART if it's too long. It doesn't seem to matter what I do, I can't stop

It from resetting.

I know it's been a while, but have you managed to sort this issue out?

Any help would be appreciated. Thanks

Daine Mamacos.

 "Complinet Ltd is registered in England. Registered office at Vintners
Place, 68 Upper Thames Street, London EC4V 3BJ. Company number 3170722. VAT
No. 749 324 021.
 Complinet Inc is a corporation registered in Delaware, USA."

 This email has been scanned by the MessageLabs Email Security System.


First, it was one of those problems that was never really 'fixed' -
just sort of went away slowly.

It seemed to be somewhat related to the jtag-ice - I recall it seemed
to behave differently wether the reset pin on the jtag was connected
(I find the way the jtag holds it in reset annoying, so I have a
special dongle with no reset line).  So it could have been noise on
the reset.

It also seemed highly dependant on how many globals I had in the code
above main() - moving everything into locals in main helped

I don't have the problem at all on the new 4.1.1 compiler, probably
just because it optimizes better - but if you're on windows, you'll
have to wait until the next winavr release.

Also, on all the new devices, simply calling wdt_disable() is
insufficient to disable the wdt (mentioned in the fine print somewhere
in wdt.h - thanks to Joerg for pointing it out in my hour of need).  I
suspect 644 falls under this heading.  Instead add this above main (if
you haven't already, of course):

void EarlyInit(void) __attribute__ ((naked)) __attribute__ ((section
void EarlyInit(void)
        MCUSR = 0;

Best of luck,

Steve Franks, KE7BTE
Staff Engineer
La Palma Devices, LLC
(520) 312-0089

reply via email to

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