Timer nRF52833 problem when using PWM+ble_app_uart+libuartes

Hi I'm developing an application using using PWM+ble_app_uart+libuartes.  So I have 2 questions
1. I'm using PWM to ring the buzzer a simple  melody.
What is the example I should you ?And what is common frequency when using PWM to rinng the buzzer?
2. I merger the code ble_app_uart and libuartes using 2 libuartes and It's work fine. I find that this application using 3 Timers. Soft Device(Timer0), Timer1, Timer2 used for libuartes.
According to nRF52833 document, nRF52833 have 5 Timers. So how can I use the rest timers for PWM (initialize, generate..)? 
Thank you, hope your reply soon !

Parents
  • Hello,

    What is the example I should you ?And what is common frequency when using PWM to rinng the buzzer?

    That depends on the buzzer, I guess. Just remember that buzzers typically changes tone on frequency, and not PWM duty cycle. So try setting the duty cycle to 50%, and change the frequency to change the tone. 

    2. I merger the code ble_app_uart and libuartes using 2 libuartes and It's work fine. I find that this application using 3 Timers. Soft Device(Timer0), Timer1, Timer2 used for libuartes.
    According to nRF52833 document, nRF52833 have 5 Timers. So how can I use the rest timers for PWM (initialize, generate..)? 

    That is correct. I believe you don't need more than one timer for the PWM.

    BR,
    Edvin

Reply
  • Hello,

    What is the example I should you ?And what is common frequency when using PWM to rinng the buzzer?

    That depends on the buzzer, I guess. Just remember that buzzers typically changes tone on frequency, and not PWM duty cycle. So try setting the duty cycle to 50%, and change the frequency to change the tone. 

    2. I merger the code ble_app_uart and libuartes using 2 libuartes and It's work fine. I find that this application using 3 Timers. Soft Device(Timer0), Timer1, Timer2 used for libuartes.
    According to nRF52833 document, nRF52833 have 5 Timers. So how can I use the rest timers for PWM (initialize, generate..)? 

    That is correct. I believe you don't need more than one timer for the PWM.

    BR,
    Edvin

Children
Related