I am driving a piezo at a fixed frequency but want to provide adjustable volume by adjusting the duty cycle. I would like to adjust it by setting the duty cycle to 5 levels. For simplicity, lets say 0, 12.5, 25, 37.5, and 50%. However, I am finding this is impacting stability of the Bluetooth communication. Is there any example code that could be used to provide such functionality.