We have a product that runs a DC motor using PWM for speed control, and keeps track of motor position using a magnet/hall sensor encoder. The product was developed using mega88, but was ported recently to mega48.
The AVR is configured to run at 8 MHz on the internal RC oscillator with OSCCAL set to the value calibrated using the AVR053 app note procedure. The hall sensor inputs trigger a pin change interrupt to start a position "reading", but the I/O pins are debounced before their state is read, and the pin change interrupt is masked during the debounce period. Timer0 is used for PWM, and Timer2 is used with overflow interrupt for a heartbeat. The analog comparator is used polled (its interrupt is disabled).
During the transition to mega48 we were seeing the position drift between motor runs in cycle testing, and we believe we've narrowed it down in the most recent test to pcbs that have the exact same hardware except for the mega48/mega88 change. We tested about 16 boards, about half each with mega48 and half with mega88, and burned the exact same code except for 1) using the appropriate include file for the m48 or m88, 2) eliminating an EEARH reference in the mega48 revision, and 3) changing the location where OSCCAL is loaded from. The pcbs with mega48 drift significantly and the pcbs with mega88 do not.
Does anybody know of any differences (documented or otherwise) between mega48 and mega88 that could account for this difference? I've read through the sticky thread on undocumented errata and nothing sticks out glaringly.