Request NCS v2.1.2 PWM example

Can you please provide an example project showing how to operated a pwn, with the following features:

1) Does NOT use pwm-led, pwn-servo, or whatever drivers or whatever these things are..... Just operate a PWM like one would be manipulating it's registers. No drivers with misleading names (what if the PWM is NOT for LEDS or servos?) and thing that are not properly explained in the sample projects like phandle-arrays.

2) Allows setting of period and duty cycle (pulse)

3) Allows inversion to assigned IO

4) Allows PWM to be shutdown (minimum power state) with pin at logic low

None of the provide examples (blinky_pwm, fade_led, servo_motor, etc) meet all of the above criteria.

Parents Reply Children
  • I am not aware of any samples that use that, unfortunately. Why do you need to use this one in particular? The nordic,nrf-pwm (the PWM peripheral) that you refer to is better suited for LED control (ironically) or audio samples. It is well suited if you want to play a sequence that is determined up front. If you want to control something in real time (which it looks like from your requirements list), I suggest you stick to the pwm-leds dts binding. It is more than capable to handle those things.

    BR,

    Edvin

Related