pin12 was destroy on arduino mega (tried with another new arduino mega)

when I use pin12 as a analogwrite pin, it worked for a little time, and then, it was destroy, I mean I can't analogWrite on it anymore. I bought another new arduino, this keeps happened again. now on both 2 board I can't analogWrite on it. I hope these information will help:my code is to receive serial data from ubuntu and send back to ubuntu as the same time and the arduino will handle the signal to drive the motor driver TB6612fng.