Hi,

I just pushed an initial version of the nRF52 PWM driver
https://github.com/runtimeco/mynewt_nordic/pull/2
which uses the already discussed PWM high level API
https://github.com/apache/mynewt-core/pull/448

Currently this driver only supports the individual channel mode (same
frequency and top value but different duty cycle values for each
channel).
Every function defined on the high level API is implemented except for
pwm_get_resolution_bits().

I have a few questions which I would like your feedback on:

-Which other modes do we want to support?
How would you like to see them fitting the current high level API?
Options are Common, Grouped and Waveform.

-What would be the best way to calculate the resolution bits?
Maybe a lookup table, since there is a well defined set of possible
values for the PWM frequency.

-On nrf52_pwm_open() a nrf_drv_pwm_config_t structure is expected for
setting up the initial configuration, since the nRF52 ADC driver also
uses Nordic's SDK configuration data structures. Do you agree with
this?
What do you think of the default configuration (when arg is NULL)?
What should it be?

Any feedback on this implementation is welcome!

Regards,

Miguel Azevedo

Reply via email to