Arduino Due losing its program.

Hi all.
I have several Arduino Due for a project.
Some of them are losing their programming.
I think I isolated the condition that this happens.

Before enumerating the conditions, this is something that maybe is useful.

When the Arduinos are powered up, pins 9 and 3 are PWM outputs. I don't know if that matters however.

Now, the erasing conditions:

  • Arduinos are not powered.

  • In pins 9 and 3, there is a voltage of about 4 Volt (Arduino Due is working at 3.3Volt).

Does that look like a possible erasing scenario? How would an applied voltage at the pins of a not powered up microcontroller cause a a program memory erase?

Thanks for the help.

Anyone?

Applying voltage to pins when the device is not formally powered via its power pins is never a good idea, current can leak into the device and power parts of it, this might be what is causing the erase.