Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
4 years, 12 months ago.
Hardware timer on nRF51822
I am trying to achieve a 15.625 kHz (doesn't have to be exact) frequency PWM signal with a 10-bit duty cycle resolution on the nRF51822. The chip has a 16 mHz clock, so it should work, but I am not getting there with the PwmOut lib. Is it using hardware timers on the nRF51822? Is there something else I am missing?
Thanks in advance, Tom
Question relating to:
4 years, 10 months ago.
- define TIMER_PRECISION 4 4us ticks
- define TIMER_PRESCALER 6 4us ticks = 16Mhz/(2^6)
By default the timer prescaler is set to 4uS steps.