Is it possible to get commands from Bluetooth softdevice in NRF51822 to control 4 PWM servos at the same time?
Is it possible to get commands from Bluetooth softdevice in NRF51822 to control 4 PWM servos at the same time?
Hi Joseph
You can run 4 PWM channels simultaneously in the nRF51822, but since there is no dedicated PWM module in the chip it will consume a lot of resources (2 timers, 4 GPIOTE channels, 12 PPI channels).
The nRF52832 is a much better choice if you need PWM. It has 12 hardware PWM channels with DMA, and allows 8 GPIOTE based PWM channels, for a total of 20.
Best regards
Torbjørn
Thats great, but is it possible to use the softDevice bluetooth at the same time as well?
Yes, the SoftDevice will work. You will just not be able to update the PWM duty cycle while the link layer in the SoftDevice is doing any processing, as this runs at the highest interrupt priority. The PWM will still run, but the duty cycle will be fixed for the duration of the interrupt.