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

PWM - LED Min to Max Brightness and Vice Versa

Hello,

I am currently learning the PWM peripheral of the nRF52DK and am a total beginner in PWM.

I have tried running the attached program and this allows the LED0 to luminate from MIN to MAX brightness.

However, when it reaches MAX brightness, it goes to OFF then goes to the routine again.

What I want to do is when it reaches MAX brightness, then it will then slowly go to MIN brightness.

Can you please suggest for ways on how to achieve this? I have seen a function such as nrf_drv_pwm_complex_playback but I'm not sure how to use it

Please see attached project.

pin_change_int.rar

Regards,

Jade

Related