Just thinking aloud; I haven't checked the datasheet for the device. Is your watchdog kicking in and resetting the device?

Jerson