gnupic: Re: [gnupic] help - weird intermittent resets
Subject:
Re: [gnupic] help - weird intermittent resets
From:
Jeff ####@####.####
Date:
30 Jul 2005 04:21:50 +0100
Message-Id: <200507300321.j6U3L4un018974@ylpvm53.prodigy.net>
On Friday 29 July 2005 07:13 pm, David McNab wrote:
>
> I'm getting a weird and frustrating problem with a pic18f252 that
> intermittently resets itself.
>
> Config:
> - wdt and bor are on
> - 20 MHz crystal, with 18pF caps to ground
>
> Observations:
> - pic resets at random times, varying between 1s and 20s
> - pic resets much less often when I disconnect the
> max232-based tty interface
> - pic resets less often with much smaller progs (eg, the above
> test prog written in c and compiled under ccs, as opposed to written
> in forth and bloated out to 4k by the vm and support code)
> - power supply is delivering rock-solid 4.85 volts
> - i cannot reproduce this resetting when running the prog via gpsim
>
> Thoughts:
> - crystal is dodgy, locking up
> - pic is affected by ambient electrical noise
>
> Any ideas on cause, and fix/workaround?
Sounds very much like a problem I had many years ago with a Z80 board running
at a comparatively slow 4MHz. Ground and power traces were way too narrow,
causing relatively high ground/Vcc resistance and lots of generated noise.
Memory would get randomly corrupted, resulting in random resets.
As with your situation, larger code would cause more noise due to address and
data lines toggling between more extreme values, and resets would occur more
often. Ambient electrical noise also had a major affect (system would run
fine in the lab, but go belly-up in the user's environment). Incoming noise
on lines to external sensors also had a significant affect.
If that is the cause of your problem, there is no software workaround. The
only fix is to clean up the hardware.
No guarantee that your situation is the same, but it's a good place to start
looking.
HTH,
Jeff