cancel
Showing results for 
Search instead for 
Did you mean: 

Timer sample code for buzzer on STM32L432G

Titus Stalin
Associate II

Can you please share me timer sample code for STM32L432G board.

I have Sensortile board and would like to interface buzzer, so I need to add timer code to get timer cb to toggle the required frequency to get the proper buzzer sound.

Also please suggest if anything is available for buzzer.

2 REPLIES 2

Timer examples which should be portable can be found in the code repository

STM32Cube_FW_L4_V1.13.0\Projects\NUCLEO-L432KC\Examples\TIM\TIM_PWMOutput

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
S.Ma
Principal

Note: If you use a piezo buzzer, you could use 2 TIMER PWM channels in opposite phase to double the piezo alternative voltage amplitude...