I'm working on a project that uses a PIC18F26K22 microcontroller, and it's behaving oddly.
Basically, sometimes if you kind of "bounce" on the reset line (I have a button on it, and I just kind of fiddle with it), it will reset and some of the interrupts will not be functional (in this case, the EUSART RX interrupt).
The reset button has a debouncing capacitor to ground, and a pull up resistor (10n/10K respectively).
I've tried adding some precautionary cleanup to the startup section of the source, but it hasn't helped. At this point, I have a manual watchdog that detects a lack of serial traffic, and manually triggers another CPU reset, at which point everything starts working correctly.
My assumption was that the registers on the chip were all reset to their "power-on" state when a reset was triggered (excepting perhaps the RCON register), but the fact that I can fairly reliably trigger strange behaviour by just resetting the chip multiple times quickly makes me think this is not true.
Is corruption of registers triggered by repeated reset a common (or even extant) thing with PICs? I'm mostly familiar with AVRs.
Edit: I considered switch-bounce, but the documentation for the MCLR input states:
These devices have a noise filter in the MCLR Reset path which detects and ignores small pulses.
My assumption here was that reset pulses shorter then the minimum width (2 uS, for this part) would be ignored.
Further edit: I've actually looked at the MCLR line with a scope. It is both bounce-free, and entirely satisfies the minimum hold time (the shortest period I saw was ~50 milliseconds, the minimum hold time is 2 microseconds). It's not MCLR bounce.