This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to make a beep on nRF51822 with BLE SD and what timer to use?

Hi, I need to drive a piezo buzzer. Just need to make a simple beep function(s) that one call will start generating a specified frequency on specified pin and other call will stop it. Desired freq. is about 3,5kHz. So I would use some timer thats output can be redirected to a GPIO and simply set a prescaller and run it. I even don't need PWM just toggle a pin. What timer can I safely use together with BLE SD? I already have one timer used for scheduler in my code static void timers_init(void) { APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_MAX_TIMERS, APP_TIMER_OP_QUEUE_SIZE, true); // v app_timer.h } What API functions I should use for this - is there some simple example?

Related