I have noticed some strange behavior with my code and I had couple of questions:
My board is a DC brushed motor(perm magnet.) control board. The DC brushed motor is within 10 inches of this board.
my questions/situations are:
1. Question- Can EMI noise corrupt SRAM or PC counter? i am seeing some weird behavior if I turn on PWM and start turning the motor. Weird Behaviors are: Watchdog reset, Software reset. A reset without any Reset flag status, my Variable corruption, Also it seems like my PC jumps into some unknown code locations..
2. Question- If I use my external crystal as my system clock source, my system resets either by (software or watchdog or sometimes gets stuck in an unknown state...). But if I use PLL as System clock source and use External Crystal as PLL source, I see less of this behavior. Is there a filter on PLL?
3. Info- If I use internal RC 2MHZ as source to PLL i haven't been able to recreate this problem.
4. Info- I have brown out detection enabled and also OSC failure monitor is also enabled.I don't see any of them getting triggered.
5. Info-If I have my System clock source set for External OSC (16MHZ), and i run the DC motor, If i move my hand close to the Crystal proximity, or close to where the micro resides, i notice motor speed change and sometimes an earlier reset. If i touch my Crystal package/case, i see a definite reset /miss behavior.
5. Question-Can my program counter get corrupted due to noise? what about SRAM variables? Is the noise getting through my XSOC inputs?
Thanks for your thought/help.