Changing analogWrite() function frequency

Before we can help, we need to know what processor you are talking about.
After all, we are very good at helping, but we are very poor at guessing.