Generate beep on STMT/8L-EV1
I have the STMT/8L-EV1 and I'd like to generate a 4KHz beep sound when one of the directional buttons is pressed. Seems straight forward but I'm not sure how to implement it. I've tried just using and turning the GPIO pin on and off to no avail. I've tried to use the PWM for the TIM1_Channel2 the buzzer is on but that didn't work either. I don't want the beep tied to a timer or interrupt. All I need is a function to turn it on and one to turn it off.
Any ideas? Thanks. #stm8 #beep #stm8l