Skip to main content
Titus Stalin
Associate III
December 20, 2018
Question

Timer sample code for buzzer on STM32L432G

  • December 20, 2018
  • 2 replies
  • 1066 views

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.

    This topic has been closed for replies.

    2 replies

    Tesla DeLorean
    Guru
    December 20, 2018

    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 VenmoUp vote any posts that you find helpful, it shows what's working..
    S.Ma
    Principal
    December 23, 2018

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