This application note describes how to use the STM8S-DISCOVERY touch sensing key and the Beeper peripheral to adjust the frequency of the buzzer. When the STM8S105C6T6 is powered up through a USB cable connected to the host PC, the LED LD1 turns on, indicating that the programming has been successfully completed. Each time the TS1 key is pressed, the Beeper emits a beep at different frequencies (1kHz, 2kHz, and 4kHz). The Beeper stops emitting sound when TS1 is pressed for the fourth time, and it can be restarted by pressing TS1 again.